New ui tool does nothing when executed from addon. #63221

Closed
opened 2019-04-02 16:10:29 +02:00 by Jose Conseco · 9 comments

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:
simple_addon.py
Using LBM, RMB with new tool active, does nothing.
Thing is - after reloading scripts with:

bpy.ops.script.reload()

The tools starts to work.

**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: [simple_addon.py](https://archive.blender.org/developer/F6907316/simple_addon.py) Using LBM, RMB with new tool active, does nothing. Thing is - after reloading scripts with: ``` bpy.ops.script.reload() ``` The tools starts to work.
Author

Added subscriber: @JoseConseco

Added subscriber: @JoseConseco

Added subscriber: @brecht

Added subscriber: @brecht

@JoseConseco, in the future, please use the bug reporting form:
https://developer.blender.org/maniphest/task/edit/form/1/

@JoseConseco, in the future, please use the bug reporting form: https://developer.blender.org/maniphest/task/edit/form/1/

Closed as duplicate of blender/blender#60766

Closed as duplicate of blender/blender#60766

Added subscriber: @ZedDB

Added subscriber: @ZedDB

I think that the root cause it probably the same as in blender/blender#60766

I think that the root cause it probably the same as in blender/blender#60766

Changed status from 'Duplicate' to: 'Needs Triage'

Changed status from 'Duplicate' to: 'Needs Triage'
Campbell Barton self-assigned this 2020-03-26 10:51:11 +01:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Closed as duplicate of blender/blender#66655

Closed as duplicate of blender/blender#66655
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#63221
No description provided.