Unleash the power of 3D
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #24084 Likes: 0
    • Posts 4

    Having a bit of frustration. I would like to be able to run short blocks of python code, basic commands harvested from the python console, via a hotkey. Ideally I would like to press a hotkey and invoke –

    bpy.ops.object.mode_set_with_submode(mode=’EDIT’, toggle=False, mesh_select_mode={‘VERT’})

    Unfortunately there doesn’t seem to be an easy way to do this. I’ve seen various web posts about putting this code into the Preferences – Key Map panel, but that doesn’t seem to work. Even the shorter version –


    which actually fits into the space, fails to launch with a hotkey.

    Someone else said that you need to code up an addon, which I’ve done following some youtube videos. But I still can’t seem to bind a hotkey to launch the addon.

    Seems some prerequisite information is missing.

    Anyone have any hints as to how to get this working? In Maya you can drag snippets of code to the tool panel and the software converts it to a button automatically. It would be nice to get this functionality in BforArtists. Still, there must be a way to run a macro from a hotkey.


    #24094 Likes: 0
    • Posts 545

    Hey kurtf,

    You need to add the hotkey in your register class. Have a look here:


    Another easy way would simply to create a button with the corresponding class by script. Then right click at it. And then you can assing a shortcut too.

    Kind regards


    This is my signature. You can change your signature in the profile

    #24109 Likes: 1
    • Posts 4

    Interesting. Thank you for this. I’ll investigate further.

    I knew there was something I was missing.

    This post has received 1 Likes.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.