Commit Graph

476 Commits

Author SHA1 Message Date
Campbell Barton
9d78b7edb9 Cleanup: use function instead of extern variable
Quiet undeclared variable warning.
2019-02-23 19:20:19 +11:00
Campbell Barton
7ee9fe4991 Cleanup: rename keymap handler callbacks for clarity
Now there are two callbacks, the name 'keymap_callback' is too vague.
2019-02-20 15:43:35 +11:00
Campbell Barton
effe750ec1 WM: support dynamic keymap handlers
Add getter callback support for 'WM_HANDLER_TYPE_KEYMAP' type handlers
this is needed for key-maps which change based on the active tool.

Replaces 'sneaky_handler' hack which temporarily inserted a handler.
2019-02-20 14:37:15 +11:00
Campbell Barton
eb4acd5064 Cleanup: return specific handler types 2019-02-19 16:57:36 +11:00
Campbell Barton
bb6692be8a WM: move keymap handler to it's own type
Illuminate dead code, using wmEventHandler_KeymapFn from gizmo handler
type where it was never set.
2019-02-19 16:18:23 +11:00
Campbell Barton
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
1daaa74b08 WM: command line args to start blender maximized
Part of D4323 by @DragMZ
2019-02-11 14:46:25 +11:00
Campbell Barton
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
141c6073ca WM: Event simulation support for Python
This feature is intended only for testing,
to automate simulating user input.

- Enabled by '--enable-event-simulate'.
- Disables handling all real input events.
- Access by calling `Window.event_simulate(..)`
- Disabling `bpy.app.use_event_simulate`
  to allow handling real events (can only disable).

Currently only mouse & keyboard events work well,
NDOF, IME... etc could be added as needed.

See D4286 for example usage.
2019-02-02 15:23:55 +11:00
Campbell Barton
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton
c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Campbell Barton
e63c360bcd WM: don't set repeat flag w/ interactive repeat
This allows operators to distinguish between redo and executing
repeat last operator, needed for T60777 fix.
2019-01-25 11:29:41 +11:00
Campbell Barton
b5a2dc16fc Revert "WM: Repeat Last no longer reuses skip-save properties"
This reverts commit 1d908bffdd.

Enough uses of repeat last expect skip-save properties to be set,
transform being the most obvious example T60777#605681.

I wanted to avoid operators having account for two kinds of 'skip-save'
but this may be unavoidable.
2019-01-25 11:11:07 +11:00
Campbell Barton
1d908bffdd WM: Repeat Last no longer reuses skip-save properties
PROP_SKIP_SAVE is often used as a way to detect the difference between
adjusting options from the redo panel and initial execution.

Repeat last operator was executing with skip-save properties set,
preventing operators from initializing them based on the context.

Fixes 60777.
2019-01-24 12:12:23 +11:00
Campbell Barton
88a80fcec8 Cleanup: commas at the end of enums
Without this clang-format may wrap them onto a single line.
2019-01-16 00:03:03 +11:00
Christopher Peerman
4693207918 Windows: add support for Windows Ink.
Before this Blender always needed the Wintab driver. This adds support for the
native pressure API in Windows 8+, making it possible to get pressure sensitivity
on e.g. Microsoft Surface hardware without any extra drivers.

By default Blender will automatically use Wintab if available, and if not use
Windows Ink instead. There is also a new user preference to explicitly specify
which API to use if automatic detection fails.

Fixes T57869: no pressure sensitivity with Surface pen or laptop.

Code by Christopher Peerman with some tweaks by Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D4165
2019-01-14 20:48:11 +01:00
Campbell Barton
a6eb9a3e21 Tool System: uv lasso/box select options
These tools now support (new, add, subtract),
(xor, and) could be supported but are complicated by UV's sticky
selection modes.
2018-11-23 17:52:52 +11:00
Campbell Barton
47139c69d7 Keymap: only use delete confirmation for X-key
Only use confirmation w/ X-key since this is more likely to be pressed
by accident. Delete-key delete doesn't confirm.

Part of D3953 by @Zachman w/ edits
2018-11-20 10:06:02 +11:00
Campbell Barton
6c86e1a781 PyAPI: draw handlers now store args in the capsule context
Was using the handlers custom-data which crashes
when Blender frees the screen data before Python removes the handler.
2018-10-26 09:30:17 +11:00
Campbell Barton
6d49b623e2 WM: space, region type filtering for paint cursor
Avoids calling poll on mouse-move for unrelated space/region types.
2018-10-25 16:06:47 +11:00
Campbell Barton
f2c77558b4 Merge branch 'master' into blender2.8 2018-10-25 15:19:35 +11:00
Campbell Barton
2046817c08 WM: minor changes to cursor API 2018-10-25 15:18:24 +11:00
Campbell Barton
0b98a679bb UI: rename Border Select -> Box Select
See: T56648
2018-10-05 10:29:31 +10:00
Sergey Sharybin
4de1e673a4 Merge branch 'master' into blender2.8 2018-09-27 14:51:33 +02:00
Brecht Van Lommel
2a63e062b0 Tests: add --no-window-focus to open window without focus.
This is useful to run OpenGL tests while continuing to do other tasks
without windows constantly popping up in the foreground.
2018-09-27 12:21:48 +02:00
Campbell Barton
31026f8c0e UI: keep showing label tooltip once it's open
This means dragging the cursor over the tools will show all labels
immediately, but only once a single label is displayed.
2018-09-06 14:22:12 +10:00
Campbell Barton
26c17b0ab1 UI: delay tool label tip display
Displaying the labels tip immediately feels too intrusive,
make this work more like regular tooltips, displaying more quickly.

