« Only in Soho | Home | MEL: Find and edit the source of a procedure »
MEL: Setting the value of a Slim attribute
By nikos | July 11, 2008
Setting the value of a Slim attribute, from MEL, requires a bit more overhead compared to the normal Maya attribute. The following example shows how it can be done.
string $palette = `slimcmd slim FindPalette “MYPALETTE”`;
-
string $all = `slimcmd $palette GetAppearances`;
-
string $shaders[];
-
tokenize( $all, " ", $shaders );
-
-
for ( $s in $shaders ) {
-
string $attr = `slimcmd $s GetProperties -name "MYPROPERTY"`;
-
if ( $attr != "") {
-
slimcmd $attr SetValue "MYVALUE";
-
}
-
}
Topics: Maya, RenderMan | No Comments »
Comments are closed.