#include <MPx3dModelView.h>
MPx3dModelView is the class for user defined model views. The MPx3dModelView class works with the MPxModelEditorCommand class to create a user defined model editor that may be used in a window or in a scripted panel. When registering the model editor with the MFnPlugin::registerModelEditorCommand() method, an appropriate MPx3dModelView::creator() method is required. This class works for interactive Maya views and is not designed for rendering.
One of the interesting uses of a MPx3dModelView is that it allows multiple cameras to be drawn into the same window. Like a normal model view, this view has a main camera associated with it. This camera is obtained with the getCamera() method and is the camera used for manipulations and selection.
To setup a multiple camera draw, first the number of passes must be set by an overloaded multipleDrawPassCount() method. The preMultipleDraw() method allows any setup to be performed. The preMultipleDrawPass(unsigned int) is called for each pass, with the argument indicating which pass is currently being used. The camera for the specific pass may be set with the setCameraInDraw() method. The postMultipleDrawPass(unsigned int) method is called after the drawing for the indicated pass is complete. Finally any cleanup may be done with the postMultipleDraw() method.
During the drawing, a filter exists to determine which items should be drawn. The okForMultipleDraw(MdagPath &) allows filtering of what should be drawn. Another approach which is faster is to tuen on the view selected mode (setViewSelected()) and use the setObjectsToView() or viewSelectedSet() to specify which items should be drawn. These values may be set per pass so that each camera has control over what gets drawn.
MPx3dModelView::MPx3dModelView | ( | ) |
class constructor
MPx3dModelView::~MPx3dModelView | ( | ) | [virtual] |
class destructor
Returns the name of the view.
[out] | ReturnStatus | status |
MString MPx3dModelView::viewType | ( | ) | const [virtual] |
Returns a string specifying the view type. The view type should be a different string for every class derived from MPx3dModelView. The default type is "MPx3dModelView".
void MPx3dModelView::preMultipleDraw | ( | ) | [virtual] |
This method is called before any drawing is performed in the model view. It should control any setting required for every pass that will be drawn.
void MPx3dModelView::postMultipleDraw | ( | ) | [virtual] |
This method is called after the drawing is finished. Any cleanup should be done by this method.
void MPx3dModelView::preMultipleDrawPass | ( | unsigned int | index | ) | [virtual] |
This method is called immediately before a specific pass is about to be drawn. The unsigned int argument indictates which pass is about to be drawn.
Typically the camera (set with the setCameraInDraw method) and any pass specific settings would be made here.
[in] | index | A number indicating which pass is about to be drawn. |
void MPx3dModelView::postMultipleDrawPass | ( | unsigned int | index | ) | [virtual] |
This method is called when a specified pass is finshed.
[in] | index | A number indicating which pass was just drawn. |
bool MPx3dModelView::okForMultipleDraw | ( | const MDagPath & | dp | ) | [virtual] |
This method provides some filter capabilities as to what is drawn. When ever a draw operation during the multiple camera drawing, this method will get called. If true is returned, then the object will be drawn.
This method is useful for filtering out multiple occurances of manipulators and ground planes.
To reduce the number of objects queried, look at the setViewSelected() method along with the setObjectsToView() method.
[in] | dp | A MDagPath of the object that may be drawn. |
unsigned int MPx3dModelView::multipleDrawPassCount | ( | ) | [virtual] |
This method returns the number of multiple draw passes that are going to be made. By default a 1 is returned.
bool MPx3dModelView::multipleDrawEnabled | ( | ) | const |
This method returns the multiple draw enable state for this view.
void MPx3dModelView::setMultipleDrawEnable | ( | bool | enable | ) |
This method turns enables/disables multiple camera drawing for this view. If multiple draw is disabled, then this view will behave like a normal Maya view.
[in] | enable | If true, then multiple draw is enabled. |
bool MPx3dModelView::destroyOnPanelDestruction | ( | ) | const |
This method queries the destruction setting for this MPx3dModelView which is employed when the panel associated with this view is destroyed.
By choosing to have the MPx3dModelView destroyed along with the panel, you are guaranteed that a new MPx3dModelView will be created the next time the editor is displayed.
void MPx3dModelView::setDestroyOnPanelDestruction | ( | bool | how | ) |
This method enables/disables destruction of the MPx3dModelView object when the panel is destroyed. By default, Maya does not destroy the MPx3dModelView when the panel is destroyed. Example cases of destroying a panel are when you tear off a panel, or close a torn-off panel.
By choosing to have the MPx3dModelView destroyed along with the panel, you are guaranteed that a new MPx3dModelView will be created the next time the editor is displayed.
[in] | how | If true, destroy the MPx3dModelView when the panel is destroyed. If false (the default behaviour), the editor is retained. |
MStatus MPx3dModelView::updateViewingParameters | ( | ) |
This method tells the camera to set the view's transformation matrix.
void MPx3dModelView::removingCamera | ( | MDagPath & | cameraPath | ) | [virtual] |
This method should be overloaded in MPx3dModelView derived classes. It will get called whenever a camera that was used with this MPx3dModelView is deleted. The MPx3dModelView should then remove any reference to the deleted camera.
[in] | cameraPath | The MDagPath for the camera that is about to be deleted. |
MStatus MPx3dModelView::setDoUpdateOnMove | ( | bool | value | ) |
Some viewports require a refresh when the user has moved the top level window. This flag enables this custom view to trigger a refresh event when the top level window of the view is moved to a new location.
The default value for this flag is false.
[in] | value | The state of the doUpdateOnMove flag. |
bool MPx3dModelView::doUpdateOnMove | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the state of the doUpdateOnMove flag. This flag tells the refresh architecture if it is necessary to refresh your view when the user moves the control window for this viewport. If this flag is true, then refresh will be triggered on window move.
[in] | ReturnStatus | return status of the check |
MStatus MPx3dModelView::refresh | ( | bool | all = false , |
|
bool | force = false | |||
) |
Refresh the this view. If all is set to true then all of the 3d-view will be refreshed.
If force is set to true, then the views will be refreshed even if they do not require it. This option should be used with extreme care because extra refreshes will greatly degrade application performance. In almost all cases it is better to use the default behavior where the view is only refreshed if it is required.
[in] | all | If true then refresh all views, otherwise refresh this view. |
[in] | force | If true then force views to refresh even if they do not require it. |
MStatus MPx3dModelView::drawText | ( | const MString & | text, | |
const MPoint | position, | |||
M3dView::TextPosition | textPosition = M3dView::kLeft | |||
) |
Draws the given text at the given spot in the default font. This method is provided as a convienient way to draw OpenGL text.
[in] | text | Text to draw |
[in] | position | Position in space to draw at |
[in] | textPosition | Text position relative to the point |
MStatus MPx3dModelView::beginGL | ( | ) |
Setup port for native OpenGL drawing calls. Only make openGL calls between the beginGL() and endGL() methods. M3dView and MPx3dModelView calls should not be made betwen beginGL() and endGL() calls.
This should only be used if there is not a M3dView or MPx3dModelView method that performs the required task.
MStatus MPx3dModelView::endGL | ( | ) |
End OpenGL drawing.
Sets the camera during a draw. If the normal setCamera() method is used, then that camera will not get its parameters loaded during the draw.
[in] | camera | Dag path of the camera |
Set the camera for this view.
[in] | camera | Dag path of the camera for this view |
Get the camera for this view.
[out] | camera | Dag path for the camera (allocated by caller) |
MString MPx3dModelView::getCameraHUDName | ( | ) | [virtual] |
Return the name to use for the camera in the heads up display.
MStatus MPx3dModelView::setDisplayHUD | ( | bool | enable | ) |
Enables or disables the drawing the heads up display in this view. This method only affects this view and will stop all heads up display elements from being drawn in this view.
[in] | enable | The enable state of the heads up display in this view. |
bool MPx3dModelView::displayHUD | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the heads up display state for this view.
[out] | ReturnStatus | the return status |
MStatus MPx3dModelView::drawHUDNow | ( | ) |
Forces the HUD viewport elements to be drawn immediately. This should only be called when setDrawAdornments has been set to false. And this method should only be called in the postMultiple* draw methods. This allows the drawing of display elements during a specific pass while attached to a specific camera.
MStatus MPx3dModelView::setDrawAdornments | ( | bool | display | ) |
Toggles the control of how adornments are drawn in the view. Adornments are objects that are drawn in the viewport that are not scene entities. This includes the origin axis and the camera decorations like film gate and resolution gate. These items are usually drawn last and outside of the multiple refresh loop. You can choose to disable the drawing of the adornments by specifying false here, and you can control the drawing of the feature within their display loop calling displayAdornmentsNow() method on this class. By default this flag is true; so adornments are always drawn unless explicitly disabled by you.
[in] | display | toggle to control the display of the adornments. |
bool MPx3dModelView::drawAdornments | ( | MStatus * | ReturnStatus = NULL |
) |
Returns the state of the adornment drawing for this view. See setDrawAdornments for more information on adornment drawing.
[out] | ReturnStatus | Status code. |
MStatus MPx3dModelView::drawAdornmentsNow | ( | ) |
Forces the adornment viewport elements to be drawn immediately. This should only be called when setDrawAdornments has been set to false. And this method should only be called in the postMultiple* draw methods. This allows you to draw camera adornments during a specific pass while attached to a specific camera.
MStatus MPx3dModelView::setDisplayAxis | ( | bool | enable | ) |
Sets the axis display in the MPx3dModelView.
[in] | enable | If true, then the axis is displayed. |
bool MPx3dModelView::displayAxisOn | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the axis display state for this MPx3dModelView.
[out] | ReturnStatus | The return status. |
MStatus MPx3dModelView::setDisplayAxisAtOrigin | ( | bool | enable | ) |
Sets the origin axis display in the MPx3dModelView.
[in] | enable | If true, then the origin axis is displayed. |
bool MPx3dModelView::displayAxisAtOriginOn | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the origin axis display state for this MPx3dModelView.
[out] | ReturnStatus | The return status. |
MStatus MPx3dModelView::setDisplayCameraAnnotation | ( | bool | enable | ) |
Sets the camera annotation display in the MPx3dModelView.
[in] | enable | If true, then the camera annotation is displayed. |
bool MPx3dModelView::displayCameraAnnotationOn | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the camera annotation display state for this MPx3dModelView.
[out] | ReturnStatus | The return status. |
bool MPx3dModelView::isVisible | ( | MStatus * | ReturnStatus = NULL |
) | const |
This method returns true if this view is visible, otherwise false is returned.
[out] | ReturnStatus | The return status. |
M3dView::DisplayStyle MPx3dModelView::displayStyle | ( | MStatus * | ReturnStatus = NULL |
) | const |
Return the display style for this 3d view. The display style can be wireframe, flat-shaded, or smooth-shaded.
[out] | ReturnStatus | Status code |
bool MPx3dModelView::isShadeActiveOnly | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns true if this view's display style is shaded for objects that are active and wireframe otherwise.
[out] | ReturnStatus | Status code |
MStatus MPx3dModelView::setDisplayStyle | ( | M3dView::DisplayStyle | style, | |
bool | activeOnly = false | |||
) |
Sets the display style for this view. The display style can be wireframe, flat-shaded, or smooth-shaded.
[in] | style | The display style to be set for this view |
[in] | activeOnly | Specifies whether only active objects are to be shaded in shaded mode. |
int MPx3dModelView::portWidth | ( | MStatus * | ReturnStatus = NULL |
) |
Returns the width of the current viewport.
[out] | ReturnStatus | Status Code |
int MPx3dModelView::portHeight | ( | MStatus * | ReturnStatus = NULL |
) |
Returns the height of the current viewport.
[out] | ReturnStatus | Status Code |
MStatus MPx3dModelView::beginOverlayDrawing | ( | ) |
Setup the OpenGL context for drawing on the overlay plane.
The overlay plane is commonly used for drawing guidelines for tools.
MStatus MPx3dModelView::endOverlayDrawing | ( | ) |
Set the OpenGL context to for normal screen drawing.
MStatus MPx3dModelView::clearOverlayPlane | ( | ) |
Clear the overlay plane.
MStatus MPx3dModelView::setDrawColor | ( | unsigned int | index, | |
M3dView::ColorTable | table = M3dView::kActiveColors | |||
) |
//!//!//!//!//!/
//!//!//!//!//!/
Set the color to draw in. The index argument is an index into the application's color tables. Valid values range between zero and the size of the table minus one. The size of the active and dormant color tables can be found using methods of this class. The background and template color tables are both of size one.
These indices do not directly correspond to those of the underlying OpenGL color index mode. Using the glIndex call directly is not recommended and may cause unpredictable results. This method should be used instead.
Note that this method will work in either RGBA mode or color index mode.
[in] | index | index of the color to draw in |
[in] | table | color table to index into |
Set the color to draw in. This method should only be used in RGBA mode. It is a convenient replacement for glColor.
[in] | color | color to draw in |
bool MPx3dModelView::isColorIndexMode | ( | MStatus * | ReturnStatus = NULL |
) |
Returns true if this view is currently in the OpenGL color index mode. A false return means that it is in RGBA mode.
[out] | ReturnStatus | Status code |
MStatus MPx3dModelView::setColorIndexMode | ( | bool | colorIndexOn | ) |
Sets color index mode - swaps buffers!
[in] | colorIndexOn | Color index mode. |
unsigned int MPx3dModelView::numDormantColors | ( | MStatus * | ReturnStatus = NULL |
) |
Returns the number of dormant object colors in the internal application color table.
[out] | ReturnStatus | Status code |
unsigned int MPx3dModelView::numActiveColors | ( | MStatus * | ReturnStatus = NULL |
) |
Returns the number of active object colors in the internal application color table.
[out] | ReturnStatus | Status code |
unsigned int MPx3dModelView::numUserDefinedColors | ( | MStatus * | ReturnStatus = NULL |
) |
Returns the number of user defined colors in the internal application color table. These colors may be changed by the user and assigned to specific objects. See the methods of MFnDagNode for information on assigning user defined colors to individual objects.
The user defined colors are not a color table of their own. They exist in the active and dormant color tables.
[out] | ReturnStatus | Status code |
Sets the user defined color at the given index. Valid indices range between zero and the number of user defined colors.
[in] | index | index into the user defined color |
[in] | color | color to set to |
unsigned int MPx3dModelView::userDefinedColorIndex | ( | unsigned int | index, | |
MStatus * | ReturnStatus = NULL | |||
) |
Returns the index for the given user-defined color. Valid values for the index argument range between zero and the number of user-defined colors minus one.
The index returned gives the location of the specified color inside the active and dormant color tables (the index is the same in both tables).
[in] | index | Index into user-defined colors |
[out] | ReturnStatus | Status code |
Returns the RGB values of the template color.
[out] | ReturnStatus | Status code |
Returns the RGB values of the active template color.
[out] | ReturnStatus | Status code |
MColor MPx3dModelView::colorAtIndex | ( | unsigned int | index, | |
M3dView::ColorTable | table = M3dView::kActiveColors , |
|||
MStatus * | ReturnStatus = NULL | |||
) |
Returns the RGB values of the color at the given index in the application's color table.
[in] | index | Index of the color to retrieve |
[in] | table | Table to index into |
[out] | ReturnStatus | Status code |
MStatus MPx3dModelView::getColorIndexAndTable | ( | unsigned int | glindex, | |
unsigned int & | index, | |||
M3dView::ColorTable & | table | |||
) | const |
Returns the color table and index representing the given OpenGL color-index value. This method is useful when converting color indices obtained from glReadPixels(GL_COLOR_INDEX) to Maya color-index values suitable for use with the colorAtIndex and setDrawColor methods.
[in] | glindex | Value of the OpenGL color-index to retrieve |
[out] | index | Returned ColorTable index |
[out] | table | Returned ColorTable |
MStatus MPx3dModelView::viewToWorld | ( | short | x_pos, | |
short | y_pos, | |||
MPoint & | worldPt, | |||
MVector & | worldVector | |||
) | const |
Takes a point in port coordinates and returns a corresponding ray in world coordinates.
[in] | x_pos | the x position of the point in port coordinates |
[in] | y_pos | the y position of the point in port coordinates |
[out] | worldPt | (returned) the source of the ray |
[out] | worldVector | (returned) the direction of the ray |
MStatus MPx3dModelView::viewToWorld | ( | short | x_pos, | |
short | y_pos, | |||
MPoint & | nearClipPt, | |||
MPoint & | farClipPt | |||
) | const |
Takes a point in port coordinates and returns a point on the near and far clipping planes.
[in] | x_pos | the x position of the point in port coordinates |
[in] | y_pos | the y position of the point in port coordinates |
[out] | nearClipPt | (returned) point on near clipping plane |
[out] | farClipPt | (returned) point on far clipping plane |
MStatus MPx3dModelView::viewToObjectSpace | ( | short | x_pos, | |
short | y_pos, | |||
const MMatrix & | localMatrixInverse, | |||
MPoint & | oPt, | |||
MVector & | oVector | |||
) | const |
Takes a point in port coordinates and returns a corresponding ray in object coordinates.
[in] | x_pos | the x position of the point in port coordinates |
[in] | y_pos | the y position of the point in port coordinates |
[in] | localMatrixInverse | the inclusive matrix inverse of the object in question |
[out] | oPt | (returned) the source of the ray in object space |
[out] | oVector | (returned) the direction of the ray in object space |
bool MPx3dModelView::worldToView | ( | const MPoint & | worldPt, | |
short & | x_pos, | |||
short & | y_pos, | |||
MStatus * | ReturnStatus = NULL | |||
) | const |
converts a point in world space to port space. The return value indicates if the point is not clipped.
[in] | worldPt | the point to world space |
[out] | x_pos | the x position of the point in port coordinates |
[out] | y_pos | the y position of the point in port coordinates |
[out] | ReturnStatus | Status code |
MStatus MPx3dModelView::setObjectDisplay | ( | M3dView::DisplayObjects | displayType, | |
bool | display | |||
) |
Sets the display option for various types of objects. By default everything is displayed.
[in] | displayType | The type of object to display |
[in] | display | Should the object type be displayed? |
bool MPx3dModelView::objectDisplay | ( | M3dView::DisplayObjects | dispObjs, | |
MStatus * | ReturnStatus = NULL | |||
) |
Returns true is the passed flag is set.
[out] | ReturnStatus | the return status |
MStatus MPx3dModelView::setBackfaceCulling | ( | bool | culling | ) |
Sets backface culling.
[in] | culling | sets the backface culling state |
bool MPx3dModelView::isBackfaceCulling | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the state of backface culling.
[out] | ReturnStatus | return status |
MStatus MPx3dModelView::setWireframeOnShaded | ( | bool | onShaded | ) |
Displays as wireframe on shaded.
[in] | onShaded | sets the wireframe on shaded state |
bool MPx3dModelView::isWireframeOnShaded | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the state of wireframe on shaded.
[out] | ReturnStatus | return status |
MStatus MPx3dModelView::setXrayEnabled | ( | bool | xray | ) |
Sets xray display state.
[in] | xray | sets the xray display state |
bool MPx3dModelView::isXrayEnabled | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the state of xray display.
[out] | ReturnStatus | return status |
MStatus MPx3dModelView::setTextureDisplayEnabled | ( | bool | textureDisplay | ) |
Enables texture display
[in] | textureDisplay | sets the texture display state |
bool MPx3dModelView::isTextureDisplayEnabled | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the enable state of texture display.
[out] | ReturnStatus | return status |
MStatus MPx3dModelView::setTwoSidedLighting | ( | bool | twoSided | ) |
Enables two sided lighting.
[in] | twoSided | sets the two sided lighting state |
bool MPx3dModelView::isTwoSidedLighting | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the state of two sided lighting.
[out] | ReturnStatus | return status |
MStatus MPx3dModelView::setLightingMode | ( | MPx3dModelView::LightingMode | lightingMode | ) |
Sets the lighting mode.
[in] | lightingMode | sets the lighting mode |
MPx3dModelView::LightingMode MPx3dModelView::lightingMode | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the lighting mode.
[out] | ReturnStatus | return status |
MStatus MPx3dModelView::setFogEnabled | ( | bool | state | ) |
Enables and disables fog. If fog is enabled for one pass and disabled for another, the background fog will not be drawn. To display background fog in that configuration, use the MPx3dModelView::setBackgroundFogEnabled() call.
[in] | state | true is fog should be on. |
bool MPx3dModelView::isFogEnabled | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns true if fog is enabled.
[out] | ReturnStatus | status |
MPx3dModelView::FogSource MPx3dModelView::fogSource | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the algorithm used to compute fog. See MPx3dModelView::setFogSource for a description.
[out] | ReturnStatus | status |
MStatus MPx3dModelView::setFogSource | ( | MPx3dModelView::FogSource | source | ) |
Sets the type of fog algorithm to use. If the source argument is kFogFragment (default) then fog is computed per pixel. If the argument is kFogCoordinate then if the geometry has specified vertex fog coordinates, and the OpenGL extension for vertex fog is supported by the graphics system, then fog is computed per vertex.
[in] | source | The type of algorithm to use. |
MPx3dModelView::FogMode MPx3dModelView::fogMode | ( | MStatus * | ReturnStatus = NULL |
) | const |
Return the type of drop off used with fog. See MPx3dModelView::setFogMode for description of the drop off types.
[out] | ReturnStatus | status |
MStatus MPx3dModelView::setFogMode | ( | MPx3dModelView::FogMode | mode | ) |
Sets the drop-off mode for fog. The possibilities are:
[in] | mode | The type of drop off to use with fog. |
double MPx3dModelView::fogDensity | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the fog density.
[out] | ReturnStatus | status |
MStatus MPx3dModelView::setFogDensity | ( | double | density | ) |
Determines the density of hardware fogging. This is meaniful for kFogExponential and kFogExponentialSquared drop off types (set by the MPx3dModelView::setFogMode() method).
[in] | density |
double MPx3dModelView::fogStart | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the fog start position.
[out] | ReturnStatus | status |
MStatus MPx3dModelView::setFogStart | ( | double | start | ) |
Determines the start location of hardware fogging. This is meaniful for kFogLinear drop off type (set by the MPx3dModelView::setFogMode() method).
[in] | start |
double MPx3dModelView::fogEnd | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the fog end position.
[out] | ReturnStatus | status |
MStatus MPx3dModelView::setFogEnd | ( | double | end | ) |
Determines the end location of hardware fogging. This is meaniful for kFogLinear drop off type (set by the MPx3dModelView::setFogMode() method).
[in] | end |
Returns the fog color.
[out] | ReturnStatus | status |
Sets the color used for hardware fogging.
[in] | color | The color used by hardware fogging. |
bool MPx3dModelView::isBackgroundFogEnabled | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns true if the background fog is enabled.
[out] | ReturnStatus | status |
MStatus MPx3dModelView::setBackgroundFogEnabled | ( | bool | state | ) |
Enables and disables background fog.
[in] | state | true if background fog should be enabled. |
Returns the prefix used when displaying the camera name in the heads up display when view selected in on.
[out] | ReturnStatus | the return status |
Sets the prefix for the camera name as displayed in the heads up display when view selected is enabled. The prefix is concatenated with the camera name.
The default value is "isolate: "
[in] | prefix | The prefix to use. |
bool MPx3dModelView::viewSelected | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the state of view selected for this view.
[out] | ReturnStatus | return status |
MStatus MPx3dModelView::setViewSelected | ( | bool | enable | ) |
Enables the view selected mode.
[in] | enable | enable or disable view selected mode. |
Returns an MObject for the set used by view selected. If there is not a set associated with this view, then an invalid MObject will be returned. Check the isNull() method of the MObject to see if a valid set was found.
[out] | ReturnStatus | return status |
Returns a set that contains the memebers used by view selected.
[in] | set | The set used by view selected. |
MStatus MPx3dModelView::getObjectsToView | ( | MSelectionList & | list | ) | const |
Returns a selection list containing all of the objects on the view selected list.
[in] | list | The list of objects used by view selected. |
MStatus MPx3dModelView::setObjectsToView | ( | const MSelectionList & | list | ) |
Sets the list of objects used by view selected as a selection list. View selected must be turned on for this to have an effect.
[in] | list | The objects to view with view selected. |
bool MPx3dModelView::hasStereoBufferSupport | ( | ) | const |
Returns true if this 3dModelView is running in stereo buffer mode. This should be used in cases where the API developer has requested to create stereo buffer enabled view. See wantStereoGLBuffer()
Get this MPx3dModelView as a M3dView.
[in] | view | The M3dView to set as this MPx3dModelView |
MPx3dModelView * MPx3dModelView::getModelView | ( | const MString & | name, | |
MStatus * | ReturnStatus = NULL | |||
) | [static] |
Returns a pointer to a MPx3dModelView that has the passed name with the specified type (the same typed when registering the control). If one does not exist, then a NULL pointer is returned.
[in] | name | The name to find |
[out] | ReturnStatus | the return status |
bool MPx3dModelView::wantStereoGLBuffer | ( | ) | const [virtual] |
Users should override this method if they want a stereo buffer enabled MPx3dModelView. You must have a graphics card that can support stereo mode. If your graphics card does not support stereo mode, a non-stereo buffer is created.
MStatus MPx3dModelView::setInStereoDrawMode | ( | bool | flag | ) |
Derived classes should call this method to indicate to Maya whether the view is currently drawing in stereo.
One place where this is useful to know is for playblast which will check the view to see if it is in stereo mode, and enforce rendering of left and right stereo pairs versus mono rendering.
[in] | flag | Flag telling if drawing in stereo mode. |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |