Q about creating color (not Cd!) attribute via wrangle

   2407   2   1
User Avatar
Member
109 posts
Joined: June 2008
Offline
Hi, title says it all: how can i create ‘true’ color atttribute, i.e. 3 float array with Color..subttype?

When i say ‘true’ color, i mean that when i look geometry spreadsheet, the coloum headers display r, g and b - e.g 'color', 'color' and 'color'.

If I try to do it like this, via wrangle:

v@color = { 1, 0, 0 };

Headers display ''color', 'color' and 'color', but if I do it via Attribute create, and set type to float and Color and size to 3..then headers display r,g and b.

Cheers
-k
User Avatar
Member
4729 posts
Joined: Feb. 2012
Offline
Hi,

You can do this by using the setattribtypeinfo function:

v@clr = 0;
setattribtypeinfo ( 0, "point", "clr", "color" );
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
109 posts
Joined: June 2008
Offline
Haa Ty Sir!

-k
  • Quick Links