Python -> Change parameters in green

   5892   2   0
User Avatar
Member
15 posts
Joined: April 2008
Offline
Hi friends!

I need change, for example, the params of DELETE named “Start / End”.

For change a Start parm I use:


myDelete.parm('rangestart').set(1)


but, for change de End parm, I use the same code:

myDelete.parm('rangeend').set(4)


and it doesn't run.

In the Houdini interface, this parm is printed in green, and show “$N”. It is important?

Thanks for all!

Ferran.
User Avatar
Member
1925 posts
Joined: Nov. 2006
Offline
The problem is that the rangeend already has an expression set and you cannot just do a hou.Parm.set() on it. There are two options:

myDelete.parm('rangestart').setExpression('4')
This just sets the expression value from ‘$N’ to ‘4’

or


myDelete.parm('rangestart').deleteAllKeyframes()
myDelete.parm('rangestart').set(4)

This deletes the expression, then sets the value normally. This is my preferred method.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
15 posts
Joined: April 2008
Offline
Ok!!

Thank you very much!!!!!


  • Quick Links