Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AtNode * lifetime

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
alan-LFL
178 Views, 2 Replies

AtNode * lifetime

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.

Tags (2)
Labels (2)
2 REPLIES 2
Message 2 of 3
Stephen.Blair
in reply to: alan-LFL

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
Message 3 of 3
alan-LFL
in reply to: Stephen.Blair

Thanks very much, Stephen.

Cheers,

Alan.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report