2f8a45e314
Tool System: support passing in args to ToolDef functions
...
Needed since class aren't yet defined
so we can't access their namespace.
This avoids intermediate draw functions.
2018-11-05 07:12:57 +11:00
7e3e26d00a
Tool System: pie menu style activate-on-release
...
Support activate on release for the popup toolbar.
2018-10-27 12:25:05 +11:00
9a6d8f809d
Tool System: support custom cursor drawing
2018-10-25 21:05:47 +11:00
23fdac8672
Cleanup: unused variables
2018-10-25 12:03:34 +11:00
bf34f95a9e
UI: move 2d paint panels to topbar & toolsettings
...
Removed 'Tool' and 'Options' panels,
both these settings are quite obscure and
already available in the 'Brush' menu.
2018-10-25 11:15:48 +11:00
108475dc01
PyAPI: Support for custom tool registration
...
Added a module bpy.utils.toolsystem which only exposes ToolDef,
to avoid scripts referencing bl_ui internals.
2018-10-18 17:13:22 +11:00
1c3411ac89
Keymap: expose tool keymaps in the preferences
...
Currently some modes share tool keymaps, we might want to disable
this since it's confusing editing one thing in multiple places.
However this should be resolved in the tool definitions.
2018-10-03 15:55:57 +10:00
e8fa13b01e
Fix leak in tool tooltip creation
2018-09-13 18:21:54 +10:00
b05f9e35cb
Cleanup: unused variables
2018-09-11 18:15:55 +10:00
5f66924066
Fix exception w/ grease pencil brush tooltips
2018-09-06 18:28:33 +10:00
f428efc6db
Correct toolbar tips for non sculpt modes
2018-09-04 08:13:54 +10:00
e152483a32
Tool System: add paint brush shortcut
2018-09-03 23:19:27 +10:00
0e09ee3350
Tool System: map keys bound directly to a tools
...
If a key is bound to activate a tool in the tool-system,
add this to the popup keymap.
2018-09-03 11:11:56 +10:00
4893b8c693
Fix toolbar popup outside the window region
2018-09-03 10:19:30 +10:00
b1ccb6ad25
Tool System: support tool description for tips
...
When the description isn't set, the operators is used instead.
2018-08-31 14:37:10 +10:00
add923f98a
UI: add active tool panel to tool settings
2018-08-30 09:00:39 +10:00
e81c352746
Tool System: hide paint options for non brush tools
2018-08-29 23:58:44 +10:00
e1ec93ce75
UI: use keyword arguments
...
Prepare for keyword only args.
2018-08-28 13:41:47 +10:00
e9fb2feb2e
UI: text keyword argument to label
...
Prepare for keyword only args
2018-08-28 12:34:51 +10:00
b35b10e1af
Tool System: Popup toolbar keymap improvements
...
- Add support for key_modifiers, so grease pencil gets "D".
- Assign number keys for unmapped items
This means all tools get keyboard access,
use number/numpad to avoid confusion with other keymap items
which directly activate the tool.
2018-08-23 16:18:09 +10:00
fa70826167
Fix more image editor Python errors after switching workspaces.
2018-08-17 14:17:06 +02:00
d79df6c0bc
Tool System: sync changes from changes to brushes
...
Changing a brush now updates the tool.
2018-08-02 18:18:53 +10:00
b29b73a67e
Gizmo: update Python templates
2018-07-15 19:51:11 +02:00
5ebebcfbff
WM: rename manipulator to gizmo internally
2018-07-14 23:49:00 +02:00
0f340a1fa2
Cleanup: f-string use
2018-07-14 09:32:52 +02:00
b2d8f83444
Keymap: run search by its key in tools popup
...
The button & key are displayed here, so its best if the shortcut works.
2018-07-13 09:18:46 +02:00
cf9f0b35be
UI: add search to popup toolbar
...
Add for convenience only.
2018-07-09 17:37:15 +02:00
81a23d1f2d
Tool System: add operator for introspection
...
In some cases we want associate use an operator for a tool
for introspection, so we can for eg, automatically
use the same binding for in the popup toolbar.
Space-G/R/S for transform now work as accelerator keys again.
Also Space-E for extrude.
2018-07-03 18:38:08 +02:00
937e4fb49a
UI: change toolbar icon size from 38 -> 32
2018-06-10 16:42:19 +02:00
1889eec918
UI: use regular size icons for toolbar popup
...
Test this since the popup feels disruptive/flashing when its too large
when set smaller it looks closer to a menu w/ key-accelerators which is
the intention in this case.
It's also more likely the active tool can be placed under the cursor.
2018-06-06 08:32:25 +02:00
7436fb2ef1
Merge branch 'master' into 28
2018-06-05 16:36:13 +02:00
16d3f4db4c
Tool System: optionally cycle tools in a group
...
Add the ability for key bindings to set a tool-group,
which cycles to the next tool when the tool is already active.
2018-05-30 22:17:37 +02:00
e9cd2fb23b
Keymap: partially implement changes from T55162
...
- Use Tab key for search.
- Number keys switch modes.
- The number of the current mode can open a submode menu
(currently only works for edit-mode)
- Ctrl-Tab, Ctrl-Shift-Tab - cycle workspaces.
2018-05-29 17:52:27 +02:00
96a7ed8a15
Tool System: store operator properties in the tool
...
This replaces last-used property use which wasn't reliable since
properties were not considered 'set' - causing them to be ignored.
2018-05-22 15:31:06 +02:00
fbe73d1f31
UI: fix error for tools w/o a keymap
2018-05-21 13:08:44 +02:00
3b1b625ead
UI: use spacebar for toolbar
...
- This allows quick, consistent toolbar access
w/o conflicting w/ the keymap.
Where pressing space before a key activates that operator as a tool
instead of running immediately.
- Search can still be accessed by pressing spacebar again.
- When there is no toolbar for a space, operator search still opens.
2018-05-21 12:46:26 +02:00
698dbd6500
UI: generate dynamic keymap for popup toolbar
...
Set keys for tools based on the current keymap.
This keeps consistency between tools immediate execution.
2018-05-21 10:46:27 +02:00
ddebf1ea3b
UI: Add menu to show the toolbar
...
For people who prefer to keep the toolbar hidden,
expose as a menu (currently Shift-Space).
2018-05-18 22:28:59 +02:00
a0b03d3fb2
Tool System: use classmethod for drawing
...
Allows the toolbar to be included in a popup.
2018-05-18 21:18:33 +02:00
8b9db543fd
Tool System: add cursor (currently unused)
2018-05-18 07:58:37 +02:00
bffa9b8012
Cleanup: remove tool definition access function
...
No longer needed since names not values are compared
when checking if a tool is active.
2018-05-18 07:24:17 +02:00
b0c8d35142
Tool System: use context mode
...
Was using object mode in the workspace API which isn't
useful for accessing tools.
2018-05-17 20:28:14 +02:00
edf6676a77
Tool System: per space/mode tool support
...
This patch adds support for:
- Per space-type tools (3D view and edit).
- Per mode tools (object, edit, weight-paint .. etc).
The top-bar shows the last activated tools options, this is a design
issue with using a global topbar to show per-space settings.
See D3395
2018-05-17 15:57:33 +02:00
f6601e2deb
Tool System: pass space type when setting tool
...
Internal change only, needed because object mode is now in top-bar.
2018-05-16 19:04:29 +02:00
3767c01269
Fix issue w/ recent tool name use
...
Use the context space type, not the workspace.
Broke setting tools for the first time.
2018-05-13 18:39:15 +02:00
e7ee9cfd9e
Tool System: tools are now set by name
...
This avoids having to store the tool definition in the operator
properties (on redraw).
Now just set the name, note this means we can't show the keymap in the
tool-tip anymore. This will eventually be shown in the status bar.
2018-05-13 10:01:56 +02:00
cee39da318
WM: Operator to set the tool by name
...
Needed to bind keys to tools (T55036).
2018-05-13 09:03:37 +02:00
03281c080c
Cleanup: indentation
2018-05-13 08:32:47 +02:00
0414b0a0be
Cleanup: add function to get class from space type
2018-05-13 08:13:13 +02:00
ece3634497
Cleanup: call toolsystem static methods directly
...
Note, may move these static methods into their own module.
2018-05-13 08:07:17 +02:00