Hoe to SetColor()

   8420   5   1
User Avatar
Member
6 posts
Joined: Aug. 2007
Offline
Hi,
How do I pass values to setColor(self, color)?

I am trying some simple exercises of getting and setting some parameters of a geo node.

In the above example I want to set the color of the geo to 1.0,0.0,0.0

Thanks
User Avatar
Member
1925 posts
Joined: Nov. 2006
Offline
hou.Node.setColor() requires a hou.Color object, which takes a tuple of values.

hou.Node.setColor(hou.Color((0,1,0)))
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
6 posts
Joined: Aug. 2007
Offline
Thanks a lot.
Is there any resource other than the reference section in the help where I could find some code examples?
User Avatar
Member
1925 posts
Joined: Nov. 2006
Offline
A good way to see examples of different things is to look in $HH/scripts/python/. In there you will find all the modules that are used for various shelf tools and such used by Houdini.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
6 posts
Joined: Aug. 2007
Offline
Thanks again.
User Avatar
Member
624 posts
Joined: Aug. 2008
Offline
LOL today i was looking for the same thing,
and i laugh looking that the user of the post is RGB ….
  • Quick Links