Go to: Synopsis. Return value. Related. Flags. Python examples.
componentTag(
[objects]
, [create=boolean], [delete=boolean], [injectionLocation=string], [modify=string], [newTagName=string], [queryEdit=boolean], [rename=boolean], [tagName=string], [uniqueTagName=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
componentTag is undoable, NOT queryable, and NOT editable.
This command allows you to create, delete and modify component tags
| Any | The name of the created componentTag, or whether the command succeeded or the information
about what can be edited |
deformableShape, geometryAttrInfo
create, delete, injectionLocation, modify, newTagName, queryEdit, rename, tagName, uniqueTagName
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
# Make a geometry
import maya.cmds as cmds
cmds.polyCylinder(ch=True, o=True, r=3.0, h=8.0, sc=1, sx=6, sy=9, cuv=3, name='cyl')
# Create some tags
cmds.componentTag(['cyl.f[0:17]'], cr=True, ntn='bottomSection')
cmds.componentTag(['cyl.f[36:53]'], cr=True, ntn='topSection')
# Edit a tag
cmds.componentTag(['cyl.f[18:35]'], tn='bottomSection', m='add')
# Rename the tag
cmds.componentTag('cyl', rn=True, tn='bottomSection', ntn='lowerSection')
# Delete tags (using a wild card)
cmds.componentTag('cyl', d=True, tn='*Section')