Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

Sprytile

A Blender add-on for building tile based low-poly scenes with paint/map editor like tools · By Jeiel Aranal

Changing hotkeys

A topic by fleity created Sep 17, 2017 Views: 252 Replies: 6
Viewing posts 1 to 4
(+1)

Is there a way to change sprytile hotkeys? Specifically the tile picker alt hotkey conflicts with my other hotkeys.
thx for your help

Developer

There isn't a way to change sprytile's hotkeys beyond the one to invoke Sprytile, sorry.

I haven't figured out how to get modal key mappings working yet and it seems to be poorly documented in Blender.

I am open to creating alternate hotkey binding modes for future releases to accommodate users though.

(1 edit)

too bad there is not easy solution, but nice to hear you are already working on it.

However let's say I'd be fine with just editing the code to change this one assignment in particular from alt+leftclick to ctrl or shift + leftclick. What I would need to do essentially is replace event.alt with event.ctrl / event.shift in sprytile_modal.py, right? So far I thought the lines 818-820 invoke the picker but obviously that is not whole story. 

Can you give me a hint on where / what I need to edit?

Developer

Oof, I'm sorry it took so long for me to reply, this thread had slipped my mind.

The modifications to make to the files are in this gist, this is for Sprytile version 0.4.22: https://gist.github.com/ChemiKhazi/d73f60e7d68ad7bb64df7bd9ed6bebc7
Keep in mind that using the auto update mechanism will probably break any changes you make to Sprytile.

(+1)

Hey Jeiel,

no worries, it's a rather unsual and not very urgent request I guess (and yes I am aware that changing the code breaks the as soon as I update it) ^^.  Thanks for your answer.
Ok so the main thing I was missing before was the line in the gui file to change the cursors appearance. Now the eyedropper works with shift which is already very nice , but the alt key still gets intercepted by sprytile and my usual hotkey does not work.

Additionally I had to add 

        if event.alt is True or event.alt == 'PRESS':
            return None

in line 802 in the handle_mouse function and I've also added myself a new case in the gui.py file to get a different Icon (from the already implemented ones) for alt.

Thanks very much, looking forward to doing with sprytile now :D


Developer

Thanks for figuring it out. Was the hotkey that was being intercepted only using the alt key with no other combination?

(+1)

hey Jeiel, nope it was using alt as a modifier combined with left click (pretty much exactly the same as the eyedropper tool)