Search code examples
maya

Tool settings in maya with python


I would like to know how can I enable some settings in the tool settings when I run my python script.

I would like to enable "Camera Based-Selection" when my script starts.. I can't find anything about this in the reference page of maya.

Can someone help me please ?

tool settings


Solution

  • You turn this on and off with the selectPref command. To enable it you'd call

    import maya.cmds as cmds
    cmds.selectPref(useDepth=True)
    

    And turn it off with

    cmds.selectPref(useDepth=False)