Python API for Active Tools


Now that the beta is available I really want to dig into the Python API and start working on some additional functionality.

There appears to be some good information here:

The only thing that I cannot seem to find is information on creating active tools.

Am I missing some links or is this still being worked on?

1 Like
How to implement custom gizmos?

The API for this is not available yet.


Thanks for the info. Is there a place where I can see a list of the items that still need to be documented?


We don’t have that currently. The main two things we are missing is active tools and multi-object editing.


When can we use that active tool Pyhton API?


There is no date for it currently, it should be there for 2.80 but I can’t promise anything more specific.


There is now a script that is available in the text editor space called “” that shows an example of how to register an active tool.

I am going to be experimenting with this but if anyone has any more information on the “bl_icon”, “bl_widget”, and “bl_keymap” properties please let me know. Thanks.

1 Like

I’m looking for info on the same. Is it possible to reuse widgets from existing tools or inherit from existing tools?


Yes you can. Tools can define which gizmo to use, and, afaik, you can add your own too.


WorkSpaceTool API looks good.
Now, I am troubled with how to specify my Addon folder in ”bl_icon” and how to create a “.dat” file.
Please let me know if you have any information.


@ Akelian has shed light on some of the available builtin gizmos at stack exchange:


There’s a guide here on how to create the toolbar icons:

1 Like

Thank you for the information.

I tried to create an icon but it seems that some information is missing.
“” is not included in the package, but where can I get it?


It’s in the Blender source.

@ideasman42 we should probably package this stuff in a nicer way for addon developers.


Here are the descriptions of widget and keymap according to “your blender install directory\2.80\scripts\startup\bl_ui\”

    # An optional gizmo group to activate when the tool is set or None for no gizmo.

This is of the type


A good example of this type can be found the Gizmo Operator Target python template.


    # Optional keymap for tool, either:
    # - A function that populates a keymaps passed in as an argument.
    # - A tuple filled with triple's of:
    #   ``(operator_id, operator_properties, keymap_item_args)``.
    # Warning: currently 'from_dict' this is a list of one item,
    # so internally we can swap the keymap function for the keymap it's self.
    # This isn't very nice and may change, tool definitions shouldn't care about this.

Thank you very much! I was able to create my own icon.
This was a lot of work, so I think it would be nice to have a simpler way.

By the way, I put it in “datafiles/icons” folder and I can specify it with “bl_icon”, but I do not know how to specify the my add-on folder.
Does anyone have any information about this?