How to find light node and change luminous and other surface properties by script
Shadowz
Posts: 45
So I want to create a script that finds certain nodes that is a light source and changes their surface attributes/properties like luminious value etc. I'm a newbie with these scripting stuff but so far I only came up with this:
var lightNodes = ["IGLK1 Ceiling Light", "IGLK1 Ceiling Light (2)"];
for ( var n = 0 ; n < lightNodes.length ; n++ ) {
var item=Scene.findNodeByLabel(lightNodes[n]);
if(item)item.select(true);
//Changes Luminance value ??
}
So if anyone can help me with this, I'd appreciate it greatly. This will save so much time for me so I don't have to go to these light sources one by one manually and change the luminance value etc.
Post edited by Shadowz on
Comments
Are these props/figures with emissive surfaces or actual lights? For lights the emission property belongs to the node, for emissive surfaces you need to get the surface list (from the shape, as I recall) and then get the emissive properties for that.
Accessing node proeprties http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/properties/node_properties/start
Accessing surfaces, or rather materials http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/material/select_by_tag/start
Its for ghost lights so props I think. I've went through documentation but sadly its still very confusing. Not sure which syntax is needed to actually change the value or the process of changing it using right functions and stuff. Kind of wish there was intellisense