Page 1 of 1

MEL issue : setAttr on Maxwell Image Controls

Posted: Tue Feb 21, 2012 10:37 pm
by deadalvs
hi !

[maya 2012 win7 64]

Code: Select all
string $colorNinetyDegNode = `createFileInNode`;
setAttr ($colorNinetyDegNode + ".mxBrightness") 20;


global proc string createFileInNode()
{
    shadingNode -asTexture file;
    string $nodeNameArr[] = `ls -sl -fl`;
    $name = $nodeNameArr[0];
    return $name;
}


if I am using this code to create a fileIn node, I cannot directly set the maxwell image controls attrs. But once I set the value manually (there's a little hiccup too), also the MEL code works.

there seems to be a refresh issue.

can I somewhat refresh that fileInNode via MEL so I can bypass this issue ?


thanks for any input ! :)

Re: MEL issue : setAttr on Maxwell Image Controls

Posted: Wed Feb 22, 2012 12:47 pm
by Mihnea Balta
Use the maxwellSetCustomScalar() function to set the value, as described here and here.

Re: MEL issue : setAttr on Maxwell Image Controls

Posted: Wed Feb 22, 2012 12:55 pm
by deadalvs
holy smokes, thanks a lot !