Solved ToolData.MouseInput() how to get right mouse click?

Hi,
I am writing a ToolData plugin,'msg[c4d.BFM_INPUT_CHANNEL]' always returns 1 in MouseInput function, I would like to know how can i get mouse right button event?

def MouseInput(self, doc, data, bd, win, msg):
    # Retrieves which clicks is currently clicked
    print(msg[c4d.BFM_INPUT_CHANNEL])  # -> 1

Thanks~

Hello @JACK0319,

Please excuse such a delayed reply, somehow this thread slipped away from my table.

The ToolData plugins are not actually designed to allow overriding the default pre-defined behavior (of right/middle mouse buttons in this specific case). In this specific case the events are not propagated to the ToolData plugins, hence the MouseInput function is not executed at all. I personally would suggest considering using modifiers instead.

Let me know if you have any further questions.

Cheers,
Ilia

MAXON SDK Specialist
developers.maxon.net

@i_mazlov
Hi,
thanks for letting me know that.

cheers~