Cams in marking menu


I am trying to do something fairly simple, but it’s
being a bastard. I want all the perspective cams in a
scene to be under marking menu/hotbox, mapped to a
hotkey. This needs to be dynamic, so when a new cam is
being created in the scene, or a different scene is
opened, the marking menu should update accordingly.

What I wrote works to a certain extent, in that it
only ads the latest created camera.

What am I missing here?

string $allPerspCams[] = `listCameras -p`;
int $numberOfCams = `size $allPerspCams`;
string $editor=modelPanel ("-q", "-me", `getPanel -wf`);

for ($eachCam in $allPerspCams)
        -label $eachCam
        -divider 0
        -subMenu 0
        -command "lookThroughModelPanel $eachCam $editor"
        -altModifier 0
        -optionModifier 0
        -commandModifier 0
        -ctrlModifier 0
        -shiftModifier 0 
        -optionBox 0
        -enable 1
        -data 0
        -radialPosition "N" 
        -enableCommandRepeat 1
       // -image "commandButton.xpm" 
        -echoCommand 0
        -italicized 0
        -boldFont 0
        ("menuEditorMenuItem" + $eachCam);

setParent -m ..;


you have -radialPosition “N” there. This means any camera it finds will be assigned to the North position of the marking menu.
You’ll need to find out which radialPosition is empty and put the new camera in that one.


i tried making it work from the spacebar hotbox centre, but it wasn’t playing ball.


look on for a MEL script called alienCameras


thankyou for saving me the time of reinventing the wheel, and not sticking it on my reel for people to say “thats already out”



Thanks for the tip. I am in the process of cannibalizing it.



Almost there…One more problem:

I’m the process of writing a script that dynamically creates marking menus. The thing is, I want the “stuff” (say, selected cameras or available character sets) to appear in the north position of the marking menu, all after each other - or on top of each other if you will. Murphy’s Law states that I will be able to place my items everywhere, except the position where I want.

I can place my items in all directions of the wind using the:
-radialPosition flag: “N”,“NE”,“E”,“SE”,“S”,“SW”,“W”,“NW”

If I ignore that flag, all the items will be neatly stacked in the S(outh) position.

I can’t for the life of me figure out how to get the stacked in the North position.

Any takers?


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.