Jake Allen

jakemadeathing

About Me

EXPERTISE
Generalist
INDUSTRY
Advertising / Motion Graphics

Connect

LOCATION
United States

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Querying Selected Keyframes in Python Nov. 1, 2018, 12:04 p.m.

Just bumping this topic because I ran into the same idea again and found a solution this time in the help files, in case anyone else would like to know. You just have to find the Channel Editor (Animation Editor) using python, and once there the Channel Editor has a graph() function to give you the current graph as an object. The channel graph lets you run selectedKeyframes() to query the currently selected keyframes.

The help files have a good code example to get you started: [www.sidefx.com]

channel_editor = hou.ui.paneTabOfType(hou.paneTabType.ChannelEditor) # find any pane tab that is a Channel Editor
keyframes = channel_editor.graph().selectedKeyframes() # get the graph's selected keyframes in a dict called keyframes
for parm in keyframes.keys():
    for key in keyframes[parm]:
        key.setValue(2 * key.value()) # this can be anything, like setExpression("bezier()")
        parm.setKeyframe(key)

Anyways hope this helps folks figure out some python scripting options in Houdini!

Houdini Digital Asset is outputting bad geometry that Maya cannot handle Aug. 9, 2018, 12:32 p.m.

awong
I made an asset that attempts to identify/clean these unsupported polygons. Maybe give it a try and see if it helps.

Just wanted to chime in as well and say this saved a bunch of shattered geo from coming in all broken from Houdini Engine. Great stuff, UVs were imported perfectly. Thanks!

Querying Selected Keyframes in Python Feb. 19, 2018, 3:40 p.m.

Hey there, this may be a silly question but I can't find any information about it online. I'd love to be able to set slope and angle of selected keyframes using either a shelf tool or python panel, but I can't seem to find out how to get the selected keyframes in the Python Shell. hou.SelectedNodes() seems to only return the selected node in the Network Editor.

Any help on how to proceed would be appreciated!

Jake