Jump to content

get attribute from an object


Recommended Posts

Hi, 

 

I stored some 0,1 (on, off) information on a color in a sop. Lets say this is my path to the sop:

"/obj/my_geo/my_sop" 

 How do I get the information I stored on a color?

 

Eg. I want to use the red channel to switch in my switch SOP, but how can I get the R channel?

Link to comment
Share on other sites

If you stored your color on a point then you can do point("/obj/my_geo/my_sop",Point_number,"Cd",0).

This expression takes the Cd attribute, which is color, and gives the R channel. The last argument of the point expression is the index of the attribute. 0 = red, 1 = green and 2 = blue. Make sure to replace the "Point_number" with an actual point number.

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