Commit Graph

28 Commits

Author SHA1 Message Date
Campbell Barton
3a93314753 Tool System: initial particle system support 2018-08-02 19:27:26 +10:00
Campbell Barton
b457cae397 Cleanup: use variable names based on term gizmo 2018-07-15 14:35:33 +02:00
Campbell Barton
5ebebcfbff WM: rename manipulator to gizmo internally 2018-07-14 23:49:00 +02:00
Brecht Van Lommel
c43443d530 Workspaces: store view layer per main window, instead of per workspace.
It was a bit odd that the scene was stored per window but not the view
layer. The reasoning was that you would use different view layers for
different tasks. This is still possible, but it's more predictable to
switch them both explicitly, and with child window support manually
syncing the view layers between multiple windows is no longer needed
as often.
2018-07-04 18:40:33 +02:00
Campbell Barton
b608133075 Fix crash if no tool is set 2018-06-02 13:10:15 +02:00
Bastien Montagne
eb1feb9f4a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_select.c
	source/blender/editors/space_outliner/outliner_edit.c
2018-05-31 16:21:47 +02:00
Campbell Barton
81bf9a41e1 Tool System: Utility to set the tool by name
Wrapper for the Python operator.
2018-05-31 09:02:43 +02:00
Campbell Barton
44f78c95be Cleanup: move toolsystem into own include
Many files using the window manager don't access the tool-system.

This avoids rebuilding many files when the tool-system changes.
2018-05-23 08:23:16 +02:00
Campbell Barton
6781fac42e Cleanup: warning 2018-05-22 16:12:41 +02:00
Campbell Barton
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
Brecht Van Lommel
bc46034752 Cleanup: fix compiler warnings. 2018-05-22 14:17:52 +02:00
Campbell Barton
9fc5a0c95e Fix area tool getting out of sync w/ active tool 2018-05-22 09:41:41 +02:00
Campbell Barton
f9547ab313 Fix tools not being initialized on startup 2018-05-18 17:36:11 +02:00
Campbell Barton
987d1df571 Tool System: store the active tool in ScrArea
Without this we need to have the context to get the
(space_type, mode) args for an active tool lookup.

For event handling & poll its more convenient to have direct access.
2018-05-18 09:40:52 +02:00
Campbell Barton
3af4a46a18 Tool System: tools now initialize on startup 2018-05-17 22:03:34 +02:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
86b9311926 Cleanup: quiet warning, whitespace 2018-05-08 10:58:04 +02:00
Campbell Barton
05ec0108dc WM: refresh tool on object mode switch
The tool manipulator could become disabled when set in the wrong mode.
2018-05-08 07:27:53 +02:00
Campbell Barton
e954082dda WM: warn when tool widget not found
This happens when testing adding tools, assert isn't useful.
2018-05-03 07:33:44 +02:00
Campbell Barton
2c9670b92d Tool System: support non-brush tools w/ paint modes
Allows select, gradient tools not to conflict with brush keymap.
2018-05-01 11:23:46 +02:00
Campbell Barton
ba339379fe Fix linking brushes crashing on load
We need to link brushes for all windows that use a workspace.
2018-04-30 20:09:39 +02:00
Campbell Barton
0c512a6f95 Fix missing NULL check when setting the tool 2018-04-29 19:14:51 +02:00
Campbell Barton
3b785be8f4 Cleanup: warning, use STRNCPY macro 2018-04-29 14:48:30 +02:00
Campbell Barton
6e76a35f07 Tool System: support data-blocks in tools
Needed so tools can set the active brush.
2018-04-29 14:30:09 +02:00
Campbell Barton
0908fc1190 Tool System: publish/subscribe to tool changes 2018-04-27 08:24:20 +02:00
Campbell Barton
02f28da187 Cleanup: trailing spaces
Applied to newly added files in 2.8
2018-04-22 08:45:52 +02:00
Campbell Barton
d4161845b2 Tool System: show manipulators at startup
Support duplicating, switching workspaces too.
2017-11-27 18:36:54 +11:00