2017-03-23 11 views
0

乾杯、 特定の接頭辞を持つすべての属性を取得して配列に保存するツールを作成しています。 // Result: message caching isHistoricallyInteresting nodeState...Maya MELリストアを配列に保存

私の問題:私は配列に特定のプレフィックスを持つ属性のリストを保存したい

メルコードIが独自にlistAttrを使用する場合

は、それが私にこのような何かを与えます:

string $currentSelection[] = `ls -sl`; 
string $currentAttributes[];    
$currentShapeNode = `ls -shapes -dag -sl $currentSelection`; 
string $currentAttributes[] = `listAttr -ct "ai*"`; 
print $currentAttributes; 

$currentAttributesリストは空のままです。私が間違っていることを理解できません。

答えて

1

カテゴリや文字列と混同している可能性があります。あなたがドックで近くを見ている場合

ct - >指定されたカテゴリに属する​​属性のみを表示します。カテゴリ文字列は正規表現にすることができます。

st - >他の条件と一致する属性のみをリストし、このフラグから渡された文字列と一致します。文字列は正規表現にすることができます。だからあなたの場合には、おそらくこれは

string $currentSelection[] = `ls -sl`; 
string $currentAttributes[];    
$currentShapeNode = `ls -shapes -dag -sl $currentSelection`; 
string $currentAttributes[] = `listAttr -st "ai*"`; 
print $currentAttributes; 
+0

を働くST

を探して

が働いたことをありがとうございます! –

関連する問題