www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: pixelby on September 28, 2016, 03:20:38 pm

Title: Serialized object names
Post by: pixelby on September 28, 2016, 03:20:38 pm
Hello. I'm using eclipse plugin for serialize my 3ds model.
When I load model from 3ds, child elements have a correct names (like in blender).
After serialization, I obtain many .ser files with names <Original Model Name>_1.ser, ...., <Original Model Name>_25.ser

I need identify this objects by theirs names, but after loading Object.getName returns something like object24 and etc.

How to save original objects names after serialization?
Title: Re: Serialized object names
Post by: EgonOlsen on September 28, 2016, 04:56:54 pm
I'm not sure about the Eclipse plugin, because I didn't wrote it. You can call getName() on the objects and see if the returned value is of any help to you. If not, you can always serialize the objects by yourself. All you need is a project that uses desktop jPCT that loads your files, build()s them and then serializes them with the names that you want them to have. Like so:

Code: [Select]
Object3D obj=....; // Load the object somehow
obj.build();
DeSerializer ds = new DeSerializer();
ds.serialize(obj, new FileOutputStream("yourName.yN"), true);
Title: Re: Serialized object names
Post by: pixelby on September 28, 2016, 06:18:52 pm
Ok, thank you.