ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. MEL 例.
addMetadata [-channelType string] [-indexType string] [-streamName string] [-structure string]
addMetadata は、取り消し可能、照会可能、および 編集不可能 です。
1 つまたは複数の選択したオブジェクトに対するメタデータ ストラクチャのアタッチメントを定義します。これにより、後で editMetadata コマンドを使用して設定するプレースホルダと空のメタデータ ストリームが作成されます。これは、ノードにおける addAttr コマンド(アトリビュートが追加されるが、データは実際に設定されない)と同様の概念です。
メタデータ ストラクチャを割り当てるときは、次のフラグを指定する必要があります。channelType はメタデータのチャネル タイプ(「頂点」など)、streamName は作成するメタデータ ストリームの名前、structure はメタデータの内容を定義するストラクチャ タイプの名前です。indexType フラグはオプションです。このフラグを指定しない場合、インデックスは標準の数値と推測されます。
メタデータの情報は、さまざまなレベルで照会できます。照会可能なすべての引数の一覧については以下の表を参照してください。それぞれの場合において、非照会引数のいずれかを指定すると、照会中に調べるメタデータの一覧がフィルタされます。すべての照会で、照会する単一のオブジェクトを選択する必要があります。
たとえば、他の引数を指定せずに channelType フラグを照会すると、メタデータを含む選択されたオブジェクトのすべてのチャネル タイプの一覧が返されます。indexType フラグを指定して channelType フラグを照会すると、その特定のタイプのインデックスを使用するメタデータ ストリームを含むチャネル タイプのみ返されます。
フラグの組み合わせ:
ChannelType IndexType StreamName Structure Create Can Query 0 0 0 0 X ChannelType, StreamName, Structure 0 0 0 1 X ChannelType, StreamName, IndexType 0 0 1 0 X ChannelType, Structure, IndexType 0 0 1 1 X ChannelType, IndexType 0 1 0 0 X ChannelType, StreamName, Structure 0 1 0 1 X ChannelType, StreamName 0 1 1 0 X ChannelType, Structure 0 1 1 1 X ChannelType 1 0 0 0 X StreamName, Structure, IndexType 1 0 0 1 X StreamName, IndexType 1 0 1 0 X Structure, IndexType 1 0 1 1 (a) IndexType 1 1 0 0 X StreamName, Structure 1 1 0 1 X StreamName 1 1 1 0 X Structure 1 1 1 1 (b) X (a) 既定のインデックス タイプの空のメタデータ ストリームを割り当てる (b) 指定したインデックス タイプの空のメタデータ ストリームを割り当てる
string[] | 新しいストリームが正常に追加されたノードの一覧(作成モード) |
string[] | channelType フラグを照会する場合のオブジェクトに関するメタデータを含むチャネル タイプの一覧 |
string[] | streamName フラグを照会する場合のオブジェクト上のストリーム名の一覧 |
string[] | structure フラグを照会する場合にオブジェクトのメタデータ ストリームで使用されるストラクチャの一覧 |
string[] | indexType フラグを照会する場合にオブジェクトで使用されるインデックス タイプの一覧 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
-channelType(-cht)
|
string
|
![]() ![]() |
||
|
||||
-indexType(-idt)
|
string
|
![]() ![]() |
||
|
||||
-streamName(-stn)
|
string
|
![]() ![]() |
||
|
||||
-structure(-str)
|
string
|
![]() ![]() |
||
|
![]() |
![]() |
![]() |
![]() |
polyPlane -n p -ch off; select -r "pShape"; dataStructure -format "raw" -asString "name=IdStruct:int32=ID"; dataStructure -format "raw" -asString "name=OffStruct:float=Offset"; dataStructure -format "raw" -asString "name=OrgStruct:float[3]=Origin Point"; addMetadata -streamName "IdStream" -channelType "vertex" -structure "IdStruct"; addMetadata -streamName "OffStream" -channelType "vertex" -structure "OffStruct"; addMetadata -streamName "OrgStream" -channelType "edge" -structure "OrgStruct"; addMetadata -streamName "VFStream" -channelType "vertexFace" -indexType "pair" -structure "OrgStruct"; // Query for the list of all channel types possessing metadata addMetadata -query -channelType; // Return: edge vertex vertexFace // // Query for the structure assigned to a specific stream addMetadata -channelType "vertex" -streamName "OffStream" -query -structure; // Return: OffStruct // // Query for the list of all streams on a specific channel type addMetadata -channelType "vertex" -query -streamName; // Return: IdStream OffStream // // Query for the list of all streams addMetadata -query -streamName; // Return: IdStream OffStream OrgStream VFStream // // You can combine queries to answer more general questions about the // metadata on an object. For example suppose you wanted to know the // index type used by all Streams on the "vertex" Channel. // First extract the list of Streams on the Channel string $streams[] = `addMetadata -channelType "vertex" -query -streamName`; int $i; // Loop through each Stream, querying the IndexType only for that Stream for( $i=0; $i < size( $streams ); ++$i ) { string $indexType = `addMetadata -channelType "vertex" -streamName $streams[$i] -query -indexType`; print ( "Index type on " + $streams[$i] + " is " + $indexType + "\n" ); }