Maniphest T58803

module 'bpy.utils' has no attribute 'register_tool'
Closed, Archived

Assigned To
Campbell Barton (campbellbarton)
Authored By
Benjamin Humpherys (brhumphe)
Dec 5 2018, 5:27 PM
Tags
  • Add-ons (BF-Blender)
  • BF Blender
Subscribers
Benjamin Humpherys (brhumphe)
Campbell Barton (campbellbarton)
Stephen Swaney (stiv)
William Reynish (billreynish)

Description

Build 94503efb126

Running the tools template ui_tool_simple.py results in the error

Traceback (most recent call last):
  File "/ui_tool_simple.py", line 35, in <module>
  File "/ui_tool_simple.py", line 28, in register
AttributeError: module 'bpy.utils' has no attribute 'register_tool'

I assume the API simply changed, but I don't know what the new function is, unless tools are also supposed to be registered with register_class?

Related Objects

Mentioned Here
rB94503efb1265: GP: Fix precision issue with Circle and Arc tools

Event Timeline

Benjamin Humpherys (brhumphe) created this task.Dec 5 2018, 5:27 PM
Stephen Swaney (stiv) added a subscriber: Stephen Swaney (stiv).Dec 5 2018, 6:14 PM
Benjamin Humpherys (brhumphe) added a project: Add-ons (BF-Blender).Dec 5 2018, 10:19 PM
Jacques Lucke (JacquesLucke) assigned this task to Campbell Barton (campbellbarton).Dec 6 2018, 3:29 PM
Brecht Van Lommel (brecht) edited projects, added BF Blender; removed BF Blender: 2.8.Dec 11 2018, 3:07 PM
Campbell Barton (campbellbarton) changed the task status from Unknown Status to Unknown Status.Dec 20 2018, 12:28 AM

This was removed intentionally, for the beta since Python developers may use - when it's almost certain the API will change.

  • No way to add groups of tools or add to existing groups.
  • Method of defining keymaps may change, isn't documented.
Campbell Barton (campbellbarton) added subscribers: William Reynish (billreynish), Campbell Barton (campbellbarton).
William Reynish (billreynish) added a comment.Jan 24 2019, 8:17 AM

Ok but how are Python addon developers supposed to add active tools then?