Python API 2.0 Reference
|
Static Public Member Functions | |
def | __new__ () |
def | active3dView () |
def | activeAffectedColor () |
def | activeTemplateColor () |
def | applicationShell () |
def | backgroundColor () |
def | backgroundColorBottom () |
def | backgroundColorTop () |
def | displayStatus () |
def | get3dView () |
def | getM3dViewFromModelEditor () |
def | getM3dViewFromModelPanel () |
def | hiliteColor () |
def | isBackgroundGradient () |
def | leadColor () |
def | liveColor () |
def | numberOf3dViews () |
def | referenceLayerColor () |
def | scheduleRefreshAllViews () |
def | templateColor () |
M3dView provides methods for working with 3D model views.
def OpenMayaUI.M3dView.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
|
static |
Create and return a new object. See help(type) for accurate signature.
|
static |
active3dView() -> M3dView Returns the active view in the form of a class (M3dView) that can operate on it.
|
static |
activeAffectedColor() -> MColor Returns the color for active affected objects.
|
static |
activeTemplateColor() -> MColor Returns the color for active template objects.
|
static |
applicationShell() -> long Returns a long containing a C++ 'void' pointer which points to the native handle for Maya's main window.
|
static |
backgroundColor() -> MColor Returns the value of the background color.
|
static |
backgroundColorBottom() -> MColor Returns the value of the background gradient bottom color.
|
static |
backgroundColorTop() -> MColor Returns the value of the background gradient top color.
def OpenMayaUI.M3dView.beginGL | ( | ) |
(Deprecated: Please use Viewport 2.0 APIs instead.) beginGL() -> self Setup port for native OpenGL drawing calls.
def OpenMayaUI.M3dView.beginProjMatrixOverride | ( | ) |
(Deprecated: Please use MHWRender::MRenderOverride instead.) beginProjMatrixOverride(projectionMatrix) -> self Begin overriding the projection matrix used in openGL drawing. This override is enabled until endProjMatrixOverride() is called. * projectionMatrix (MMatrix) - Projection matrix used in openGL drawing
def OpenMayaUI.M3dView.beginSelect | ( | ) |
beginSelect(buffer=None, size=0) -> self Start selecting. The buffer passed is used to record selection hits. * buffer (bytearray) - OpenGl pick buffer * size (int) - Buffer size
def OpenMayaUI.M3dView.beginXorDrawing | ( | ) |
beginXorDrawing(drawOrthographic=True, disableDepthTesting=True, lineWidth=1.0, stipplePattern=kStippleNone, lineColor=MColor(1, 1, 1)) -> self Setup the context for exclusive-or (XOR) drawing. In XOR drawing the color values of the pixels being drawn is exclusive-ored with the color values already present in the view. The advantage of this is that exclusive-oring the same pixels with the same color values a second time will restore the pixels to their original colors, making it possible to temporarily display and erase lines without having to redraw the entire view. This makes XOR drawing particularly useful for drawing guidelines for tools. One disadvantage of XOR drawing is that the final color after the exclusive-or will not match your drawing color, except when the original color of the pixel was black. For example, XORing a white line across a red background will result in a cyan line and XORing it across a changing background will result in a line of changing colors. However in most situations where you would use XOR drawing the color of the lines is irrelevant just so long as they are visible. It is an error to call beginXorDrawing() again before calling endXorDrawing() first. * drawOrthographic (bool) - Draw using orthographic projection. Default is True. * disableDepthTesting (bool) - Disable depth testing during draw. Default is True. * lineWidth (float) - Set up line width. Default is 1. * stipplePattern (int) - Line stipple pattern. Default is kStippleNone. * lineColor (MColor) - Line color. Default is white (1,1,1). Valid stipple patterns: kStippleNone No stipple. Solid line kStippleDashed Dashed line stipple
def OpenMayaUI.M3dView.colorAtIndex | ( | ) |
colorAtIndex(index, table=kActiveColors) -> MColor Returns the value of the color at the given index in the application's color table. * index (int) - Index of the color to retrieve * table (int) - Table to index into Valid color tables: kActiveColors Colors for active objects kDormantColors Colors for dormant objects kTemplateColor Colors for templated objects kBackgroundColor Colors for background color
def OpenMayaUI.M3dView.colorMask | ( | ) |
(Deprecated: Please use MHWRender::MUIDrawManager instead.) colorMask() -> [bool, bool, bool, bool] Get the current color mask
def OpenMayaUI.M3dView.deviceContext | ( | ) |
deviceContext() -> long Returns a long containing a C++ 'void' pointer which points to the Windows device context for this view.
def OpenMayaUI.M3dView.disallowPolygonOffset | ( | ) |
disallowPolygonOffset() -> bool Returns the current state of the disallow polygon offset bit. See setDisallowPolygonOffset for more information.
def OpenMayaUI.M3dView.display | ( | ) |
display() -> long Returns a long containing a C++ 'void' pointer which points to the OpenGL context for this view. On 32-bit OS X this is an AGLContext. On 64-bit OS X this is an NSOpenGLContext pointer. On Windows this is an HGLRC.
|
static |
displayStatus(path) -> int Returns the display status of the given DAG path. * path (MDagPath) - the DAG path to get. Valid display status: kActive Object is active (selected). kLive Object is live (construction surface). kDormant Object is dormant. kInvisible Object is invisible (not drawn). kHilite Object is hilited (has selectable components). kTemplate Object is templated (Not renderable). kActiveTemplate Object is active and templated. kActiveComponent Object has active components. kLead Last selected object. kIntermediateObject Construction object (not drawn). kActiveAffected Affected by active object(s). kNoStatus Object does not have a valid display status.
def OpenMayaUI.M3dView.displayStyle | ( | ) |
displayStyle() -> int Return the display style for this 3d view. kBoundingBox Bounding box display. kFlatShaded Flat shaded display. kGouraudShaded Gouraud shaded display. kWireFrame Wire frame display. kPoints Points only display.
def OpenMayaUI.M3dView.drawText | ( | ) |
(Deprecated: Please use MHWRender::MUIDrawManager in a MHWRender::MHUDRender operation instead.) drawText(text, position, textPosition=kLeft) -> self Draws the given text at the given spot in the default font. This method is provided as a convienient way to draw OpenGL text. * text (string) - Text to draw * position (MPoint) - Position in space to draw at * textPosition (int) - Text position relative to the point Valid textPosition values: kLeft Draw text to the left of the point kCenter Draw text centered around the point kRight Draw text to the right of the point
def OpenMayaUI.M3dView.endGL | ( | ) |
(Deprecated: Please use Viewport 2.0 APIs instead.) endGL() -> self End OpenGL drawing.
def OpenMayaUI.M3dView.endProjMatrixOverride | ( | ) |
(Deprecated: Please use MHWRender::MRenderOverride instead.) endProjMatrixOverride() -> self End projection matrix override enabled by beginProjMatrixOverride().
def OpenMayaUI.M3dView.endSelect | ( | ) |
endSelect() -> int Finish a selection sequence. Result is stored in the buffer passed in the beginSelect call.
def OpenMayaUI.M3dView.endXorDrawing | ( | ) |
endXorDrawing() -> self Reset the context to non-exclusive-or (non-XOR) screen drawing. If endXorDrawing() is called without first calling beginXorDrawing() an error will result.
def OpenMayaUI.M3dView.filteredObjectList | ( | ) |
filteredObjectList() -> MSelectionList Returns a selection list containing all of the objects that remain after filtering is applied to the view.
|
static |
get3dView(index) -> M3dView Returns the 3D view at the given index. * index (int) - index of the view to get
def OpenMayaUI.M3dView.getCamera | ( | ) |
getCamera() -> MDagPath Get the camera for this view.
def OpenMayaUI.M3dView.getColorIndexAndTable | ( | ) |
getColorIndexAndTable(glindex) -> [int, int] Returns the index and color table 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. * glindex (int) - Value of the OpenGL color-index to retrieve
def OpenMayaUI.M3dView.getLightCount | ( | ) |
getLightCount(visible=True) -> int Get the number of lights for the view. * visible (bool) - Specify whether to count visible lights only. By Default this is set True.
def OpenMayaUI.M3dView.getLightIndex | ( | ) |
getLightIndex(lightNumber) -> int Get the internal light index for a given light number * lightNumber (int) - Number of the light interested in
def OpenMayaUI.M3dView.getLightingMode | ( | ) |
getLightingMode() -> int Get the current lighting mode for the view: kLightAll All lights kLightSelected Selected lights kLightActive Active lights kLightDefault Default light kUnused1 Not currently used in Maya kLightNone No lights / lighting disabled
def OpenMayaUI.M3dView.getLightPath | ( | ) |
getLightPath(lightNumber) -> MDagPath Get the path to a certain light. * lightNumber (int) - Number of the light interested in
|
static |
getM3dViewFromModelEditor(name) -> M3dView Given the name of a model editor, get the M3dView used by that editor. If this fails, then a editor with the given name could not be located. * name (string) - The name of the model editor.
|
static |
getM3dViewFromModelPanel(name) -> M3dView Given the name of a model panel, get the M3dView used by that panel. If this fails, then a panel with the given name could not be located. * name (string) - The name of the model panel.
def OpenMayaUI.M3dView.getRendererName | ( | ) |
getRendererName() -> int Get the name of the current renderer being used for drawing to this view: kDefaultQualityRenderer Equivalent to when the renderer name is "base_OpenGL_Renderer" when queried from the "modelEditor" command kHighQualityRenderer Equivalent to when the renderer name is "hwRender_OpenGL_Renderer" when queried from the "modelEditor" command kViewport2Renderer Equivalent to the viewport 2.0 renderer kExternalRenderer An externally defined renderer name has been set.
def OpenMayaUI.M3dView.getScreenPosition | ( | ) |
getScreenPosition() -> [int, int] Returns the current position of this view window in screen coordinates. This is useful for finding out the exact location of the window as it appears on the screen. These values are in UI coordinate space so the y value increases from bottom to top.
|
static |
hiliteColor() -> MColor Returns the color for hilited objects.
def OpenMayaUI.M3dView.initNames | ( | ) |
initNames() -> self Reset the name stack. Valid only when beginSelect() has been called.
|
static |
isBackgroundGradient() -> bool Returns whether a gradient is being used as the background color.
def OpenMayaUI.M3dView.isLightVisible | ( | ) |
isLightVisible(lightNumber) -> bool Find out if a light is visible in the view * lightNumber (int) - Number of the light interested in
def OpenMayaUI.M3dView.isShadeActiveOnly | ( | ) |
isShadeActiveOnly() -> bool Returns True if this view's display style is shaded for objects that are active and wireframe otherwise.
def OpenMayaUI.M3dView.isVisible | ( | ) |
isVisible() -> bool Returns True if this viewport is visible.
|
static |
leadColor() -> MColor Returns the color for lead objects.
|
static |
liveColor() -> MColor Returns the color for live objects.
def OpenMayaUI.M3dView.loadName | ( | ) |
loadName(int) -> self Replace the top of the name stack with the given name. Valid only when beginSelect() has been called. * name (int) - Name to be loaded onto the top of the stack.
def OpenMayaUI.M3dView.modelViewMatrix | ( | ) |
modelViewMatrix() -> MMatrix Returns the modelview matrix currently being used by OpenGL in the current view
def OpenMayaUI.M3dView.multipleDrawEnabled | ( | ) |
multipleDrawEnabled() -> bool This method returns the multiple draw enable state for this view.
def OpenMayaUI.M3dView.multipleDrawPassCount | ( | ) |
(Deprecated: Please use MHWRender::MRenderOverride instead.) multipleDrawPassCount() -> int This method returns the number of multiple draw passes that are going to be made. By default a 1 is returned.
def OpenMayaUI.M3dView.numActiveColors | ( | ) |
numActiveColors() -> int Returns the number of active object colors in the internal application color table.
|
static |
numberOf3dViews() -> int Returns the number of 3D views currently in existance.
def OpenMayaUI.M3dView.numDormantColors | ( | ) |
numDormantColors() -> int Returns the number of dormant object colors in the internal application color table.
def OpenMayaUI.M3dView.numUserDefinedColors | ( | ) |
numUserDefinedColors() -> int 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.
def OpenMayaUI.M3dView.objectDisplay | ( | ) |
objectDisplay() -> int Returns a display object mask that indicates which object types are drawn in the current view: kDisplayEverything Show everything kDisplayNurbsCurves Show nurbs curves kDisplayNurbsSurfaces Show nurbs surfaces kDisplayMeshes Show meshes kDisplayPlanes Show planes kDisplayLights Show lights kDisplayCameras Show camera kDisplayJoints Show joints kDisplayIkHandles Show IK handles kDisplayDeformers Show deformers kDisplayDynamics Show dynamics kDisplayLocators Show locators kDisplayDimensions Show dimensions kDisplaySelectHandles Show selection handles kDisplayPivots Show pivots kDisplayTextures Show textures kDisplayGrid Show the grid kDisplayCVs Show NURBS CVs kDisplayHulls Show NURBS hulls kDisplayStrokes Show strokes kDisplaySubdivSurfaces Show subdivision surfaces kDisplayFluids Show fluids kDisplayFollicles Show follcles kDisplayHairSystems Show hair systems kDisplayImagePlane Show image plane kDisplayNCloths Show nCloths kDisplayNRigids Show nRigids kDisplayDynamicConstraints Show nDynamicConstraints kDisplayManipulators Show Manipulators kDisplayNParticles Show nParticles kExcludeMotionTrails Show motion trails kExcludePluginShapes Show plugin shapes
def OpenMayaUI.M3dView.objectListFilterName | ( | ) |
objectListFilterName() -> string Get the current object list filter name. If none then an emptystring will be returned.
def OpenMayaUI.M3dView.playblastPortHeight | ( | ) |
playblastPortHeight() -> int Returns the port height of current playblast. Valid only when playblast command has been called. Otherwise, an invalid value 0 is returned.
def OpenMayaUI.M3dView.playblastPortWidth | ( | ) |
playblastPortWidth() -> int Returns the port width of current playblast. Valid only when playblast command has been called. Otherwise, an invalid value 0 is returned.
def OpenMayaUI.M3dView.pluginObjectDisplay | ( | ) |
pluginObjectDisplay(pluginDisplayFilter) -> bool Returns True if the plugin display filter specified by the pluginDisplayFilter is enabled in the current view. * pluginDisplayFilter (string) - The name of the plugin display filter.
def OpenMayaUI.M3dView.popName | ( | ) |
popName() -> self Removes the top of the name stack. Valid only when beginSelect() has been called.
def OpenMayaUI.M3dView.popViewport | ( | ) |
popViewport() -> self Pops the current viewport off of the viewport stack.
def OpenMayaUI.M3dView.portHeight | ( | ) |
portHeight() -> int Returns the height of the current viewport.
def OpenMayaUI.M3dView.portWidth | ( | ) |
portWidth() -> int Returns the width of the current viewport.
def OpenMayaUI.M3dView.projectionMatrix | ( | ) |
projectionMatrix() -> MMatrix Returns the projection matrix currently being used by OpenGL in the current view
def OpenMayaUI.M3dView.pushName | ( | ) |
pushName(int) -> self Pushes a new name on the name stack. Valid only when beginSelect() has been called. * name (int) - Name to be loaded onto the top of the stack.
def OpenMayaUI.M3dView.pushViewport | ( | ) |
pushViewport(x, y, width, height) -> self Set the current viewport dimensions. Will keep track of the last viewport dimensions on a stack. When finished with this viewport, the current dimensions should be removed from the top of stack using M3dView.popViewport(). * x (int) - Lower left corner of viewport (x coordinate). * y (int) - Lower left corner of viewport (y coordinate). * width (int) - Width of the viewport. * height (int) - Height of the viewport.
def OpenMayaUI.M3dView.readBufferTo2dTexture | ( | ) |
(Deprecated: Please use MHWRender::MRenderTargetManager instead.) readBufferTo2dTexture(x, y, width, height) -> self Read the depth values from the frame buffer for a given view into a predefined OpenGL 2d texture. It is assumed that such a texture has been created and bound before making this call. * x (int) - Start position x to read. * y (int) - Start position y to read. * width (int) - Number of pixels in x to read. * height (int) - Number of pixels in y to read.
def OpenMayaUI.M3dView.readColorBuffer | ( | ) |
(Deprecated: Please use MHWRender::MRenderTargetManager::acquireRenderTarget() instead.)readColorBuffer(image, readRGBA=False) -> self Read the RGB values from the frame buffer for a given view. The buffer is read in a pixel format which is BGRA by default, such that each channel is one byte in size. * image (MImage) - The image contains the frame buffer pixels. * readRGBA (bool) - Read the image back in RGBA format. By default the format is BGRA.
def OpenMayaUI.M3dView.readDepthMap | ( | ) |
(Deprecated: Please use MHWRender::MRenderTargetManager::acquireRenderTarget() instead.) readDepthMap(x, y, width, heigth, bufferPtr, depthMapPrecision) -> self Read the depth values from the frame buffer for a given view. The buffer is read into a block of data as defined as an argument. The data block size must be large enough to accomodate ( view width * view height * depth map precision ) bytes of data. * x (int) - Start position x to read. * y (int) - Start position y to read. * width (int) - Number of pixels in x to read. * height (int) - Number of pixels in y to read. * bufferPtr (byterray) - Pointer to depth data allocated by the caller. * depthMapPrecision (int) - Enumerated depth precision: kDepth_8 8 bits. kDepth_Float Floating point.
|
static |
referenceLayerColor() -> MColor Returns the color for objects which belong to a display layer whose display type is Reference. This color is also used for objects whose display override is set to Reference.
def OpenMayaUI.M3dView.refresh | ( | ) |
refresh(all=False, force=False, offscreen=False) -> self Refresh the this view. * all (bool) - If True then refresh all views, otherwise refresh this view. * force (bool) - If True then force views to refresh even if they do not require it. * offscreen (bool) - Should the buffer be redrawn if it's offscreen?
def OpenMayaUI.M3dView.rendererString | ( | ) |
rendererString() -> string Get the string name of the current renderer being used for drawing to this view
def OpenMayaUI.M3dView.renderOverrideName | ( | ) |
renderOverrideName() -> string Get the current render override name. If none then an empty string will be returned.
def OpenMayaUI.M3dView.scheduleRefresh | ( | ) |
scheduleRefresh() -> self Schedule a forced refresh for this 3d-view. This method may be called safely at any time from any thread. The refresh will occur on the main thread when Maya next becomes idle. If a refresh has already been scheduled for this view but has not yet occurred then this method will do nothing.
|
static |
scheduleRefreshAllViews() -> None Schedule a forced refresh for all 3d-views. This method may be called safely at any time from any thread. The refresh will occur on the main thread when Maya next becomes idle. If a refresh has already been scheduled but has not yet occurred then this method will do nothing.
def OpenMayaUI.M3dView.selectMode | ( | ) |
selectMode() -> bool Tells if this M3dView is in selection mode.
def OpenMayaUI.M3dView.setCamera | ( | ) |
setCamera(camera) -> self Set the camera for this view. * camera (MDagPath) - Dag path of the camera for this view
def OpenMayaUI.M3dView.setColorMask | ( | ) |
(Deprecated: Please use MHWRender::MUIDrawManager instead.) setColorMask(r, g, b, a) -> self Set the current color mask. * r (bool) - Red color mask flag. * g (bool) - Green color mask flag. * b (bool) - Blue color mask flag. * a (bool) - Alpha color mask flag.
def OpenMayaUI.M3dView.setDisallowPolygonOffset | ( | ) |
setDisallowPolygonOffset(v) -> self Certain Maya actions will use glPolygonOffset to offset polygons drawing into the depth buffer. This method controls this behavior. When True, it prevents Maya from altering the polygon offset parameters. * v (bool) - enable/disable the polygon offset
def OpenMayaUI.M3dView.setDisplayStyle | ( | ) |
setDisplayStyle(style, activeOnly=False) -> self Sets the display style for this view. * style (int) - The display style to be set for this view See displayStyle() description for a list a valid display style
def OpenMayaUI.M3dView.setDrawColor | ( | ) |
(Deprecated: Please use MUIDrawManager::setColorIndex instead.) setDrawColor(index, table=kActiveColors) -> self setDrawColor(color) -> self 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. * index (int) - index of the color to draw in * table (int) - color table to index into See colorAtIndex() description of a list a valid color table Or Set the color to draw in. It is a convenient replacement for glColor3. * color (MColor) - color to draw in
def OpenMayaUI.M3dView.setDrawColorAndAlpha | ( | ) |
(Deprecated: Please use MUIDrawManager::setColor instead.) setDrawColorAndAlpha(color) -> self Set the color to draw in. It is a convenient replacement for glColor4. * color (MColor) - color to draw in
def OpenMayaUI.M3dView.setMultipleDrawEnable | ( | ) |
(Deprecated: Please use MHWRender::MRenderOverride instead.)setMultipleDrawEnable(enable) -> self This method enables/disables multiple camera drawing for this view. If multiple draw is disabled, then this view will behave like a normal Maya view. * enable (bool) - If True, then multiple draw is enabled.
def OpenMayaUI.M3dView.setMultipleDrawPassCount | ( | ) |
(Deprecated: Please use MHWRender::MRenderOverride instead.) setMultipleDrawPassCount(count) -> self This method sets the number of multiple draw passes when multiple draw is enabled. * count (int) - The number of multiple draw passes.
def OpenMayaUI.M3dView.setObjectDisplay | ( | ) |
setObjectDisplay(displayMask) -> self Sets a display object mask that indicates which object types are drawn in current view. By default every thing is displayed. * displayMask (int) - A combination of display object mask See objectDisplay() description for a list of valid display mask
def OpenMayaUI.M3dView.setObjectListFilterName | ( | ) |
setObjectListFilterName(name) -> self Set the name of the object list filter (MObjectListFilter) to use. The filter must be registered before it can be used. If the name is an empty string then any existing filter will be removed. Any previously set filter will be replaced with the new one. * name (string) - Name of the filter.
def OpenMayaUI.M3dView.setPluginObjectDisplay | ( | ) |
setPluginObjectDisplay(pluginDisplayFilter, on) -> self Enables or disables a user-defined display filter (i.e. one which was registered using MFnPlugin.registerDisplayFilter() or the 'pluginDisplayFilter' command). In Default Viewport, the plug-in will have to check the state of the user-defined display filter in the node's draw code. In Viewport 2.0, nodes will be filtered automatically based on the classification associated with the filter. During selection/snapping, the plugin will have to check the state of the filter in the node's select/snap code. * pluginDisplayFilter (string) - The name of the plugin display filter. * on (bool) - Enable or disable the plugin display filter.
def OpenMayaUI.M3dView.setRenderOverrideName | ( | ) |
setRenderOverrideName(name) -> self Set the name of a render override (MRenderOverride) to use. The override must be registered before it can be used. The override cannot be set unless the view is set to be using the Viewport 2.0 renderer. If the override name is an empty string then the any existing override will be removed. * name (string) - name Name of the override.
def OpenMayaUI.M3dView.setShowObjectFilterNameInHUD | ( | ) |
setShowObjectFilterNameInHUD(show) -> self Sets whether or not to display the object filter UI name in the heads up display when an object filter is active. This string is concatenated with the camera name. * show (bool) - If True, show the filter UI name in the HUD
def OpenMayaUI.M3dView.setShowViewSelectedChildren | ( | ) |
setShowViewSelectedChildren(show) -> self This method changes the way that view selected works. By default, view selected with show all of the children of the objects in the view selected set. If False is passed to this method, then only the obejcts in the view selected set and their shapes will be drawn. * show (bool) - True if all of the children of view selected objects should be displayed. True is the default behavior for view selected.
def OpenMayaUI.M3dView.setUserDefinedColor | ( | ) |
setUserDefinedColor(index, color) -> self Sets the user defined color at the given index. Valid indices range between zero and the number of user defined colors. Returns an index into the application's color table * index (int) - index into the user defined color * color (MColor) - color to set to
def OpenMayaUI.M3dView.setViewSelectedPrefix | ( | ) |
setViewSelectedPrefix(prefix) -> self 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: " * prefix (string) - The prefix to use.
def OpenMayaUI.M3dView.showObjectFilterNameInHUD | ( | ) |
showObjectFilterNameInHUD() -> bool Returns whether the object filter UI name is shown in the heads up display when an object filter is active.
def OpenMayaUI.M3dView.showViewSelectedChildren | ( | ) |
showViewSelectedChildren() -> bool Returns turn if view selected shows all of the children of the obejcts that are flagged for view selected.
|
static |
templateColor() -> MColor Returns the value of the template color.
def OpenMayaUI.M3dView.textureMode | ( | ) |
textureMode() -> bool Tells if this M3dView is in texture mode.
def OpenMayaUI.M3dView.twoSidedLighting | ( | ) |
twoSidedLighting() -> bool Return True if the Two-sided lighting mode is enabled.
def OpenMayaUI.M3dView.updateViewingParameters | ( | ) |
updateViewingParameters() -> self This method tells the camera to set the view's transformation matrix.
def OpenMayaUI.M3dView.userDefinedColorIndex | ( | ) |
userDefinedColorIndex(index) -> int 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). * index (int) - Index into user-defined colors
def OpenMayaUI.M3dView.usingDefaultMaterial | ( | ) |
usingDefaultMaterial() -> bool Returns True if the view is currently displaying objects using the default material.
def OpenMayaUI.M3dView.usingMipmappedTextures | ( | ) |
usingMipmappedTextures() -> bool Returns if the view is using mipmapped texture display.
def OpenMayaUI.M3dView.viewIsFiltered | ( | ) |
viewIsFiltered() -> bool Returns True if the view is filtered.
def OpenMayaUI.M3dView.viewport | ( | ) |
viewport() -> [int, int, int, int] Get the current viewport dimensions.
def OpenMayaUI.M3dView.viewSelectedPrefix | ( | ) |
viewSelectedPrefix() -> string Returns the prefix used when displaying the camera name in the heads up display when view selected in on
def OpenMayaUI.M3dView.viewToObjectSpace | ( | ) |
viewToObjectSpace(x_pos, y_pos, localMatrixInverse, oPt, oVector) -> self Takes a point in port coordinates and returns a corresponding ray in object coordinates. * x_pos (int) - the x position of the point in port coordinates * y_pos (int) - the y position of the point in port coordinates * localMatrixInverse (MMatrix) - the inclusive matrix inverse of the object in question * oPt [OUT] (MPoint) - the source of the ray in object space * oVector [OUT] (MVector) - the direction of the ray in object space
def OpenMayaUI.M3dView.viewToWorld | ( | ) |
viewToWorld(x_pos, y_pos, worldPt, worldVector) -> self viewToWorld(x_pos, y_pos, nearClipPt, farClipPt) -> self Takes a point in port coordinates and returns a corresponding ray in world coordinates. * x_pos (int) - the x position of the point in port coordinates * y_pos (int) - the y position of the point in port coordinates * worldPt [OUT] (MPoint) - the source of the ray * worldVector [OUT] (MVector) - the direction of the ray Or Takes a point in port coordinates and returns a point on the near and far clipping planes. * x_pos (int) - the x position of the point in port coordinates * y_pos (int) - the y position of the point in port coordinates * nearClipPt [OUT] (MPoint) - point on near clipping plane * farClipPt [OUT] (MPoint) - point on far clipping plane
def OpenMayaUI.M3dView.widget | ( | ) |
widget() -> long Returns a long containing a C++ 'void' pointer which points to the view's Qt widget.
def OpenMayaUI.M3dView.window | ( | ) |
window() -> long Returns a long containing a C++ 'void' pointer which points to the native window for this view.
def OpenMayaUI.M3dView.wireframeOnlyInShadedMode | ( | ) |
wireframeOnlyInShadedMode() -> bool Return whether we are in shaded mode, but that only non shaded drawing should occur (wireframe). In general it will return True only when the current renderer is "hwRender_OpenGL_Renderer". See the M3dView.rendererString() method for more details.
def OpenMayaUI.M3dView.wireframeOnShaded | ( | ) |
wireframeOnShaded() -> bool Return whether we draw wireframe in shaded mode.
def OpenMayaUI.M3dView.worldToView | ( | ) |
worldToView(worldPt) -> [int, int, bool] Converts a point in world space to port space. Returns the x and y coordinates of the world point in port space and if the point is not clipped. * worldPt (MPoint) - the point to world space
def OpenMayaUI.M3dView.writeColorBuffer | ( | ) |
(Deprecated: Please use MHWRender::MQuadRender operation inside MHWRender::MRenderOverride instead.) writeColorBuffer(image, x=0, y=0) -> self Overwrite the RGB values for the frame buffer for a given view. Expected input is a block of RGBA, such that each channel is one byte in size. * image (MImage) - The image containing the block of pixels to write * x (int) - The location in screen space of the lower left corner (X) of the image to write. The default value is 0. * y (int) - The location in screen space of the lower left corner (Y) of the image to write. The default value is 0.
def OpenMayaUI.M3dView.xray | ( | ) |
xray() -> bool Return True if the X-Ray mode is enabled.
def OpenMayaUI.M3dView.xrayJoints | ( | ) |
xrayJoints() -> bool Return True if the X-Ray Joints mode is enabled.