Author Topic: Serialized object names  (Read 1842 times)

Offline pixelby

  • byte
  • *
  • Posts: 11
    • View Profile
Serialized object names
« 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Serialized object names
« Reply #1 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);

Offline pixelby

  • byte
  • *
  • Posts: 11
    • View Profile
Re: Serialized object names
« Reply #2 on: September 28, 2016, 06:18:52 pm »
Ok, thank you.