Tooltips can now uses multiple passes, each pass with it's own delay
for the next pass to show.
2018-09-06 14:19:15 +10:00
Campbell Barton
6f1f7296f4 UI: show a small label next to the tool
Instead of showing the full tip immediately when hovering over a tool,
show only the (label, shortcut), without suppressing the regular tip.
2018-09-05 13:52:19 +10:00
Campbell Barton
571aead323 UI: support immediate non-overlapping tooltips
Use these for the toolbar, since they're non-overlapping the interface,
showing them quickly isn't a problem.
2018-09-04 18:05:17 +10:00
Campbell Barton
0ddf3e110e Cleanup: comment blocks 2018-09-02 18:51:31 +10:00
Campbell Barton
ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
Campbell Barton
9f25b2f278 Merge branch 'master' into blender2.8 2018-08-18 19:18:55 +10:00
Campbell Barton
506d8448cc WM: app-template command line override
Without this, there was no simple way to have
launchers for different app-templates.

Also allows force-disabling the app-template stored in the preferences.
2018-08-18 14:10:07 +10:00
Campbell Barton
e88e80a6a0 3D View boarder/lasso select tool options
Add tool options to control how select operates (add/sub/set/and/xor).

Note: edit mode armature select still needs to support all options,
this is complicated by how it handles partial end-point selection.
2018-08-15 01:48:55 +10:00
Brecht Van Lommel
4375e7ff0b WM: internal changes to support dragging multiple IDs.
To be used by the outliner.
2018-08-10 17:53:00 +02:00
Brecht Van Lommel
86c363a027 WM: pass on wmDrag to drop operators, so they can get the data directly.
Currently drop operators work mostly by specifying the name of the datablock.
However there can be datablocks with the same name in different libraries, so
this gives wrong results in some cases.

Currently only outliner drop operators have been updated to use this mechanism.
2018-08-10 17:53:00 +02:00
Brecht Van Lommel
74016d73db WM: drag and drop poll functions can now specify a custom tooltip. 2018-08-10 17:53:00 +02:00
Campbell Barton
5ebebcfbff WM: rename manipulator to gizmo internally 2018-07-14 23:49:00 +02:00
Campbell Barton
af0fc66049 WM: register global list of panel types
Allows simple lookups for popovers.
2018-07-13 19:15:13 +02:00
Campbell Barton
4705682151 Merge branch 'master' into blender2.8 2018-07-13 12:52:10 +02:00
Campbell Barton
f6367ecfb6 Cleanup: operator type API, header 2018-07-13 12:47:04 +02:00
Clément Foucault
1a43e08187 Eevee: LightCache: Initial Implementation
This separate probe rendering from viewport rendering, making possible to
run the baking in another thread (non blocking and faster).

The baked lighting is saved in the blend file. Nothing needs to be
recomputed on load.

There is a few missing bits / bugs:
- Cache cannot be saved to disk as a separate file, it is saved in the DNA
  for now making file larger and memory usage higher.
- Auto update only cubemaps does update the grids (bug).
- Probes cannot be updated individually (considered as dynamic).
- Light Cache cannot be (re)generated during render.
2018-07-10 15:31:34 +02:00
Campbell Barton
113b053d5b WM: add utility function to refresh status bar 2018-07-09 18:14:41 +02:00
Campbell Barton
397d088611 UI: show modal operator keymaps in the status bar
This is work in progress, transform keymap especially
needs some filtering on it's keymap.
2018-07-05 12:27:15 +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
Brecht Van Lommel
4e2228525f Workspaces: add main and child windows.
* Main windows show a topbar and statusbar, and select a workspace and
  scene. They are created with Window > New Main Window.

* Child windows do not show a topbar or statusbar. These follow the
  workspace and scene of their parent main window. Created with Window >
  New Window or View > Duplicate Area into New Window.

* The purpose of this change is to support multi monitor setups where you
  just want to put more editors on the other monitors. Without multiple
  topbars and statusbars, working within a single workspace and scene.
  Creating multiple main windows is intended to be a concious choice to
  do different tasks in different workspaces and scenes.

* Note these changes do not currently affect how the operating system
  treats the windows.

* When changing the workspace, the layout in all child windows changes.
  This makes sense if we consider child windows to be just a way to
  extend the main window across more monitors. In some case it may be
  useful to keep the same layout though, we can add an option for this
  depending on user feedback.
2018-07-04 18:40:33 +02:00
Campbell Barton
b076b3853c Merge branch 'master' into blender2.8 2018-07-02 12:03:56 +02:00
Campbell Barton
b88e51dd55 Cleanup: use bool for poll functions 2018-07-02 11:51:31 +02:00
Campbell Barton
6a13b6324b UI: support check-boxes in quick menu
Could support other RNA types,
however menus don't work well in this case.
2018-06-30 21:08:48 +02:00
Campbell Barton
4d39da1060 Merge branch 'master' into blender2.8 2018-06-28 23:57:00 +02:00