www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: kiffa on October 17, 2013, 03:34:03 am

Title: Can not clone a striped Object3D
Post by: kiffa 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?
Title: Re: Can not clone a striped Object3D
Post by: EgonOlsen 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.