SOLVED Is MSG_TRANSLATE_POINTS still in use?

Hello;

I am in the process of writing a tag, and the messages it receives seem to differ from earlier C4D versions (??).

I need to keep up with point changes throughout. That used to be done with either the message MSG_POINTS_CHANGED, or MSG_TRANSLATE_POINTS, both of which contain mappings in its message object.

While I can still receive MSG_POINTS_CHANGED (I haven't yet looked at the content, just trying to get the messages at all at the moment), C4D never seems to send me a MSG_TRANSLATE_POINTS, not even for Weld or Melt commands executed on the Point Object, which are explicitly mentioned in the translate mapping.

Question: Is the message MSG_TRANSLATE_POINTS still sent in the system, or has it been deprecated? Is it all CHANGED now? If not, which operation do I need to perform on the object to get it sent (for testing reasons)?

Hello @Cairyn,

thank you for reaching out to us. I just wanted to let you know that your question has not been overlooked, but rather S24 related things have gotten into the way. I already had a brief look at your problem, confirming your conclusions. I will have a more thorough look tomorrow and will hopefully then produce an answer.

I am sorry for the delay, hoping for your understanding,
Ferdinand

@ferdinand np... I did so much Python lately that I forgot to add the C++ tag here

Hello @Cairyn,

so, this is a bit ambiguous. The message still being used internally, but mostly as part of conditions, i.e., it is being checked for. I could find only one case in which this message is being broadcasted, namely in the context of a function called ToPoly which casts a BaseObject into a PolygonObject.

ToPoly(cobj)->Message(MSG_TRANSLATE_POINTS, nullptr);
ToPoly(cobj)->Message(MSG_TRANSLATE_POLYGONS, nullptr);
ToPoly(cobj)->Message(MSG_TRANSLATE_NGONS, nullptr);

But as you can see, the three major translations messages are being set out without providing any translation maps, instead just a null pointer is being provided. I looked also for "hidden" cases where a copied message is being resent, i.e., something like someNode->Message(COPIED_ID_WHICH_IS_MSG_TRANSLATE_POINTS, translationMap), but could not find any. I currently do not see any continued usage for that message anymore, I have asked the developers if they still use it (i.e., if I have overlooked something here).

edit (the dev reply):

All the MSG_TRANSLATE_.... sent by the old modeling kernel are not sent by the features we migrated to the new modeling kernel (most of modeling features) [...] So, it is there just for the rare cases where we use still the old modeling code (eg. Poly pen for example)

May I ask in which context you are trying to use that message?

Cheers,
Ferdinand

thank you for looking! Looks as if that message is indeed dead. Without a translation map, it would be fairly useless...

The original use I had for it was in a Morph plugin (goes back to R8) so the various morph shapes could keep track of changes done to the original mesh. It's not properly working there any more; guess I know now why 😉

My current use is a Symmetry plugin I just finished. Right now, it only works by mapping right points and left points, and duplicating positional changes. I am now looking into possibilities to track added or removed points (and maybe polygons) on one side to duplicate that too. The TRANSLATE messages used to do that, including special information like "point A was merged with point B", but naturally all tools need to support that, and apparently the new kernel has moved on to some other method.

I guess I'll investigate whether MSG_POINTS_CHANGED is now carrying the required information...