spiralmonkey Posted November 4, 2005 Share Posted November 4, 2005 is there a way without using the HDK to get the unique ID of an op? I see in the class definition of OP_Node, it has an INT unique ID. Also, is this actually the case - is every OP guaranteed of having a unique id? if this is the case, and there isn't already a function, it would be handy to have a function which retrieves this, although i suppose in many cases it's also a recipe for disaster. every time you loaded in the hip file the numbers would be different. also, how does this work with OTLs? if i have 5 identical OTLs and they all have a "point1" sop in them, do the 5 "point1" sops each have a unique id?? thanks, alan Quote Link to comment Share on other sites More sharing options...
spiralmonkey Posted November 4, 2005 Author Share Posted November 4, 2005 okay, i'm partly answering my own question. yes, each node has a unique ID and the nodes of multiple instances of an OTL have different values. i wasn't sure if laying down an OTL is actually laying down an op network or reusing the same one, like a programming function would do. still don't know if there's a handy function to get it. Quote Link to comment Share on other sites More sharing options...
mtucker Posted November 4, 2005 Share Posted November 4, 2005 Your answers to your question are correct. Each node has a unique id assigned to it when it is created. That id is globally unique for the whole hip file. I believe that the id is not guaranteed to be the same when you load a hip file as when you save it (depending on save order, presence of locked assets, etc). And no, there is no such function. But as I'm sure you know it would take about 10 seconds to implement one with the HDK... Mark Quote Link to comment Share on other sites More sharing options...
spiralmonkey Posted November 4, 2005 Author Share Posted November 4, 2005 true, but we're trying desperately to keep our custom ops to a minimum. otherwise poor king tapir has the responsibility of recompiling them all every time we get a new version of houdini. i've decided to create an uber-sop that does all the silly little things that need doing. it'll be ugly. thanks mark Quote Link to comment Share on other sites More sharing options...
edward Posted November 5, 2005 Share Posted November 5, 2005 Just curious, what is this being used for? Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted November 30, 2016 Share Posted November 30, 2016 Hey, resurrecting 11 years old post is not a big deal right? I NEVER needed an unique ID for a years! But now this is what i'm looking for. We have hou.Node.sessionId() but it's valid for current session only. Ideally i would like to have hou.Node.uniqueId() and hou.nodeById() It's really rarely needed, but in my case would be a solution. Quote Link to comment Share on other sites More sharing options...
animatrix Posted December 1, 2016 Share Posted December 1, 2016 I submitted an RFE for this [ID# 78050]: GUID for nodes node.guid() 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.