Jump to content

Getting At Cd[0,1,2]


Recommended Posts

I'm trying to make a copy/stamp with the color of the boxes to be stamped based on the color of the template points. So I created a copy node with 3 stamp attributes, RED, GREEN, BLUE, set to point("../point1", $PT, "???",0). what would I have to put instead of the ??? to get only the red, green or blue value of Cd (Cd[0], Cd[1], and Cd[2]).

If this is not enough to go on I can post the .hip file later.

Link to comment
Share on other sites

The last argument of the point expression is the attribute index, so all you need to do is put in point("../point1", $PT, "Cd", #) to the 3 fields, replacing # with 0 for red, 1 for green and 2 for blue.

Edited by Hammy
Link to comment
Share on other sites

I'm trying to make a copy/stamp with the color of the boxes to be stamped based on the color of the template points. So I created a copy node with 3 stamp attributes, RED, GREEN, BLUE, set to point("../point1", $PT, "???",0). what would I have to put instead of the ??? to get only the red, green or blue value of Cd (Cd[0], Cd[1], and Cd[2]).

you are just about there. RED would be point("../point1", $PT, "Cd",0), GREEN would be point("../point1", $PT, "Cd",1), BLUE would be point("../point1", $PT, "Cd",2). the last field represnts what index of the attribute, in this case Cd, you want to access. so 0 is RED, 1 is BLUE, and 2 is GREEN.

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...