Go to: Synopsis. Return value. Keywords. Flags. Python examples.
ogs([deviceInformation=boolean], [disposeReleasableTextures=boolean], [dumpTexture=string], [enableHardwareInstancing=boolean], [fragmentEditor=string], [fragmentXML=string], [gpuMemoryTotal=int], [gpuMemoryUsed=boolean], [isLegacyViewportEnabled=boolean], [isRemoteGLSessionEnabled=boolean], [isWinRemoteSession=boolean], [pause=boolean], [rebakeTextures=boolean], [regenerateUVTilePreview=string], [reloadTextures=boolean], [reset=boolean], [shaderSource=string], [toggleTexturePaging=boolean], [traceRenderPipeline=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
ogs is NOT undoable, queryable, and NOT editable.
OGS is one of the viewport renderers. As there is a lot of effort involved
in migrating functionality it will evolve over several releases. As it
evolves it is prudent to provide safeguards to get the database back to a
known state. That is the function of this command, similar to how
'dgdirty' is used to restore state to the dependency graph.
string | Result of the operation |
In query mode, return type is based on queried flag.
ogs, debug
deviceInformation, disposeReleasableTextures, dumpTexture, enableHardwareInstancing, fragmentEditor, fragmentXML, gpuMemoryTotal, gpuMemoryUsed, isLegacyViewportEnabled, isRemoteGLSessionEnabled, isWinRemoteSession, pause, rebakeTextures, regenerateUVTilePreview, reloadTextures, reset, shaderSource, toggleTexturePaging, traceRenderPipeline
Long name (short name) |
Argument types |
Properties |
|
deviceInformation(di)
|
boolean
|
|
|
If used then output the current device information.
|
|
disposeReleasableTextures(drt)
|
boolean
|
|
|
Clear up all the releasable file textures in GPU memory that are not required for rendering.
|
|
dumpTexture(dt)
|
string
|
|
|
If used then dump GPU texture memory usage info (in MB), must be used with FLAG gpuMemoryUsed.
The final info detail is specified by the string parameter. Current available values are: "full" , "total".
|
|
enableHardwareInstancing(hwi)
|
boolean
|
|
|
Enables/disables new gpu instancing of instanceable render items in OGS.
|
|
fragmentEditor(fe)
|
string
|
|
|
If used then launch the fragment editor UI.
|
|
fragmentXML(xml)
|
string
|
|
|
Get the fragment XML associated with a shading node.
|
|
gpuMemoryTotal(gmt)
|
int
|

|
|
Get or set the total amount of GPU memory which Maya is allowed to use (in MB).
|
|
gpuMemoryUsed(gpu)
|
boolean
|
|
|
If used then output the estimated amount of GPU memory in use (in MB).
|
|
isLegacyViewportEnabled(lve)
|
boolean
|
|
|
To query if the legacy viewport is enabled.
|
|
isRemoteGLSessionEnabled(rgl)
|
boolean
|
|
|
Query if remote gl is allowed
|
|
isWinRemoteSession(irs)
|
boolean
|
|
|
Query if this is a remote session.
|
|
pause(p)
|
boolean
|

|
|
Toggle pausing VP2 display update
|
|
rebakeTextures(rbt)
|
boolean
|
|
|
If used then re-bake all baked textures for OGS.
|
|
regenerateUVTilePreview(rup)
|
string
|
|
|
If used then regenerate all UV tiles preview textures for OGS.
|
|
reloadTextures(rlt)
|
boolean
|
|
|
If used then reload all textures for OGS.
|
|
reset(r)
|
boolean
|

|
|
If used then reset the entire OGS database for all viewports using it.
In query mode the number of viewports that would be affected is returned
but the reset is not actually done. If no viewport is using OGS then
OGS will stop listening to DG changes.
|
|
shaderSource(ss)
|
string
|
|
|
Get the shader source for the specified material.
|
|
toggleTexturePaging(ttp)
|
boolean
|
|
|
If used then toggle the default OGS Texture paging mechanism.
|
|
traceRenderPipeline(trp)
|
boolean
|
|
|
Enable debug tracing of the renderer pipeline.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
// Reset the database for all panels running the OGS renderer.
// Returns the number of panels affected.
cmds.ogs( reset=True )
// Result: [modelPanel1] //
// Set the gpu memory limit to 2048 MB. Memory management systems
// will attempt to avoid going over this limit. Can be used to reserve
// memory for other applications.
cmds.ogs( gpuMemoryTotal=2048 )
// Output the current gpu memory limit in MB.
cmds.ogs( query=True, gpuMemoryTotal=True )
// Output an estimate of the amount of currently allocated gpu memory by
// Maya in MB.
cmds.ogs( gpu=True )