Author Topic: Can not clone a striped Object3D  (Read 1614 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Can not clone a striped Object3D
« on: October 17, 2013, 03:34:03 am »
Code: [Select]
Object3D src;
src.build();
src.strip();
Object3D obj = src.cloneObject(); // will throw a NullPointerException

Should this behavior be legal?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Can not clone a striped Object3D
« Reply #1 on: October 17, 2013, 09:58:31 am »
No, that's not supposed to work, but it should actually throw a proper exception and not a null pointer. I'll look into it. However, if you want to strip objects that are sharing meshes, do a object.getMesh().setLocked(true); before. That should do the trick.