Search - User list
Full Version: [Python] Getting the input node of a digital asset. It doesn't update.
Root » Houdini Indie and Apprentice » [Python] Getting the input node of a digital asset. It doesn't update.
Andr
I'm working inside the python module of a digital asset.
I need to retrieve the upstream node connected to the input of the digital asset.

The code I'm using is the following:

def getinput():
  hdaNode = hou.pwd()
  inputNode = hdaNode.inputs()

This code is invoked by a button parm with callbackscript hou.phm().getinput()

The problem with this code is that it registers the particular input nodeA that is connected to digital asset at the moment of the saving of the digital asset.

When I connect another nodeB, it would return always nodeA, unless I save the properties of the digital asset when nodeB is connected.

Any idea how to update it?
Andr
opsss…. I've found the solution.

inputNode = hdaNode.inputs() was originally outside getinput(), and indeed it would not update.
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