On 29/03/2016 at 02:51, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Mac ;
Language(s) : C++ ;
Greetings to all.
I have a tag plugin that reads in some point data from another polygon object, and I'm trying to determine when that polygon object is changed (more specifically, when the topology is modified).
Originally, I was using GetCache(DIRTYFLAGS_DATA) for this, but that doesn't work if the polygon object has a Weight tag on it (the moment you touch any joints associated with that tag, the dirty data checksum changes).
I've tried using MSG_POINTS_CHANGED and MSG_POLYGONS_CHANGED, but these don't seem to tell me what object has actually been modified and I get spurious messages from other sources when I know the polygon object in question has **not** been modified.
I've also tried using MSG_TRANSLATE_POLYGONS and MSG_TRANSLATE_POINTS. I receive neither message if I start modifying the polygon object in the viewport.
Is there no way to tell when a polygon object has been modified? I don't need to know *how* it was modified, only that it was. My plugin does some computationally expensive calculations that don't need to occur unless the polygon topology changes, so I'd rather not go through that entire process every time the tag is executed if I don't have to.
On 30/03/2016 at 02:08, xxxxxxxx wrote:
I wouldn't know any specific way to learn if a polygon object changed its topology. Both the polygon data and the tags assigned to an object are internal data of that polygon object. So when the polygon data is changed the dirty flags change and also when tags are changed the dirty flags change (I assume you don't actually do GetCache(DIRTYFLAGS_DATA) but GetDirty() ).
So I'm afraid that checking GetDirty() is the best option I know.