Go to: Synopsis. Return value. Keywords. Related. Flags. MEL examples.

Synopsis

perCameraVisibility [-camera name] [-exclusive] [-hide] [-remove] [-removeAll] [-removeCamera]

perCameraVisibility is NOT undoable, queryable, and NOT editable.

The perCameraVisibility command creates, queries and removes visibility relationships between DAG objects and cameras. These relationships are applied in any viewport that uses the cameras involved. (They are not used e.g. in rendering.) Objects can be set to be exclusive to a camera (meaning they will only be displayed in viewports using that camera; they will be hidden in other viewports) or hidden from a camera (meaning they will be not visible in any viewport using the camera).

Return value

string[]Command result

In query mode, return type is based on queried flag.

Keywords

viewport, visibility

Related

hide, showHidden

Flags

camera, exclusive, hide, remove, removeAll, removeCamera
Long name (short name) Argument types Properties
-camera(-c) name createquery
Specify the camera for the operation.
-exclusive(-ex) createquery
Set objects as being exclusive to the given camera.
-hide(-hi) createquery
Set objects as being hidden from the given camera.
-remove(-rm) create
Used with exclusive or hide, removes the objects instead of adding them.
-removeAll(-ra) create
Remove all exclusivity/hidden objects for all cameras.
-removeCamera(-rc) create
Remove all exclusivity/hidden objects for the given camera.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// make 'pSphere1' exclusive to camera 'persp'
perCameraVisibility -ex -c persp pSphere1
// remove 'pSphere1' from camera 'persp''s exclusive objects
perCameraVisibility -ex -rm -c persp pSphere1
// query the objects that are exclusive to 'persp'
perCameraVisibility -q -ex -c persp
// hide 'pSphere1' from camera 'persp'
perCameraVisibility -hi -c persp pSphere1
// remove 'pSphere1' from camera 'persp''s hidden objects
perCameraVisibility -hi -rm -c persp pSphere1
// query the objects that are hidden from 'persp'
perCameraVisibility -q -hi -c persp
// remove all exclusive or hidden objects from 'persp'
perCameraVisibility -rc -c persp
// remove all exclusive or hidden objects from all cameras
perCameraVisibility -ra