New to Mel Scripting, but I'm trying to work out a script that will break connections to certain attributes in a material (for instance any material that would be in the Specular Color slot). After those connections are broken, I can use the script to assign the newly unbroken attribute a new value.
This is where I am at so far:
string $derp =
for ($m in $derp)
disconnectAttr ($m + ".specularColor") ($break + "file.outColor");
setAttr ($m + ".specularColor") -type double3 0.105257 0.105257 0.105257;
setAttr ($m + ".cosinePower") 20;
setAttr ($m + ".reflectivity") 0.0;
string $adisp =
ls -type "displacementShader";
for ($dazDisp in $adisp)
setAttr ($dazDisp + ".scale") 0;
the error that was coming back was //Error: line 6: The destination attribute 'phone1.specularColor' cannot be found.
Any help would be appreciated, I'm still new to Mel so I'll do my best to keep up. thanks!