Search - User list
Full Version: Python -> Change parameters in green
Root » Houdini Indie and Apprentice » Python -> Change parameters in green
froure
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.
graham
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.
froure
Ok!!

Thank you very much!!!!!


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB