Hi Zipit, thanks for the reply.
The Optimized Cache is off.
I isolated the dirty check code since I couldn't get that part to work.
Your example works for a child, if I replace it with a link as in my case, then it doesn't work.
linked_object = op[c4d.ID_USERDATA,2]
# No linked object
if linked_object is None:
# Return the linked object if it is dirty or if op has not build any caches yet.
if linked_object.IsDirty(c4d.DIRTYFLAGS_ALL) or op.GetCache() is None:
# Consume the dirty flag of the linked object.
# Get a clone of the linked object, as we cannot insert the same node twice
# into the document (Cinema has a mono-hierarchical graph).
clone = linked_object.GetClone(c4d.COPYFLAGS_NO_HIERARCHY)
# Center / align the clone to the Python generator object.
print "Build cache"
# Otherwise return the cache.
#print "Returned cache"
Maybe the python generator can only dirty check its children? Or perhaps the links need special handling?