On 06/09/2015 at 00:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Mac ;
Language(s) : C++ ;
---------
I've got a tag plugin that needs to operate on the deformed points of an object.
What is the best way of retrieving this information through the C++ API? It seems like GetDeformCache() doesn't always work, depending on where and when you call it. The documents briefly mention using the Hierarchy class to rebuild caches, but state that this is extremely resource intensive and should be used sparingly.
Since I'm using the tag on anywhere from 10 to 80 objects in a single scene, I'm guessing I probably shouldn't be using the Hierarchy class as per the SDK warning. However, I'm not sure what else I should use in it's place. I need to get access to the deformed points whenever the tag is executed, but as I said before, GetDeformCache() tends to fail if the scene has just been loaded from disk or is being sent to an external renderer (like the picture viewer).
There's gotta be some way of doing this, since the Xpresso Point node has a "Use deformed points" option that does exactly what I'm looking for. I just need to know how to implement that in my own C++ plugin.
-CMPX