ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. MEL 例.
getMetadata [-channelName string] [-channelType string] [-dataType] [-endIndex string] [-index string] [-indexType string] [-listChannelNames] [-listMemberNames] [-listStreamNames] [-memberName string] [-scene] [-startIndex string] [-streamName string]
getMetadata は、取り消し不可能、照会不可能、および編集不可能です。
このコマンドを使用して、ノードまたはシーンからメタデータ要素の値を取得します。一度に 1 つのストラクチャ メンバーを返すように制限されています。便宜上、必要な詳細は、単一のメタデータ チャネルで 1 つのストラクチャの単一のメンバーを検索するのに十分な情報だけです。 最も単純なケースで、1 つのメタデータ チャネルに 1 つのストリームがあり、メンバーを 1 つだけ持つストラクチャを使用する場合、必要な情報は、メタデータを含むオブジェクトの名前だけです。最も複雑なケースでは、1 つの一意のメンバーにメタデータを絞り込むために、「channelName」、「streamName」、「memberName」のすべてが必要になります。 一般にスクリプトでは、メタデータがどこかに追加される可能性があるため、すべてのフラグを使用することをお勧めします。ショートカットは主に、スクリプト エディタまたはコマンド ラインでコマンドを直接入力するときにすばやく入力するためにあります。 データが存在しない場所でインデックスが指定されると、値がなかったインデックスを通知するメッセージが表示され、コマンドは失敗します。有効なメタデータのある場所を事前に把握しておく必要がある場合は、最初に hasMetadata コマンドを使用してメタデータがある場所を特定します。フィルタ フラグint[] | メタデータ メンバーの整数値のリスト |
float[] | メタデータ メンバーの実数値のリスト |
string[] | メタデータ メンバーの文字列値のリスト |
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
-dataType(-dt)
|
|
![]() |
||
|
||||
-listChannelNames(-lcn)
|
|
![]() |
||
|
||||
-listMemberNames(-lmn)
|
|
![]() |
||
|
||||
-listStreamNames(-lsn)
|
|
![]() |
||
|
||||
-memberName(-mn)
|
string
|
![]() |
||
|
||||
-channelName(-cn)
|
string
|
![]() ![]() |
||
|
||||
-channelType(-cht)
|
string
|
![]() ![]() |
||
|
||||
-endIndex(-eix)
|
string
|
![]() |
||
|
||||
-index(-idx)
|
string
|
![]() ![]() ![]() |
||
|
||||
-indexType(-idt)
|
string
|
![]() ![]() |
||
|
||||
-scene(-scn)
|
|
![]() ![]() |
||
|
||||
-startIndex(-six)
|
string
|
![]() |
||
|
||||
-streamName(-stn)
|
string
|
![]() ![]() |
||
|
![]() |
![]() |
![]() |
![]() |
polyPlane -n smcPlane -ch off; // Result: smcPlane // pickWalk -d down; // Result: smcPlaneShape // // Create structures dataStructure -format "raw" -asString "name=idStructure:int32=ID"; dataStructure -format "raw" -asString "name=keyValueStructure:string=value"; // Result: idStructure // // Apply structures to plane addMetadata -structure "idStructure" -streamName "idStream" -channelName "vertex"; addMetadata -structure "keyValueStructure" -streamName "keyValueStream" -channelName "key" -indexType "string"; // Set the metadata values on three of the components by selection select -r smcPlaneShape.vtx[8:10]; editMetadata -streamName "idStream" -memberName "ID" -value 7; // Result: 1 // // Retrieve the three newly set metadata values select -r smcPlaneShape; getMetadata -streamName "idStream" -memberName "ID" -channelName "vertex" -index "8" -index "9" -index "10"; // Result: 7 7 7 // // List stream names of the shape select -r smcPlaneShape; getMetadata -listStreamNames; // Result: keyValueStream idStream // // List stream names which is in the specified channel select -r smcPlaneShape; getMetadata -channelName "vertex" -listStreamNames; // Result: idStream // // List stream names of the shape which has the specified member select -r smcPlaneShape; getMetadata -memberName "ID" -listStreamNames; // Result: idStream // // List channel names which is used by the specified stream select -r smcPlaneShape; getMetadata -streamName "idStream" -listChannelNames; // Result: vertex // // List channel names which has the specified member select -r smcPlaneShape; getMetadata -memberName "ID" -listChannelNames; // Result: vertex // // List member names which is used by the specified stream select -r smcPlaneShape; getMetadata -streamName "idStream" -listMemberNames; // Result: ID // // Query data type of the listed member select -r smcPlaneShape; getMetadata -streamName "idStream" -listMemberNames -dataType; // Result: ID int32 // // Query data type of the specifiedmember select -r smcPlaneShape; getMetadata -streamName "idStream" -memberName "ID" -dataType; // Result: int32 // // Get metadata from a larger group of indices all at once. // Note that unassigned metadata values assume the default (0 for numbers). select -r smcPlaneShape.vtx[7:10]; getMetadata -streamName "idStream" -memberName "ID"; // Result: 0 7 7 7 // // Set metadata values using the complex index type "string" editMetadata -streamName "keyValueStream" -memberName "value" -stringValue "Starry Night" -index "Title"; editMetadata -streamName "keyValueStream" -memberName "value" -stringValue "Vincent Van Gogh" -index "Artist"; // Retrieve the complex index data (note return is in alphabetical order of index) getMetadata -streamName "keyValueStream" -memberName "value" -channelName "key" -index "Title" -index "Artist" -indexType "string"; // Result: Vincent Van Gogh Starry Night //