Im trying to dynamically track all the objects in the active BaseDocument, including the cached InstanceObjects and BaseObjects that are created by cloner objects.
I have a function that scrapes the BaseDocument contents and keeps a list of all the relevant objects as BaseLinks. This list is updated every time there is a change in the BaseDocument.
This is working very well with most scenes, and I can track all the InstanceObjects and (cached/deformed)PolygonObjects in the scene.
However, I found that in certain scenes, BaseLink::GetLink will crash on PolygonObjects taken from some cloner cache's. I suspect it has something to do with mograph cache?
I also found that pointers to these PolygonObjects that crash GetLink, will work initially, but then suddenly stop working and return 0 on GetType.
Am i doing something wrong here? Or did i find a bug? Are there better ways to do what im trying to do?