How to obtain the selection order of objects in C++
-
I used C++ to write the C4D S26 plugin on Windows 10, I want to get the order in which BaseObject are selected by the user, User selections can be unordered, I want to know the order in which he was selected.
Thanks in advance!
-
Would BaseDocument::GetActiveObjects() and the GETACTIVEOBJECTFLAGS::SELECTIONORDER flag do the trick?
Steve
-
Hi @pchg ,
@spedler thank you for providing the answer. You should actually give the aforementioned GetActiveObjects() function with the SELECTIONORDER flag a try.
You should be careful with this function though, when selecting hierarchies, as this could lead to some not completely expected results.
Cheers,
Ilia -
@spedler Thank you for your help