Intercepting Messages

On 16/01/2013 at 09:36, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R13 
Platform:    Mac  ;  
Language(s) :     C++  ;

Hello all,

I've been trying to figure out how to interrupt  a message from Cinema and then have it preform a different  action instead of what it's supposed to do.

So for example, I have a tag plugin and I select an object, and instead of selecting the object as would be expected, a sphere is created.  I assume this is done in the Message function but I haven't been able to find the correct Message ID and I can't figure out how to stop Cinema from doing the action it's supposed to.

Any advice where to look/start?


On 16/01/2013 at 12:12, xxxxxxxx wrote:


at least pluin messages are being consumed by returning true, but i do not think that is how
coremessages do work. on top of that, i am not so much into all this core stuff, but i do not think
that it is possible to supress certain actions with this approach, as c4d is stritly oo. there is no
central 'hub' recieving messages and then executing things.

if there is an way to do this, i think you will have to look into a SceneHook plugin. but i think it
depends on what you are after. for your example it would be enough to listen for selection 
changes in your plugin and when such an event occurs, restore the last selection and insert
a sphere.

On 17/01/2013 at 09:43, xxxxxxxx wrote:

I couldn't find any ID explicitly sent because the object was selected, at least not from
NodeData::Message(), therefore I assume it is not possible to break into this procedure.


On 21/01/2013 at 11:37, xxxxxxxx wrote:

Sorry about the late response, busy with other C4D stuff! Thank you both for helping, that's what I was afraid of Niklas.  I'll look into a SceneHook plugin, Ferdinan.

What I currently have is a Tag plugin that when the selection is changed, the current selection changes to a object I set.  But I wanted to try to get rid of the brief blip where the object the user selected is actually selected before it switches to what I want selected.  If that makes sense.

Thanks for the help,