There is now a script that is available in the text editor space called “ui_tool_simple.py” 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.
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.
I tried to create an icon but it seems that some information is missing.
“blender_icons_geom.py” is not included in the package, but where can I get it?
Here are the descriptions of widget and keymap according to “your blender install directory\2.80\scripts\startup\bl_ui\space_toolsystem_common.py” WIDGET:
# An optional gizmo group to activate when the tool is set or None for no gizmo.
This is of the type
bpy.types.GizmoGroup
A good example of this type can be found the Gizmo Operator Target python template.
KEYMAP:
# 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?