Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / AE template update optionMenu?
  RSS 2.0 ATOM  

AE template update optionMenu?
Rate this thread
 
63766
 
Permlink of this thread  
avatar
  • Total Posts: 2
  • Joined: 26 April 2009 02:41 PM

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

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[$i-1];         
         
}
}

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



Replies: 0