Jump to content

Dynamic relative reference


Recommended Posts

I'm setting up a scene with a bunch of colors. As such I like to keep them in a Null node so theyre all in one place. 

In a geometry node I'm trying to apply that color with works fine with relative reference: (U3650 being the name of the color) 
ch("../../Colorbank/U3650r")

This works great but I'd like to have the U3650 be changed based on a string attribute on a diffrent node. that way I can change it there without having to tediously go into rgb values and changing it by hand. I've tried the following: (the value in lable_1 being U3650)
ch("../../Colorbank/chs("../colorControl/label_1")r")
ch("../../Colorbank/'chs("../colorControl/label_1")'r")

However this doesn't seem to work. 
Could anyone help with getting this reference to work? 

This would allow me to animate the color per frame which allows for greater control in rendering varients of still images. 
I've attached a simple hip version of the problem. 

 

RR-Help.hip

Edited by netherknight
changed ch("~") to the correct chs("~") Still doens't work however
Link to comment
Share on other sites

Hey man!

You have to use ' ' for the second chs.

and also ` ` to insert the chs

ch("../../Colorbank/`chs('../colorControl/label_1')`r")

 

Let me know if it works

Edited by morn66
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...