On 01/12/2017 at 05:21, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R19
Platform:
Language(s) : C++ ;
---------
Continued on the problem of initializing a tag with information from the object it has been assigned to:
https://plugincafe.maxon.net/topic/731/13893_tag-plugin
The above thread provided some information related to MSG_POLYGONS_CHANGED and while I was close to a solution, further testing resulting in even more questions.
What I noticed so far:
- moving a tag from one object to another -> MSG_POLYGONS_CHANGED is sent twice to the tag
- selecting edges and apply connect -> MSG_POLYGONS_CHANGED is sent twice to the tag
- apply a subdivide on the full object or selected polygons -> MSG_POLYGONS_CHANGED is sent 3 times
- using knife tool to cut some polygons -> MSG_POLYGONS_CHANGED is sent once
As mentioned in the above thread, the second message is the important one in case when using "connect", since it's only at that point that the internal structure is (almost) finalized and ready to be used for initialization. (At time of first message the internal structure is still being "modeled" so not good to be used).
So, my original solution was to initialize the tag on the second message, but then subdivide or knife tool came along and ruined that.
Seems I cannot find anything consistent to detect a change of geometry. Very frustrating indeed.