script controller - write to variables

script controller - write to variables

DrStein99
Advocate Advocate
640 Views
2 Replies
Message 1 of 3

script controller - write to variables

DrStein99
Advocate
Advocate

I have a script controller assiged to the illumination track of a material on a box.

 

I assigned 2 variables to a track, which are attribute holders on the box.  I can read from the variables, but it does not seem to write back to the variables.  I'm going to assume it's a read-only operation, yes?

 

script-write_to.png

 

Instead of referencing the object in the script box, I assigned it to the track using a variable, because the documents explain - if I change the name of the box then the link is broken.

 

Am I able to set the value without referncing the direct name in the script-edit box?

 

(Also off the topic, how can I return or access the current value of the property the controller is connected to, because sometimes I just want to return without changing the current value).

0 Likes
641 Views
2 Replies
Replies (2)
Message 2 of 3

Swordslayer
Advisor
Advisor

Add instead the parent track (i.e. Custom_Attributes here - let's say you name it attribs) and access and change it as attribs.lighted = on

0 Likes
Message 3 of 3

DrStein99
Advocate
Advocate

Ok I think I read you: I assign parent track node to "constant", and access child object/nodes from that "constant" branch.  Thanks for advice I will give it a try.

 

 

0 Likes