Serialized object names

Started by pixelby, September 28, 2016, 03:20:38 PM

Previous topic - Next topic

pixelby

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?

EgonOlsen

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:


Object3D obj=....; // Load the object somehow
obj.build();
DeSerializer ds = new DeSerializer();
ds.serialize(obj, new FileOutputStream("yourName.yN"), true);

pixelby