Andrew Lowell

andrewlowell

About Me

EXPERTISE
Technical Director
INDUSTRY
Film/TV

Connect

LOCATION
Canada

Houdini Skills

Availability

Not Specified

My Badges

Houdini Academy Advisor
Since Jan 2024

Recent Forum Posts

Is there any way to dynamically set a ramp parm with Python Dec. 6, 2024, 7:46 p.m.

I'm not able to post the file, but, the task is fairly simple. This file works great computing the end result, I'm aware of how to use chramp, hou.Ramp.lookup() etc. The issue is to actually reference on to a ramp parameter.

Here's a scenario with a python expression on a float parm.
value = 3.33
return value

Here's a hypothetical value with a python expression on a ramp parm.
ramp = hou.parm(pathToADifferentRamp).eval()
return ramp

If I were to channel reference pathToADifferentRamp to the ramp I'd like to control, it would indeed work. However, a Python return of a ramp object won't. Any solution or hack for this?

Is there any way to dynamically set a ramp parm with Python Dec. 6, 2024, 1:59 p.m.

The ch reference to a ramp works suprisingly well. However, since I need to control a ramp with raw data, in this case a dictionary attribute stored on a point, I'd like to instead control this ramp with a python expression. This is pretty straitforward with other parm types, I realize a ramp has its difficulties being a nested parm of sorts.

I would hope this would work, but, it doesn't ...

rampEval = hou.parm(pathToParm).evalAsRamp()
return rampEval

What is best way to send data to a playbar event callback? Jan. 1, 2023, 11:34 p.m.

Thanks for weighing in. It's probably best to initialize the callbacks on created yes. But the time it takes to update this is nil so I'm ok with that.

The issue is that current_node won't be available once the callback is playing. So my current solution is to save the current_node to a hou.session variable, such as hou.session.current_node