Define your own icons for mouse cursor



  • Can you define your own icons or bitmaps as mouse cursors?



  • Hi @pim this is unfortunately not possible to define another mouse cursor than these one Mouse Enum.

    Cheers,
    Maxime.



  • Actually, if I use c4d.gui.RegisterIcon() and c4d.gui.SetMousePointer(), it seems to work.

    bm1 = bitmaps.BaseBitmap()
    bm1.InitWith(os.path.join(path, "res", "mouse rightbottom.png"))     
    c4d.gui.RegisterIcon(9988, bm1, x=0, y=0, w=-1, h=-1)
    ....
     c4d.gui.SetMousePointer(9988)
    

    Am I doing something that is forbidden?



  • While you can't break anything doing that, I'm surprised you are able to make it working constantly (here and looking how internally its work, it can't be used in all conditions (try to call it from the console or script manager) the icon will not stay.

    So maybe in a Dragging process, it could work, since you set the icon displayed to your icon ID for each redraw but that's it otherwise the default icon ID is redefined.

    Cheers,
    Maxime.



  • Ok, something to think about and to consider.


Log in to reply