ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.

概要

componentTag( [objects] , [create=boolean], [delete=boolean], [injectionLocation=string], [modify=string], [newTagName=string], [queryEdit=boolean], [rename=boolean], [tagName=string], [uniqueTagName=boolean])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

componentTag は、取り消し可能、照会不可能、および編集不可能です。

このコマンドを使用すると、コンポーネント タグを作成、削除、修正できます。

戻り値

Any作成された componentTag の名前、コマンドが成功したかどうか、または編集可能な内容に関する情報

関連

deformableShape, geometryAttrInfo

フラグ

create, delete, injectionLocation, modify, newTagName, queryEdit, rename, tagName, uniqueTagName
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
create(cr) boolean create
これにより、ジオメトリに componentTag が作成されます。名前は -newTagName オプションで指定できます。新しい名前が指定されていない場合は生成されます。作成されたタグの名前が返されます。
delete(d) boolean create
これにより、-tagName オプションで指定された componentTag が削除されます。
injectionLocation(il) string create
componentTag が編集される射出ノードの名前です。これは、特定の componentTag を複数の射出位置で変更できるまれなケースでのみ必要です。
modify(m) string create
これにより、-tagName オプションで指定された componentTag が変更されます。モードによって、コンポーネントが置き換えられるのか、クリアされるのか、追加されるのか、削除されるのかが決定されます。
newTagName(ntn) string create
作成する新しい componentTag の名前、または名前を変更する componentTag の新しい名前です。
queryEdit(qe) boolean create
指定されたパラメータで許可される編集内容を返します。Python でこのコマンドを実行すると、許可されるものを含む Dictionary オブジェクトが返されます。
rename(rn) boolean create
これにより、-tagName オプションで指定した componentTag の名前が -newTagName オプションで指定した名前に変更されます。
tagName(tn) string createmultiuse
編集する componentTag の名前です。これは単一の名前または名前のリストです。名前には、複数の既存の componentTag と一致する「*」などのワイルドカードを含めることができます。
uniqueTagName(utn) boolean create
このフラグは create フラグおよび newTagName フラグと一緒に使用します。newTagName で指定された名前が injectionNode またはその親のタグで既に使用されている場合、コマンドは一意のタグ名を生成します。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

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')