Maniphest T63221

New ui tool does nothing when executed from addon.
Closed, Duplicate

Assigned To
Campbell Barton (campbellbarton)
Authored By
Jose Conseco (joseconseco)
Apr 2 2019, 4:10 PM
Tags
  • Add-ons (BF-Blender)
  • BF Blender
Subscribers
Brecht Van Lommel (brecht)
Jose Conseco (joseconseco)
Sebastian Parborg (zeddb)

Description

System Information
Operating system: WIN10 64bit
Graphics card: GF GTX 660

Blender Version
Broken: 2.80, 98f00a3eb526, master, 2019-04-03

Short description of error
Blender build-in template 'ui tool simple' - wont work as addon.
The ui tool from addon is registered ok, there is new icon added on left toolbar, but tool bl_keymap does nothing.
Left click should scale active object
Right click should toggle objects selection.

bl_keymap = (
        ("mesh.test_scale", {"type": 'LEFTMOUSE', "value": 'PRESS'},None ), #wont work
        ("object.select_all", {"type": 'RIGHTMOUSE', "value": 'PRESS'}, None),  # wont work 
    )

Exact steps for others to reproduce the error
Install addon file, with custom WorkSpaceTool definition:


Using LBM, RMB with new tool active, does nothing.
Thing is - after reloading scripts with:

bpy.ops.script.reload()

The tools starts to work.

Related Objects

Event Timeline

Jose Conseco (joseconseco) created this task.Apr 2 2019, 4:10 PM
Brecht Van Lommel (brecht) added a project: BF Blender.Apr 2 2019, 4:37 PM
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

@Jose Conseco (joseconseco), in the future, please use the bug reporting form:
https://developer.blender.org/maniphest/task/edit/form/1/

Jose Conseco (joseconseco) updated the task description.Apr 3 2019, 11:19 AM
Sebastian Parborg (zeddb) closed this task as a duplicate of T60766: Modal keymap customization from an addon is not restored properly.Apr 3 2019, 11:21 AM
Sebastian Parborg (zeddb) added a subscriber: Sebastian Parborg (zeddb).

I think that the root cause it probably the same as in T60766

Campbell Barton (campbellbarton) reopened this task as Needs Triage.Mar 26 2020, 10:51 AM
Campbell Barton (campbellbarton) claimed this task.
Campbell Barton (campbellbarton) changed the task status from Needs Triage to Confirmed.Mar 27 2020, 2:12 AM
Campbell Barton (campbellbarton) triaged this task as High priority.
Campbell Barton (campbellbarton) closed this task as a duplicate of T66655: Add-on with WorkSpaceTool not working after Blender restart.Mar 27 2020, 7:39 AM