Hello, I am trying to run a script that will automatically create an object from my userlibary. I am using an createinstace() command for this. Lib. object is a plane with 3 objects as a subnodes. When i drag and drop this plane_custom_object from the library toolbar, everything workd fine, but when i tried to achieved this with a script, only the plane itself is created, without the other objects.
Script here:
Object object; for (int i = 1; i <= 3; i++) { object = createinstance(maintree().find("project/userlibrary/test_lib/Plane2"),model()); object.location.x = 5; object.location.y = -i * (object.size.y + 2); }
My user library tree:
Problem on picture here:
How can i modify my script to work properly ?
Thank you for an advice.