Copy objects with names?
-
Hello!
I've got a problem. When I should copy an object in sketchup the object Name will follow the new copy.
But when I copy an object with script copy() or use emitterthe new bodies doesn't have any name, is this a bug or something?
It would be fine if someone get this to work.
I've think about it a little, and if there is a script that will name objects that touched it then I got it to work.Hope someone understand my english. Thanks!
-
You could just set the name to anything you like.
-
I want to do that inside a simulation.
I've created a model that view 3 box(es?) that have diffrent copy methods.
Sample Copy names.skpBox1onstart{ copy() }
Box2
Emitter at frame 1
Box3
Just a sample that are copied outside SketchyPhsyics
So my problem is, when Box1 & 2 copy and emitter the new bodies that is created does'nt have any names?
How to name this object inside sketchyphysics, cause when it's copy or emitter the script field would be erased to?
Thanks! -
I am still using SU7 so I cant open that file.
off the top of my head:
body=copy()
body.group.name="name"I guess the next question would be why do you need emitted objects to have names?
-
Hello again!
Thanks for the help!I had done in another way that works to, it´s a bowling lane (with pins and everything ofcourse), but it is scripted, not mechanical.
So therefor I need to delete the pins/balls that have been used to copy/emitter new ones, otherwise there will be too much geometry in the model.
And when the model should erase the pins/balls I've think that it only should erase objects with the name pin (or ball) but, I've figured out another way on the problem.
But thank's alot for the help, I be back if I got more problems.
The skechyphysics is awesome!
Advertisement