- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Static Public Attributes

# MPxImagePlane Class Reference
OpenMaya - API module for common classes | Proxy classes

This reference page is linked to from the following overview topics: Parent class descriptions, MPxNode and its derived classes.

Search for all occurrences

## Detailed Description

Base class for user defined imagePlane nodes.

MPxImagePlane provides you with the ability to write your own image plane classes. This allows you to support non-standard image data in an image plane or change the standard behaviour of the image plane.

Note, once you have created a custom image plane and created the node in a scene. You must attach the image plane to a camera using the 'imagePlane' attribute on the 'cameraShape'.

Examples:

  customImagePlane.cpp.

`#include <MPxImagePlane.h>`

Inheritance diagram for MPxImagePlane:
[legend]

List of all members.

## Public Member Functions
| MPxImagePlane ()
| Class constructor.
virtual | ~MPxImagePlane ()
| Class destructor.
virtual MPxNode::Type | type () const
| Returns the type of node that this is.
virtual MStatus | loadImageMap (const MString &fileName, int frame, MImage &image)
| Override this method to load the file of name fileName into the image MImage.
bool | getExactImageFile (const MString &refFileName, MString &actualName)
| API users can call this method to resolve a file name.
MString | exactImageFile (const MString &refFileName)
| API users can call this method to resolve a file name.
void | refreshImage ()
| Forces the image plane to be refreshed. Search for all occurrences
void | setImageDirty ()
| Forces the image plane to be reloaded on the next refresh.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.
## Static Public Attributes Search for all occurrences
static MObject | imageType
| controls the source of the image on the Image plane.
static MObject | imageName
| The file name of the image to be used in the image plane.
static MObject | useFrameExtension
| When this is on, the system will substitute the frame number in the Image Name with the number from the Frame Extension attribute (see below). Search for all occurrences
static MObject | frameExtension
| The frame extension in Image Name is replaced by the number here. Search for all occurrences
static MObject | coverage
| Controls the amount of the image that will be used in the image plane. Search for all occurrences
static MObject | coverageX
| The width in pixels of the area on the source image to be used. Search for all occurrences
static MObject | coverageY
| The height in pixels of the area on the source image to be used.
static MObject | coverageOrigin
| Controls the lower-left-corner of the area of the input image that will be used on the image plane. Search for all occurrences
static MObject | coverageOriginX
| The pixel position of the left edge of the area of the source image to be used. Search for all occurrences
static MObject | coverageOriginY
| The pixel position of the bottom edge of the area of the source image to be used.
static MObject | sourceTexture
| If the Type attribute is set to Texture, then this attribute is connected to the texture node used by the image plane. Search for all occurrences
static MObject | fit
| Controls how the image file will be fit into the image plane.
static MObject | displayMode
| Controls how the image plane will be displayed both in the 3d view, and when rendered.
static MObject | displayOnlyIfCurrent
| If enabled, you will only see the image plane when you are looking through the camera that the plane is attached to. Search for all occurrences
static MObject | colorGain
| A multiplier applied to the colors in the image plane. Search for all occurrences
static MObject | colorGainR
| The red component of Color Gain. Search for all occurrences
static MObject | colorGainG
| The green component of Color Gain. Search for all occurrences
static MObject | colorGainB
| The blue component of Color Gain. Search for all occurrences
static MObject | colorOffset
| An additive value applied to the colors in the image plane. Search for all occurrences
static MObject | colorOffsetR
| The red component of Color Offset. Search for all occurrences
static MObject | colorOffsetG
| The green component of Color Offset. Search for all occurrences
static MObject | colorOffsetB
| The blue component of Color Offset. Search for all occurrences
static MObject | alphaGain
| A multiplier that is applied to the alpha value. Search for all occurrences
static MObject | shadingSamplesOverride
| The flag to control if this surface should override global shading sample settings. Search for all occurrences
static MObject | shadingSamples
| Specifies the minimum number of shading samples should be taken for this surface during rendering. Search for all occurrences
static MObject | maxShadingSamples
| Specifies the max number of shading samples can be taken for this surface during rendering. Search for all occurrences
static MObject | lockedToCamera
| If enabled, the image plane is locked to the camera's position. Search for all occurrences
static MObject | depth
| Controls the distance of the plane from the camera. Search for all occurrences
static MObject | squeezeCorrection
| Applies a horizontal scaling to an image. Search for all occurrences
static MObject | size
| Controls the width and height of the image plane. Search for all occurrences
static MObject | sizeX
| Image plane width. Search for all occurrences
static MObject | sizeY
| Image plane height.
static MObject | offset
| Controls how much the center of the image plane is offset from the centre of the viewing frustum of the camera. Search for all occurrences
static MObject | offsetX
| Horizontal component of Offset. Search for all occurrences
static MObject | offsetY
| Vertical component of Offset.
static MObject | center
| Controls the world-space position of the center of the image plane. Search for all occurrences
static MObject | centerX
| X component of Center. Search for all occurrences
static MObject | centerY
| Y component of Center. Search for all occurrences
static MObject | centerZ
| Z component of Center. Search for all occurrences
static MObject | width
| Controls the width of the image plane in world space. Search for all occurrences
static MObject | height
| Controls the height of the image plane in world space.
static MObject | visibleInReflections
| When ray tracing, controls whether the image plane will sppear in reflected surfaces.
static MObject | visibleInRefractions
| When ray tracing, controls whether the image plane will appear when seen through a transparent, refractive surface. Search for all occurrences
static MObject | rotate
| Rotation of the image plane around the view vector.
static MObject | alreadyPremult
| Indicates if the image plane has already been pre-multiplied by its alpha. Search for all occurrences
static MObject | useDepthMap
| Indicates that the image plane has depth information.
static MObject | composite
| Indicates whether or not the image plane's color should be composited into the final image.
static MObject | depthOversample
| Indicates if the depth information is at a higher resolution than the image resolution.
static MObject | separateDepth
| Users can specify a depth buffer that is larger than the image buffer using the 'depthFile' attribute. Search for all occurrences
static MObject | depthFile
| Separate file that contains depth information. Search for all occurrences
static MObject | depthBias
| Depth offset value -- centered at the center of the view frustum. Search for all occurrences
static MObject | depthScale
| Scale the depth -- centered at the center of the view frustum. Search for all occurrences

