View Full Version : Adding an Item Shape with LScript?

07-27-2011, 05:54 AM
I guess the title asks the question, but... Is there a way to add an Item Shape to a null with LScript?


07-27-2011, 07:05 AM
Yes, it should be possible. But you will have to backward just a wee bit.
First add the custom object plugin to the item using ApplyServer() as usual.
Then check out makejointchain.ls, Create_Handle.ls, Package_Scene.ls to see how messages for the ItemShape ComRing can look like. Once you've figured out what is what, you should be able to send your own ComRing messages and control the settings of any ItemShape instance.

07-27-2011, 09:49 AM
Thanks!! works great!!

07-27-2011, 11:16 AM
I see you have some free scripts, so I'm assuming you know a LScript. I'm trying to parent two nulls (via LScript) and the null I am making the child keeps snaping to the parents location. I have Parent in Place turned on, but no luck.

Here's what I am doing

creating parent
moving it to the a location (same location as a bone)
creating the child null
moving it to a differnt location
parenting the two
the child snaps to the parent

Any thoughts?

THanks again


07-27-2011, 12:52 PM
Any thoughts?

First thought is that you should paste the code rather than what you think the code does. As you concluded already, it's highly likely I understand LScript. :)

I can only figure out two reason why the child might be offset despite PIP being on.
1) PIP is not on! :) If indeed PIP is active then it should not move. How do you activate PIP? And have you checked that it is on to make sure everything works?
2) You mention that you move the child to a new position after creation. But do you also set a key so LW remembers it? The parenting command will refresh LW and if you havent keyed the position it is lost, and it would default at <0,0,0> (parent coordinates) and seem to snap to the parent.