The function GetAndCheckHierarchyClone
creates clones of all children, therefore it has to read everything from the children and you need ACCESSED_OBJECTS_MASK::ALL
in the read part. It'll also mark the children as being consumed by your generator so that they don't create virtual objects on their own (only their clones in the cache of your generator will create virtual objects), and for this mark you need ACCESSED_OBJECTS_MASK::CACHE
in the write part.
GetAndCheckHierarchyClone
doesn't read global matrices, so the GLOBAL_MATRIX
flag isn't needed.
The flags in the other call can be reduced to access.MayAccess(node, ACCESSED_OBJECTS_MASK::NONE, ACCESSED_OBJECTS_MASK::CACHE)
. That's because your GetVirtualObjects
doesn't read anything from the generator itself (NONE
), it'll only set up its virtual objects (CACHE
). As soon as you access the BaseContainer of your generator, you have to add DATA
. For the matrix MATRIX
or even GLOBAL_MATRIX
etc.