On 08/06/2015 at 05:44, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Mac OSX ;
Language(s) : C++ ;
---------
Hi,
I have an ObjectData plugin.
Inside GetVirtualObjects I change the size and positions of my objects, which are modifications to the active scene. In the document "Important Threading Information" it says that you need to call StopAllThreads() before making any modifications to the active scene.
My problem is, when I add StopAllThreads() at the top of GetVirtualObjects(), every change I have in my description triggers a redraw of the whole scene. Because of that I can't accurately see how much I've changed my object, or how much I've changed it in comparison to other objects (they also get redrawn).
Because my plugin is mainly about those objects, and their position, relative to the other objects, this is very bad. If the scene updates on every little change I do, I cannot directly see WHICH change I'm doing, and this will cost the users of the plugin quite some time, which I cannot have.
Is there a workaround for this?
Should I delete StopAllThreads and manually make sure that there can't be two threads at the same time?
Or is there a possibility, when there needs to be a redraw, to check what needs to be redrawn and what not? And if so, how should I go on this?
I assume not every plugin-developer uses StopAllThreads(), or they have a workaround to solve the redraw problem, I guess?
I have seen a house-plugin which doesn't redraw the whole scene, but just that one element.
Thanks in advance for your help and time!
Greetings,
Casimir Smets