gui.TreeViewFunctions.InputEvent arguments error



  • Hello guys!
    There is a strange error when i trying to use InputEvent in TreeViewFunctions.

    da2f6250-c354-4e5e-9e40-2c1c83f75fc8-image.png

    def InputEvent(self, root, userdata, pArea, msg):
            
            if msg[c4d.BFM_INPUT_CHANNEL] == c4d.BFM_INPUT_MOUSELEFT: 
                print "Left Mouse Pressed" 
    
            return True
    

    returns

    TypeError: InputEvent() takes exactly 5 arguments (4 given)
    

    Any idea how to fix it?
    Example plugin:
    TreeViewExample.pyp.txt



  • Hi @mikeudin,

    Thanks for reporting this is a bug in c4d.gui.TreeViewFunctions.InputEvent. Only the two first parameter is correctly passed, the third one was passed as an int (nothing useful). So nothing in your sied to fix it.

    It's going to be fixed in the next Cinema 4D version.
    I will update the post once it's available.

    However, you could use MouseDown/DoubleClick.
    Cheers,
    Maxime.



  • This bug is now resolved in R21 sp2.

    Cheers,
    Maxime