THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/05/2006 at 07:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.5
Platform: Windows ;
Language(s) : C++ ;
---------
Hello;
I've been stumbling over a problem recently. I have some plugin tags which refer to points of a point object (the base object of those tags). To keep this reference up to date when the point object changes, I use a message of type MSG_TRANSLATE_POINTS. That works fine for added, removed, merged, or interpolated points.
However, there are some transformations which are not yet handled correctly (and perhaps more which I just haven't tried yet).
-- When I subdivide an object, only MSG_POINTS_CHANGED messages arrive. (okay, I can live with that... but it still seems weird since I would expect an interpolation map in a MSG_TRANSLATE_POINTS message instead.)
-- Mirroring a polygon object (done by setting -1 in the scaling) result in the same message. I am not able to extract the nature of the change from this message (at least not in a feasible way). However, my tags need updating to reflect the mirroring. Do I really need to include "mirror" buttons in my tags which implement a manual change, or is there a way to trigger an automatic reaction?
-- And the worst problem: Merging two polygon objects does not work properly. The merged copy shows only the tags from the first merged original; all my tags from the second object are forgotten, even when the tags are defined as TAG_MULTIPLE. The copied tags don't get the proper messages about adding the points from the second object; links in the tags are not redirected (well, I didn't really expect that to work...). As a result, the point references for the second polygon object are lost, and there is no way to retrieve them after the merge.
Thing is, I know that there is a trick, at least with the merge function! If I define two polygon objects and give each a distinct point weight tag, the merged object has both weight tags, and both work properly although the point indices must have changed internally! How do they achieve this? What do I miss?
Or maybe I'm on the wrong track and the Merge and Subdivide functions (and maybe more) do not send MSG_TRANSLATE_POINTS at all, but perform the merge on some selected, C4D-internal tags themselves? In that case, I would need to write my own merge function, which I shy away from for obvious reasons.
Please, can anyone give me a hint how to handle these problems?
-- Cairyn --