Using python to add/delete ramp points
5127 2 1- omgeric
- Member
- 48 posts
- Joined: 2月 2013
- Offline
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: 12月 2010
- Offline
Suppose I have a “null” node with a ramp parameter by name “rampParm”.
I can make some changes on this ramp with below script :
# Take the node
node = hou.node('/obj/sphere_object1/null1')
# Create Ramp Data Object
rampData = hou.Ramp((0, 0), (0, 1), ((0.0, 0.0, 0.0), (1.0, 0.0, 0.2)))
# Apply This Data to The Ramp Parameter
node.setParms({'rampParm':data})
NOTE 1:
To add or remove or any changes on the ramp you should change rampData values
NOTE 2:
To see all of the details of the hou.Ramp ,check Houdini Help page :wink:
http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp [sidefx.com]
I can make some changes on this ramp with below script :
# Take the node
node = hou.node('/obj/sphere_object1/null1')
# Create Ramp Data Object
rampData = hou.Ramp((0, 0), (0, 1), ((0.0, 0.0, 0.0), (1.0, 0.0, 0.2)))
# Apply This Data to The Ramp Parameter
node.setParms({'rampParm':data})
NOTE 1:
To add or remove or any changes on the ramp you should change rampData values
NOTE 2:
To see all of the details of the hou.Ramp ,check Houdini Help page :wink:
http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp [sidefx.com]
- omgeric
- Member
- 48 posts
- Joined: 2月 2013
- Offline
-
- Quick Links