Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to create an expression that sets the color of multiple materials using a loop. I would like to store the name of all the materials as an array of strings. How do I use a string variable to set an attribute, rather than hard-coding it?
For example...
$mat = 'lambert2'; lambert2.colorR = 0; // This works $mat.colorR = 0; // This doesn't... How do I get it to work? How do I set an attribute?
Solved! Go to Solution.