## Member Function Documentation

MPxNode::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Returns the type of node that this is.

This is used to differentiate user defined nodes that are derived off different MPx base classes.

It is not necessary to override this method.

Returns:
  Type of the node

Reimplemented from MPxNode.

MStatus loadImageMap | ( | const MString & | fileName,
|  | int | frame,
|  | MImage & | image
| ) |  | `[virtual]`

Search for all occurrences

Override this method to load the file of name fileName into the image MImage.

Parameters:

  [in] | fileName | The name of the file to be loaded.
  [in] | frame | The frame number to be displayed.
  [in] | image | The image representing the image plane data.

Returns:
  MStatus::kSuccss The file was successfully loaded.

Examples:
  customImagePlane.cpp.

bool getExactImageFile | ( | const MString & | refFileName,
|  | MString & | actualName
| ) |  |

Search for all occurrences

API users can call this method to resolve a file name.

Sometimes the file path specified by the user node are relative or contain environment variables that require expansion. Also getExactImageFile() will try to find the image file sequence if use sequence is on. API users do not have to call this method, and it is only provided for convienence purposes. The full path name will be returned in actualName.

Python Notes

This method is not supported in Python, see exactImageFile() instead

Parameters:

  [in] | refFileName | The file name to be expanded
  [in] | actualName | The exact file name.

Returns:
  - true The file was found and the file name was expanded.
  - false The file was not found and the file name was not expanded.

MString exactImageFile | ( | const MString & | refFileName | ) |

Search for all occurrences

API users can call this method to resolve a file name.

Sometimes the file path specified by the user node are relative or contain environment variables that require expansion. Also getExactImageFile() will try to find the image file sequence if use sequence is on. API users do not have to call this method, and it is only provided for convienence purposes. The full path name will be returned in actualName.

Parameters:

  [in] | refFileName | The file name to be expanded

Returns:
  String containing the image file name, will be empty string on failure

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

Reimplemented from MPxNode.

## Member Data Documentation

MObject imageName`[static]`

Search for all occurrences

The file name of the image to be used in the image plane.

Only used if Type is set to Image File.

MObject useFrameExtension`[static]`

Search for all occurrences

When this is on, the system will substitute the frame number in the Image Name with the number from the Frame Extension attribute (see below).

MObject coverageOrigin`[static]`

Search for all occurrences

Controls the lower-left-corner of the area of the input image that will be used on the image plane.

MObject sourceTexture`[static]`

Search for all occurrences

If the Type attribute is set to Texture, then this attribute is connected to the texture node used by the image plane.

MObject displayMode`[static]`

Search for all occurrences

Controls how the image plane will be displayed both in the 3d view, and when rendered.

MObject displayOnlyIfCurrent`[static]`

Search for all occurrences

If enabled, you will only see the image plane when you are looking through the camera that the plane is attached to.

MObject offset`[static]`

Search for all occurrences

Controls how much the center of the image plane is offset from the centre of the viewing frustum of the camera.

MObject center`[static]`

Search for all occurrences

Controls the world-space position of the center of the image plane.

MObject visibleInReflections`[static]`

Search for all occurrences

When ray tracing, controls whether the image plane will sppear in reflected surfaces.

MObject visibleInRefractions`[static]`

Search for all occurrences

When ray tracing, controls whether the image plane will appear when seen through a transparent, refractive surface.

MObject alreadyPremult`[static]`

Search for all occurrences

Indicates if the image plane has already been pre-multiplied by its alpha.

MObject composite`[static]`

Search for all occurrences

Indicates whether or not the image plane's color should be composited into the final image.

MObject depthOversample`[static]`

Search for all occurrences

Indicates if the depth information is at a higher resolution than the image resolution.

MObject separateDepth`[static]`

Search for all occurrences

Users can specify a depth buffer that is larger than the image buffer using the 'depthFile' attribute.

MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane
MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane MPxImagePlane