The imagePlane command allows querying of various properties of an image plane and any movie in use by the image plane. It also supports creating and edit. The object passed to the command may either be an imagePlane node, or a camera, in which case the command uses the image plane attached to the camera (if any). If no object is passed in, the current selection is used. Currently, most movie related queries work only on 64 bit Windows systems.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
camera (c) | unicode | ||
When creating, it will try to attach the created the image plane to the specified camera. If the given camera is invalid, creating will fail. When querying, it will query which camera current image plane is attaching to. If it has no camera attaches to(like free image plane), it will return empty string. When edit, it will make the image plane attach to the new specified camera. If the camera given is invalid, it will do nothing. When the image plane is attached to a camera, the image plane’s transform node will be set identity. The detach command will not restore the original position of the image plane. but the undo command will restore the original position of the image plane. |
|||
counter (cn) | bool | ||
Query the ‘counter’ flag of the movie’s timecode format. If this is true, the timecode returned by the -timeCode flag will be a simple counter. If false, the returned timecode will be an array of integers (hours, minutes, seconds, frames). |
|||
detach (d) | bool | ||
This flag can only be used in the edit mode, when this flag is used in edit, it will detach current image plane from any camera it attaches to and make it a free image plane.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
dropFrame (df) | bool | ||
|
|||
fileName (fn) | unicode | ||
|
|||
frameDuration (fd) | int | ||
|
|||
height (h) | float | ||
|
|||
imageSize (iz) | int, int | ||
|
|||
lookThrough (lt) | unicode | ||
|
|||
maintainRatio (mr) | bool | ||
|
|||
name (n) | unicode | ||
|
|||
negTimesOK (nt) | bool | ||
|
|||
numFrames (nf) | int | ||
|
|||
quickTime (qt) | bool | ||
|
|||
showInAllViews (sia) | bool | ||
|
|||
timeCode (tc) | int | ||
|
|||
timeCodeTrack (tt) | bool | ||
|
|||
timeScale (ts) | int | ||
|
|||
twentyFourHourMax (tf) | bool | ||
|
|||
width (w) | float | ||
|
Derived from mel command maya.cmds.imagePlane
Example:
import pymel.core as pm
import maya.cmds as cmds
// create image plane with width and height example
myImagePlane = pm.imagePlane( width=100, height=50 )
// create image plane with width and maintainRatio off
myImagePlane = pm.imagePlane( width=100, maintainRatio=False )
// create free image plane with look through camera specified.
myImagePlane = pm.imagePlane( lookThrough="persp")
// create free image plane with look through camera specified let it only show when looking through this specified camera.
myImagePlane = pm.imagePlane( lookThrough="persp", showInAllViews=false)
// edit image plane example
pm.imagePlane( myImagePlane[1], e=True, w=100, h=200, mr=False ) ;
// edit free image plane with look through camera specified.
myImagePlane = pm.imagePlane( myImagePlane[1], e=True, lookThrough="side")
// query image width height example
pm.imagePlane( myImagePlane[1], q=True, w=True, h=True ) ;
// Create image plane with name
pm.imagePlane( name="Foo") ;
pm.imagePlane( width=100, height=50, name="Foo") ;
// query loaded image ratio
pm.imagePlane( myImagePlane[1], q=True, iz=True );
// Create image plane under a specified camera
camera = pm.camera()
pm.imagePlane(camera=camera[1])