Jump to content

Using hou.nodeType without "fully qualified" names


jamesr

Recommended Posts

Using instances() with hou.nodeType() to grab node instances is really nice. Does anyone know a way to grab all the instances for an operator type with a version string in the operator type name? ie.

jamesr::myasset::2.00

Since the version is in the type name itself, it seems like you have to specify the version as well in order for it to work, ie

hou.nodeType("jamesr::Object/myasset::2.00")

instead of just

hou.nodeType("jamesr::Object/myasset")

I was hoping there must be, since you can create nodes without specifying the version like

hou.node("/obj").createNode("jamesr::myasset")

I've tried using hou.preferredNodeType(), but it still seems to required the version string  as well. When testing it on a builtin node who has multiple definitions including a version string like "rainbow" with

hou.preferredNodeType("Vop/rainbow")

it works fine. 

I could always use a  [x for x in hou.node("/obj").children() if "jamesr::myasset" in x.type().name()] type of thing, or get the node type from an existing node, but I was just wondering if it is possible this way.

If anyone has any relevant posts I might have missed that I could check out, that would be great too.

 

Thanks! 

Edited by jamesr
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...