Javad Sadeghi

javadsadeghi

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Engine

Availability

Not Specified

Recent Forum Posts

[PYTHON] How to access a hou.PythonPanelInterface object? 2024年5月27日12:30

Hey all,

I'm trying to use setActiveInterface(interface) from hou.PythonPanel class. According to the documentation, the required argument (interface) is a 'hou.PythonPanelInterface' object, but I couldn't find any method that allows you to access that interface object.
does anyone know how I can access my python panel interface object?

thanks!

Parameters Editor Scroll Position returns 0,0 2023年11月27日5:22

Hey everyone!

I am currently working on a HDA that requires scroll position data on the Parameters panel. To achieve this, I have created a Python module function that is called when user interacts with certain parameters. However, I am facing an issue where the code always returns 0,0, even when the scroll position is not at 0%.

here is the code:
scrollpos = hou.ui.curDesktop().paneTabUnderCursor().scrollPosition()

any help would be greatly appreciated!

Segmentation Error once I try to get HDA definition 2023年11月23日11:09

viklc
Hey,
parmTemplateGroup [www.sidefx.com] is a method of class hou.HDADefinition and it takes no arguments and returns a parameter template group of a node type on success.

Try it like this:
>>> node = hou.node('/obj/geo1/gvx.test1')
>>> node_type = node.type()
>>> definition = node_type.definition()
>>> temp_grp = definition.parmTemplateGroup()
>>> temp_grp 
<hou.ParmTemplateGroup>

If you intend to create a new parameter template group, you can call the corresponding class [www.sidefx.com] and initialize an object with parameter templates or fill it afterwards:
>>> parm = hou.FloatParmTemplate("name", "Label", 1)
>>> new_ptg = hou.ParmTemplateGroup((parm, ))
# or 
>>> new_ptg = hou.ParmTemplateGroup()
>>> new_ptg.append(parm)

Hey, Thanks for your reply! I tried your way as well but Houdini still crashes.