Jausn
04-13-2009, 02:41 AM
Hello everybody!
I wanna add a custom attributes to a spline to control the animation. I added a listbox and a pickbutton to it, and gonna achieve this: picked an object then the object's name display in the listbox item.
Here's my script:
testCA = attributes listBoxTest
(
parameters main rollout params
(
-------------------------------------------------------
)
rollout params "Test"
(
fn shapesOnly obj = isKindOf obj shape
listBox objLb ""
pickbutton objPb "Pick an Object" filter:shapesOnly
on objPb picked obj do
objLb.items = #(obj.name)
)
)
custAttributes.add $.modifiers[1] testCA
But when I selected another object then selected the object again, the data was gone.
So how to save the data? I know that I should set some parameters but how to do it?
Thank you.
I wanna add a custom attributes to a spline to control the animation. I added a listbox and a pickbutton to it, and gonna achieve this: picked an object then the object's name display in the listbox item.
Here's my script:
testCA = attributes listBoxTest
(
parameters main rollout params
(
-------------------------------------------------------
)
rollout params "Test"
(
fn shapesOnly obj = isKindOf obj shape
listBox objLb ""
pickbutton objPb "Pick an Object" filter:shapesOnly
on objPb picked obj do
objLb.items = #(obj.name)
)
)
custAttributes.add $.modifiers[1] testCA
But when I selected another object then selected the object again, the data was gone.
So how to save the data? I know that I should set some parameters but how to do it?
Thank you.
