Notifications
Clear all

[Closed] SDK: isvalidnode equivalent??

how do you store the node between max sessions?

Well I don’t actually store the node, just a pointer to it as a variable in the plugin base class like

INode *myNode

Then I have a pickbutton callback where it uses

myNode = vpt->GetClosestHit()

So how to make the plugin check that the node it’s pointing to is actually a thing that exists?

1 Reply
(@denist)
Joined: 1 year ago

Posts: 0

it sounds like “how to check if a given pointer is still valid?”

the answer on this question is “Nohow”. the best you can do is to call what i wrote above with a try/catch expression

is it a utility plugin? you probably have to reset it yourself on new, reset, and scene load …

actually the best is not sending of a certainly invalid pointer. which means you have ZERO it on scene any reset

actually the best is not sending of a certainly invalid pointer. which means you have ZERO it on scene any reset

It seems that the simplest answer is once again the right one! I shall set up the appropriate notifications.

Page 2 / 2