Jump to content

Invalid Node Name for .createOutputNode()


venator11387

Recommended Posts

I'm learning Python in Houdini and I'm just writing up a simple code. Everytime I try to use the .createOutputNode() I keep getting an `invalid node name` error. The operator name of the node I'm trying to create entering is definitely correct as I've checked using the Type Properties, so I'm not sure what's causing this. 

 

The attempted operation failed.

invalid node name
 
Traceback (most recent call last):
  File "voronoi_set_up", line 16, in <module>
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.509/houdini/python2.7libs\houpythonportion.py", line 220, in createOutputNode
    exact_type_name)
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.509/houdini/python2.7libs\hou.py", line 22595, in createNode
    return _hou.Node_createNode(*args, **kwargs)
OperationFailed: The attempted operation failed.
Invalid node name

import toolutils

# If there is a node selected, then execute the code
if hou.selectedNodes():
    # Set the selected node to be the source node
    source_node = hou.selectedNodes()[0]
    
    # Create the Null SOP output for the source geo
    start_node = toolutils.genericTool(kwargs, 'null', 'OUT_GEO')
    start_node.setInput(0, source_node)
    start_node.setPosition(source_node.position())
    start_node.move([0, -1])
    start_node.setColor(hou.Color([0, 0, 0]))

    # Create a VDB From Polygons node to turn the source geo into a fog volume geometry
    fog_node = start_node.createOutputNode('vdbfrompolygons', 'create fog volume')

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...