pymel.core.rendering.imagePlane

imagePlane(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
camera (c) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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 ../../../_images/edit.gif
 

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 ../../../_images/query.gif
 
Query the ‘drop frame’ flag of the movie’s timecode format.
fileName (fn) unicode ../../../_images/create.gif ../../../_images/edit.gif
 
Set the image name for image plane to read.
frameDuration (fd) int ../../../_images/query.gif
 
Query the frame duration of the movie’s timecode format.
height (h) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Height of the image plane. When creating, if this flag is not specified, it will use 10.0 as default height.
imageSize (iz) int, int ../../../_images/query.gif
 
Get size of the loaded image.
lookThrough (lt) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The camera currently used for image plane to look through.
maintainRatio (mr) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Let the image plane respect the picture aspect ratio. When creating, if this flag is not specified, it will use true as default value.
name (n) unicode ../../../_images/create.gif ../../../_images/query.gif
 
Set the image plane node name when creating or return the image plane name when querying.
negTimesOK (nt) bool ../../../_images/query.gif
 
Query the ‘neg times OK’ flag of the movie’s timecode format.
numFrames (nf) int ../../../_images/query.gif
 
Query the whole number of frames per second of the movie’s timecode format.
quickTime (qt) bool ../../../_images/query.gif
 
Query whether the image plane is using a QuickTime movie.
showInAllViews (sia) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The flag is used to show the current image plane in all views or not.
timeCode (tc) int ../../../_images/query.gif
 
Query the whole number of frames per second of the movie’s timecode format.
timeCodeTrack (tt) bool ../../../_images/query.gif
 
Query whether the movie on the image plane has a timecode track.
timeScale (ts) int ../../../_images/query.gif
 
Query the timescale of the movie’s timecode format.
twentyFourHourMax (tf) bool ../../../_images/query.gif
 
Query the ‘24 hour max’ flag of the movie’s timecode format.
width (w) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Width of the image plane. When creating, if this flag is not specified, it will use 10.0 as default width.

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])

Previous topic

pymel.core.rendering.hwRenderLoad

Next topic

pymel.core.rendering.iprEngine

Core

Core Modules

Other Modules

This Page