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

import maya.cmds as cmds

# Create move tool button and scale tool button in a new window
pm.window()
# Result: ui.Window('window1') #
pm.columnLayout()
# Result: ui.ColumnLayout('window1|columnLayout93') #
pm.toolCollection()
# Result: ui.ToolCollection('window1|columnLayout93|toolCollection4') #
pm.toolButton( tool='moveSuperContext', toolImage1=('moveSuperContext', 'move_M.png') )
# Result: ui.ToolButton('window1|columnLayout93|toolButton8') #
pm.toolButton( tool='scaleSuperContext', toolImage1=('scaleSuperContext', 'scale_M.png') )
# Result: ui.ToolButton('window1|columnLayout93|toolButton9') #
pm.showWindow()

# Drop select tool to the created window
pm.toolDropped('selectTool')

Previous topic

pymel.core.general.toggleAxis

Next topic

pymel.core.general.toolHasOptions

Core

Core Modules

Other Modules

This Page