pymel.core.general.toolDropped¶
- toolDropped(*args, **kwargs)¶
This command builds and executes the commands necessary to recreate the specified tool button. It is invoked when a tool is dropped on the shelf.
Derived from mel command maya.cmds.toolDropped
Example:
import pymel.core as pm # Create move tool button and scale tool button in a new window pm.window() # Result: ui.Window('window1') # pm.columnLayout() # Result: ui.ColumnLayout('window1|columnLayout94') # pm.toolCollection() # Result: ui.ToolCollection('window1|columnLayout94|toolCollection4') # pm.toolButton( tool='moveSuperContext', toolImage1=('moveSuperContext', 'move_M.png') ) # Result: ui.ToolButton('window1|columnLayout94|toolButton7') # pm.toolButton( tool='scaleSuperContext', toolImage1=('scaleSuperContext', 'scale_M.png') ) # Result: ui.ToolButton('window1|columnLayout94|toolButton8') # pm.showWindow() # Drop select tool to the created window pm.toolDropped('selectTool')