Jump to content

Local Vars Access


Recommended Posts

Hi,

I know this may seem absurd - but anyway - is there a way to access (read) values of local variables of a node? For example at the SOP level. I don't mean attribues - I meen variables. - I.e. is ther some kind of get_local_var("/obj/geo1/resample1", $NPT, 0); ?

Thanks.

P.S. Or maybe I should try some vodka instead of speculating about obscure topics.

Link to comment
Share on other sites

No, but most of that is available in expression functions anyhow (eg. npoints() - 1 for $NPT ?). For local vars that change per point as it is cooking, it doesn' t make sense to have external access because mostly at that point, the SOP in question is already done cooking.

Link to comment
Share on other sites

Hi,

I know this may seem absurd - but anyway - is there a way to access (read) values of local variables of a node? For example at the SOP level. I don't mean attribues - I meen variables. - I.e. is ther some kind of get_local_var("/obj/geo1/resample1", $NPT, 0); ?

Thanks.

P.S. Or maybe I should try some vodka instead of speculating about obscure topics.

Nope. The point of local variables is that they often are unique per point/primitive of the input. Thus, trying to access them from somewhere else, you'd also have to specify which point (or primitive) number you were interested in (if you could even do it), which would then cause a re-cook of the data inside that SOP. More difficult would be the implementation, as right now it's done on kind-of as a callback: the code says "get me this parameter value", which then contains a local variable, which then causes a callback function to be called that stuffs the correct value into the local variable, that is then returned as part of the evaluate-parameter function.

-- Antoine

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