Jump to content
jamesr

Using hou.nodeType without "fully qualified" names

Recommended Posts

Posted (edited)

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×