|
I’ve searched for the answer to this as I’m sure it’s easy, but I just don’t think i know how to word the question in the search, as I’m still new to scripting.
I have a dummy with custom attributes in it to control my objects animation. My objects that are being controlled by the dummy can be on or off depending on what attributes are set in the dummy, (like Cap is on, shirt is off). I already have a script written that turns on or off objects in the dummy’s hiarchy, that checks drop down boxes and Boolean check boxes.
What I would like to do is when I press a boolean like Shirt is on, I would like it to run the script. So like a on button click toggle run script.
Thanks for any help.
|
|
|
|
I would suggest putting these custom attributes into the attribute empty modifier on top of your dummy object. That way you can fire off your script functions when toggling the attributes. Plugging Paul Neale as he has already written this up.
http://www.paulneale.com/tutorials/custAttributes/customAttributes.htm
Randall Hess
Senior Technical Animator
THQ, Volition Inc.
|
|
|
|
ca = attributes "Something" (
fn example = (messageBox "xyz")
parameters main rollout:params
(
cap type:#boolean ui:chbxCap default:off
on cap set state do
(
format "Cap state changed\n"
format "Cur. state is %\n" state
example() -- call the local function
)
)
rollout params "Parameters"
(
checkbox chbxCap "Cap"
)
)
Max 9 through 2009, XP-Pro x64 SP2
ASUS EAH3450 Series (Driver 8.470).
Core 2 Duo E8400 3GHz, 4Gb Ram, DX9.0c.
|
|
|