Hello @mogh,
thank you for reaching out to us and for bringing your feature request forward. Unfortunately, it is very unlikely that we will ever implement something like this.
CallCommand()
does nothing other than executing a CommandData
plugin (internally we also use other interfaces, but that is the gist of it). It will also work with a plugin id of one of your own CommandData plugins for example. A CommandData plugin, or more specifically its Execute
method, has no explicit inputs, only an implicit input, the argument doc
which is passed to it by Cinema 4D upon execution. So, there is no meaningful way to pass an input, your list of objects, to a CallCommand() execution.
We could of course write a little wrapper which could for example change the object selection state of doc
based on your list and the repeatedly pass that to Execute(). It is however unlikely that this would bring any significant execution speed improvements. In C++ you would just replace one overhead (the time it takes between CallCommand() and Execute() being invoked) with another one (doing all the document shuffling). And in Python it might yield very minor speed improvements, but the overhead of the Python bindings for 20,000 CallCommand() calls should be below one second (i.e, 50 µs per call). So, the performance which could be gained here is negligible. CallCommand() is also heavily being used internally, which further decreases the likelihood that we start shuffling things around there.
When I remember correctly, you were operating on some very heavy CAD data with tens of thousands of objects in a scene. Your proposed feature would not help you there, neither in Python nor in C++. Calling CallCommand() thousands of times in a row will take time, because that is not what the CommandData interface ever has been intended for. If you want these CAD-cleanup and merging operations on GBs of data to run fast, you will have to write the functions from the ground up in a multi-threaded manner in C++.
Cheers,
Ferdinand