Populating dropdownlist
I need to populate a dropdown list with all the scene cameras. Which that part is simple.
But the problem I'm coming across is if someone creates a camera after the dialog has been opened. What do you guys thing would be the best way to re-populate the dialog?
My first thought is a selection callback function.
Here is the base of the script so far.
( camArray = for i in cameras where superclassof i == Camera collect i.name rollout drop_roll "Drop Down List" ( dropdownlist obj_dd "Objects :" offset:[0,-20] items:camArray ) createDialog drop_roll )
Comments
Alright
Thanks Anubis, I'll be sure to look into using this instead of the callback I was using before.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
just a tip
Goin in that way (using the General Event Callback Mechanism)
you should add more callbacks:
#nodeCloned
- to catch cloned objects too#sceneNodeAdded
- to catch merged objectsIn the new NodeEventCallback (added in Max 2009)
you can do this with 1 callback,
and its more precise - catch even undo/redo operations.
my recent MAXScripts RSS (archive here)
callback on node create
Not sure why this isn't working..
Once i get this working I'll add a nodeDeleted callback as well.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Got it. The rollout () were
Got it. The rollout () were wrong.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)