On 18/11/2015 at 01:46, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Mac ;
Language(s) : C++ ;
Is it possible to somehow differentiate when:
A polygon object has been changed or edited through the viewport (the actual object itself has been modified)
That same object has been affected by a deformer, but not actually modified in a destructive manner?
I would have thought that GetDirty() was the way to go, but I can't seem to make the distinction between the two using it. If I call GetDirty(DIRTYFLAGS_DATA) on the polygon object itself, I get a different checksum whenever that polygon is changed OR a deformer acts upon it. Apparently I can't call GetDirty(DIRTYFLAGS_DATA) on the object returned by GetDeformCache() because it seems like the checksum is reset every time the caches are rebuilt (so the checksum could be the same even though a deformer has modified the object). GetDirty(DIRTYFLAGS_CACHE) seems to return a different checksum whenever something causes the rebuild of caches, but I'm not sure if this occurs every time a deformer fires off or not.
How can I tell which has happened?
On 18/11/2015 at 05:27, xxxxxxxx wrote:
Remember that GetDirty() returns a state value that affects how C4D processes things like objects in order to, say, rebuild the cache when the object is affected by a deformer or creates parametric geometry and so on. Therefore, GetDirty() isn't going to be useful for such a differentiation - it simply denotes the need to rebuild when something changes.
There are a set of messages, MSG_TRANSLATE_xxx, that should only occur when the points, polygons are modified using the modeling tools (triggered by Modeling::Commit()). That would cover 1) and anything else 2) could be handled separately possibly.