This is where I got...but missing the way to read or set the value (like 0.1 or 10%)
if(!(node = Scene.getPrimarySelection())){
return;
};
print ("node= "+node.name);
shellObject = node.getObject();
print ("Object= "+shellObject.name);
shape = shellObject.getCurrentShape();
print ("Shape= "+shape.name);
var iMat = shape.getNumMaterials();
for( j = 0; j < iMat; j++){
mMaterial = shape.getMaterial ( j);
print ("Material= "+mMaterial.name);
oProperty = mMaterial.findProperty( "Ambient Strength" );
print ("Property= "+oProperty.name);
oProperty.setValue = ( 0.12 );
print("Value= " + oProperty.value);
};
...but oProperty.value appears to be the wrong thing. Tried name, getValue , as well...the last two lines to read or set the value don't seem to work.
What am I missing, or where in the docs am I missing it? :)