Jump to content

Unique Otl Instance Id


Recommended Posts

hello,

Is there an instance id associated with an otl in a scene that's accesable via hscript/expressions?

Say I have an olt called MyFancy otl and I have this otl in the scene at least 3 times within various networks. Is there a unique ID assigned to each instance of this otl?

I need to write some text data to disk but I need this date to be unique per operator instance. I can't use the network path because that could be the same in another scene.

Edit: worse case I guess I can write a custom expression to generate a unique id for each instance.

Thanks,

/Rick

Link to comment
Share on other sites

I have a vague idea that they have recently added a function like this to H8, I'll have to do some digging.

If not how about using the onCreated event script to increment a global variable that is then picked up and used to set a parameter on your asset, this channel could then be used as your unique id.

Link to comment
Share on other sites

I have a vague idea that they have recently added a function like this to H8, I'll have to do some digging.

If not how about using the onCreated event script to increment a global variable that is then picked up and used to set a parameter on your asset, this channel could then be used as your unique id.

25727[/snapback]

Yeah I think this might be the way to go.

Basically I'm working on a Geometry Cacher otl and I have most of the inner workings wrapped up. One feature is to delete old cache files. The problem comes in when I need to find only the cache files written from this instance of the otl. It gets tricky because I have several options on how to name the cache file so it would not necessarly be the same name every time.

I was hoping to embed the id of the otl into the filename so it can be easily found by my parsing script.

For now I'll work on generating a unique id myself or even possibly logging the path for the cache file into an inivisble parameter in the otl. I just have do some tests and research to see what the limits are on the string parameter type.

Thanks!

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