Safety of GetCache() after ExecutePasses()?
-
Hi all!
I am implementing a recursive traversal of a scene, visiting all real and virtual objects in the hierarchy, closely following the recursive function outlined in the documentation of BaseObject::GetCache().The docs also say this about safety: "Use the above routine only if the caches are already built. It is for instance not safe to use it in a command plugin since the user can have stopped the scene redraw and the building of caches."
Is it safe to call this routine if I have built the caches myself using ExecutePasses(), even if called from a command plugin?
/Filip
-
Hello,
The documentation specify this because you can launch the command during an update and having the scene in a "strange state" Something you have to be aware.
Before using
ExecutePasses
you should callStopAllThreads
.
The scene will be update and you can retrieves the caches.Cheers
Manuel. -
@m_magalhaes said in Safety of GetCache() after ExecutePasses()?:
The scene will be update and you can retrieves the caches.
Great, thanks!
/Filip