in 3dsmax we have reference and instance when an object is a reference it will point to all instance too, so if i have 12000 instances and 1 reference it will show all the instance as reference and instance, plus for the instance object, it will set all 12000 objects as a reference point again.B.Y.O.B. wrote: ↑Thu Mar 04, 2021 7:42 pm The Blender addon does it single threaded too, and in Python on top of that.
It sounds to me like the algorithm to detect instances is very very complicated. How does it work, in detail? I would first check if there's a faster alternative before thinking about multithreading.
so i created a list of objects first
then for every single node, i check all nodes list to be sure it is the instance and not the reference.INodeTab& nodes
The problem is just about the references and not instances. i don't know why but 3dsmax return reference as an identical instance with a different object Ids.
Code: Select all
long insNumber = IInstanceMgr::GetInstanceMgr()->GetInstances(*node, nodes);
Code: Select all
node->GetObjectRef() == nodes[j]->GetObjectRef()
And for reference object will return all of the previews nodes too.
maybe i can explain that in a screenshot in next post.