Jump to content

Why do I get invalid node type names using Python?


magneto

Recommended Posts

Hi,

 

When I am traversing all vop nodes using this code;

 

ops = []
category = hou.vopNodeTypeCategory()
for node_type in category.nodeTypes().itervalues():
    if not node_type.hidden():
        ops.append(node_type.name())
I am getting invalid node type names like "ptreplicate", "rayhit". When I try to create them inside attribute vop, I get "Invalid node type name" error.
 
Is this normal? What are these node types that are not available in the TAB menu but they are also not hidden.
 
 
Thanks :)
Link to comment
Share on other sites

Certain VOP node types are only available in certain contexts so you can't create every type everywhere.  This behavior is defined in the VopNet Mask field in an operator's Type Properties.

 

For example the Ray Hit operator has a mask of "surface photon displace light shadow fog" that basically indicates that it can only be used in shading VOP contexts.

 

The ptreplicate VOP can only be used in "vopmaterial" networks.

  • Like 1
Link to comment
Share on other sites

Thanks Graham. I thought everything was CVEX now. So SHOP contexts are still specialized like the old SOP and POP contexts? If so, will there be any plans to make SHOP context CVEX too so we can use the same VOPs/functions anywhere else, not just in the SHOP context?

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...