THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/01/2003 at 03:39, xxxxxxxx wrote:
Cinema 4D Version: 8.012
Platform: Windows ; Mac ;
Language(s) : C++ ;
I've got a plugin that needs to be called (before redraw) whenever we are in edit mode and the point data for the active object has changed in any way, and I'm having problems...
My current plan is:
1. Use a MessageData plugin type, and detect EVMSG_CHANGE messages using 'CoreMessage' method.
2. Check that we are in edit mode, else exit.
3. Check that an object is selected, else exit.
4. Check that object is poly, else exit.
5. If needed, recalculate my data which is stored in object's base container.
1. Is there a more specific message I should be checking for that will generate less 'false alarms', or am I checking in the wrong way anyway?
Note: The 'MSG_Atom' enum has a 'MSG_POINTS_CHANGED' value, but I don't understand the messaging system enough to know how/whether I can detect that happening...
2. Having recieved an EVMSG_CHANGE core message, how do I then get a pointer to the current document, so I can actually get at the current object and do the rest of the processing. I'm sure I've missed something totally obvious, but the 'MessageData' plugin doesn't seem to contain pointers to anything else. How do I get a pointer to the current document?
Any help much appreciated...
On 16/01/2003 at 17:59, xxxxxxxx wrote:
MSG_POINTS_CHANGED is unfortunately only sent to the active object and its branches (i.e. its tags and tracks). It's not possible to get this message in a message plugin.
I think since core messages are always global you can safely use GetActiveDocument() to get the document.
On 18/01/2003 at 09:21, xxxxxxxx wrote: