Display Commands#
Display commands control mmSolver’s custom Viewport 2.0 renderers. Two renderers are provided — MM Standard Renderer and MM Silhouette Renderer — each registered as a Viewport 2.0 override and documented in detail in Viewport Renderers.
Each renderer exposes a thin Maya command that forces a refresh of the
active 3D view. Settings for the Silhouette Renderer are stored on the
mmRenderGlobalsSilhouette node and adjusted via setAttr.
mmRendererStandard Command#
mmRendererStandard triggers a forced refresh of the active Viewport
2.0 panel when the MM Standard Renderer is active. It supports
-query mode (no flags beyond enabling query are defined). The
command is not undoable.
See Viewport Renderers for how to activate and use the MM Standard Renderer.
Flags#
The command accepts -query mode only. No additional flags are
defined; calling the command refreshes the active view.
Return#
Returns nothing.
Example#
Python Example:
import maya.cmds
# Force a refresh of the active view.
maya.cmds.mmRendererStandard()
MEL Example:
mmRendererStandard;
mmRendererSilhouette Command#
mmRendererSilhouette triggers a forced refresh of the active
Viewport 2.0 panel when the MM Silhouette Renderer is active. It
supports -query mode (no flags beyond enabling query are defined).
The command is not undoable.
The silhouette effect is configured through the
mmRenderGlobalsSilhouette node, which is created automatically when
the renderer is first activated. Use setAttr to change the
settings described below.
See MM Silhouette Renderer for full usage instructions and a description of each setting.
Flags#
The command accepts -query mode only. No additional flags are
defined; calling the command refreshes the active view.
mmRenderGlobalsSilhouette Node Attributes#
The silhouette settings live on the mmRenderGlobalsSilhouette node.
Attribute |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
|
Toggle the silhouette effect on or off. |
|
bool |
|
Use the |
|
float |
|
Depth separation between solid and wireframe geometry. |
|
float |
|
Width of silhouette lines. |
|
float3 |
|
Silhouette line colour (green by default). |
|
float |
|
Opacity of silhouette lines. |
|
enum |
|
Back-face culling; |
|
uint8 |
|
Limit rendering to the first N operations (debug). |
Return#
Returns nothing.
Example#
Python Example:
import maya.cmds
# Force a refresh of the active view.
maya.cmds.mmRendererSilhouette()
# Change the silhouette colour to red.
maya.cmds.setAttr('mmRenderGlobalsSilhouette.color', 1, 0, 0, type='double3')
# Increase line width.
maya.cmds.setAttr('mmRenderGlobalsSilhouette.width', 3.0)
# Disable the effect temporarily.
maya.cmds.setAttr('mmRenderGlobalsSilhouette.enable', False)
MEL Example:
mmRendererSilhouette;
// Change silhouette colour to red.
setAttr mmRenderGlobalsSilhouette.color -type double3 1 0 0;
// Increase line width.
setAttr mmRenderGlobalsSilhouette.width 3.0;
// Disable the effect temporarily.
setAttr mmRenderGlobalsSilhouette.enable false;