Go to: Synopsis. Return value. Keywords. Flags. Python examples.
sceneLint([issueType=string], [verbose=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
sceneLint is NOT undoable, queryable, and NOT editable.
{ "sceneLint" : { "ISSUE_CODE" : { "description" : "DETAILED_DESCRIPTION_OF_ISSUE", "mitigation" : [ // List of mitigations that can be applied { "objects" : [ LIST_OF_STRINGS_NAMING_OBJECTS_TO_WHICH_IT_APPLIES ], "benefit" : DESCRIPTION_OF_HOW_THE_CODE_MAKES_THE_SCENE_BETTER, "description" : DESCRIPTION_OF_WHAT_THE_CODE_DOES, "code" : PYTHON_MITIGATION_CODE_WITH_LOOP_OVER_INSTANCES } ] } } } The sceneLint command is used to analyze the currently loaded scene to find potential areas for improvement in performance, memory use, or reduction of clutter. In the query mode it will report back the list of available checks it can do. Each check will have an associated short-form which can be passed to the command to run specific checks. In create mode the returned string is a JSON format list of issues and mitigations that suggest a way to solve the problem it describes. Mitigation can be automatically performed by extracting the mitigation code and arguments then running the Python code exec(code, {}, {'OBJECTS' : objects})| string | JSON formatted results showing the issues that could potentially cause problems in the scene. |
| string[] | When querying issueType shows the description, and benefit values for the named scene issue. |
| string[] | When querying returns the list of all issueTypes by name. |
In query mode, return type is based on queried flag.
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
issueType(i)
|
string
|
|
||
|
||||
verbose(v)
|
boolean
|
|
||
|
||||
import maya.cmds as cmds
# Query the list of available issue types
cmds.sceneLint( query=True )
# Return: ['FOO', 'BAR', 'BAZ'] #
# Find all scene issues
cmds.sceneLint()
# Return: '{ "sceneLint" : ... }' #
# Get more information on the "FOO" issue type
cmds.sceneLint( issueTye=['FOO','BAR'], query=True )
# Return: ['FOO', 'FOO_DESCRIPTION', 'BAR', 'BAR_DESCRIPTION'] #
# Run only the "FOO" issue check
cmds.sceneLint( issueTye='FOO' )
# Return: '{ "sceneLint" : ... }' #