dandruff
12-01-2010, 12:33 PM
So.. the script I'm working on are supposed to activate a VRay attribute on a shaderEngine -node and then set the value... simple enough eyh?
For some reason Maya doesn't know that the attribute exists unless the script is done executing. After the script is done, there's no problem accessing the attr from mel but there's no way to do it from within the script.
It should be as simple as:
vray addAttributesFromGroup $shaderEngineHandle vray_roundedges 1;
setAttr ($shaderEngineHandle + ".vrayRoundEdgesRadius") $roundEdgesVal;
But:
Error: setAttr: No object matches name: <SGname>.vrayRoundEdgesRadius
I've tried "refresh", "updateAE", "refreshAE"... what am I doing wrong?
For some reason Maya doesn't know that the attribute exists unless the script is done executing. After the script is done, there's no problem accessing the attr from mel but there's no way to do it from within the script.
It should be as simple as:
vray addAttributesFromGroup $shaderEngineHandle vray_roundedges 1;
setAttr ($shaderEngineHandle + ".vrayRoundEdgesRadius") $roundEdgesVal;
But:
Error: setAttr: No object matches name: <SGname>.vrayRoundEdgesRadius
I've tried "refresh", "updateAE", "refreshAE"... what am I doing wrong?
