Message 1 of 1
AE template update optionMenu?

Not applicable
01-22-2012
06:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im creating a scripted node in maya with python and one of the attributes is a messageAttr witch i want to show in the AE ad an option menu of a list of maya cameras, so far i have this (amongts many otehr things) in the AE...template.mel
-
so this populates the list just fine but i cant figure out, or find any documentation on how to update the contents of the option menu. Presumably i woudl want to create some sort of procedure that gets called when the menu is clicked, but even if i could figure out how to make the procedure get triggered i woudlnt know how to access the option menu, usually i would assign it to a global variable but thats out of the question as i may have many instances of the node in my scene, any ideas how I'd do this?
Thanks
jt
editorTemplate -callCustom "AE_custom_camera_menu" "AE_edit_custom_camera_menu" "camera";
-
global proc AE_custom_camera_menu(string $attr){
rowLayout -nc 3;
text -label "Camera"
optionMenu -width 200;
string $str[] = `ls -cameras`;
int $i;
for ($i = `size($str)`; $i > 0; $i--){
menuItem -label $str;
}
}
so this populates the list just fine but i cant figure out, or find any documentation on how to update the contents of the option menu. Presumably i woudl want to create some sort of procedure that gets called when the menu is clicked, but even if i could figure out how to make the procedure get triggered i woudlnt know how to access the option menu, usually i would assign it to a global variable but thats out of the question as i may have many instances of the node in my scene, any ideas how I'd do this?
Thanks
jt