AtNode * lifetime

AtNode * lifetime

Anonymous
Not applicable
729 Views
2 Replies
Message 1 of 3

AtNode * lifetime

Anonymous
Not applicable

Hi all,

I'm curious about the lifetime of an AtNode *.

Let's say in node_initialize I grab another node's AtNode *. Is it valid/okay to store that inside the struct I have for my node's local data to use it within node_update? Or should I be performing an AiNodeLookupByName within node_update to grab a fresh pointer? (incase anything has been ditched, reallocated, moved or otherwise messed with).

If either is fine, I assume keeping is preferable for (extremely minor, I'd assume) perf benefit. Is that reasonable?

Cheers,

Alan.

0 Likes
Accepted solutions (1)
730 Views
2 Replies
Replies (2)
Message 2 of 3

Stephen.Blair
Community Manager
Community Manager
Accepted solution

Hi Alan

The devs say "That sounds about right, I'd update the node pointer in each node_update call (which will help with IPR changes anyway)."





// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks very much, Stephen.

Cheers,

Alan.

0 Likes