Commit Graph

3843 Commits

Author SHA1 Message Date
ff10f123ba Cleanup: typo in comment
spotted by @miclack, thx!
2019-03-04 10:16:07 +01:00
3982d3c171 WM: add gesture variable to detect first execution
Needed for circle select to replace the current selection.
2019-03-01 23:00:11 +11:00
90526e1606 WM: improve support for binding actions to modifier keys
Previously a modifier key-map type only worked when the same key was
enabled as a modifier as well.

This allows for users to assign an action to double-tap-shift for eg.
2019-03-01 16:59:28 +11:00
5e32bd47e8 Cleanup: Use braces in event matching logic
Also no need to map the event type for inactive keys.
2019-03-01 16:38:39 +11:00
e735894070 UI: rename Quit Prompt to Save Prompt
Eventually this should be used to prompt when loading a new file too.
2019-02-28 13:21:25 +11:00
d7baf8e7e7 UI: change behavior for quit prompt
Remove confirmation popup menu, just exit.

Note that this option is mainly for developers or people reviewing
blend files, see D4406 for discussion on reason for keeping this feature
while simplifying how it works.
2019-02-28 13:09:56 +11:00
918941483f Cleanup: Main struct member names
Rename latt to lattice and don't use plural names.
2019-02-27 11:14:41 +11:00
3051e2f4ae DNA: rename Lamp -> Light
- BKE_lamp -> BKE_light
- Main.lamp -> light
2019-02-27 11:03:16 +11:00
186bd4d87b Cleanup: indentation, trailing space 2019-02-26 14:31:48 +11:00
9d78b7edb9 Cleanup: use function instead of extern variable
Quiet undeclared variable warning.
2019-02-23 19:20:19 +11:00
Harley Acheson
1de1cedf4c UI: better widget drawing with thick line width.
When the line width was larger than the UI scale, there was not enough
space for thicker widget outlines to draw properly. Now widgets are made
a little larger to accommodate the thicker outlines.

Differential Revision: https://developer.blender.org/D4368
2019-02-21 18:03:34 +01:00
Harley Acheson
86bbadaaee UI: improve corner splitting feedback by showing custom cursors.
* Two cursors for horizontal and vertical split.
* Four cursors for each join direction.
* One cursor to indicate when splitting is not possible.

Differential Revision: https://developer.blender.org/D4264
2019-02-21 18:03:34 +01:00
b285f92d80 Fix File > Save not showing red highlight when saving over existing files.
Don't disable the save over popup through the keymap, just remove it entirely
from the code so that the file browser interprets the property correctly.
2019-02-20 14:04:12 +01:00
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
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
079099e8db Cleanup: rename generic handler -> handler_base
Avoids having type specific handler names.
2019-02-20 10:05:40 +11:00
4d83507f39 Cleanup: simplify handler type conditional
Each handler type now has it's own block (fileselect was an exception).
2019-02-20 09:57:38 +11:00
63d77d6d27 Cleanup: rename wmEventHandler_* base -> head
Makes it more clear it's the header/start of the struct.
2019-02-20 09:43:29 +11:00
e53676a5c7 Cleanup: use iterator macros for event handlers 2019-02-20 09:38:33 +11:00
cba447966e Fix T61683: Linking the instance of a collection crashes Blender.
Do not instance linked object immediately in scene, this was never a
good idea and is doomed to fail nowadays, with complex relations between
objects, collections and scenes.

Instead, this commit refactors a bit linking code to add loose objects
to current scene *after* everything has been imported, and ID pointers
have been properly remapped to new ones - i.e. once new linked data is
supposed to be fully valid, just like we were already doing with
collections.

As a bonus, it means we do not have to pass around scene, view3d etc. to
`BLO_library_link_named_part_ex()` and co.
2019-02-19 13:49:54 +01:00
4df8896062 Playanim: Fix heap use after free on exit
Was caused by the wrong de-initialization order, here is
an ASAN log just in case P916.
2019-02-19 13:08:22 +01:00
bab2d2ba43 Fix T61594: Frame playback is blank
Viewport and scissor were never initialized prior to
window move/resize.
2019-02-19 13:01:36 +01:00
eb4acd5064 Cleanup: return specific handler types 2019-02-19 16:57:36 +11:00
e617e6395b Cleanup: remove unused default handler type 2019-02-19 16:18:58 +11:00
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
d718338828 WM: move dropbox handler to it's own type 2019-02-19 16:17:21 +11:00
f88ea20285 WM: move operator handler to it's own type 2019-02-19 16:17:21 +11:00
eae2942474 WM: move UI handler to it's own type 2019-02-19 16:17:21 +11:00
55ac296358 WM: move gizmo handler to it's own type 2019-02-19 16:17:21 +11:00
0767b63f1b WM: move wmEventHandler.type to a boolean
Currently it's effectively a boolean for file-select handlers.

Prepare for refactoring event handlers into their own types (keymap,
operator, gizmo, ui & dropbox) to help make logic easier to follow.
2019-02-19 16:14:51 +11:00
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
2d1c14f036 Cleanup: rename SPACE_IPO -> SPACE_GRAPH 2019-02-16 16:42:11 +11:00
90f6fd0a36 Fix T60905: Crash using smooth tool
Tools were relying on gizmos drawing to initialize their gizmos,
now tool gizmos are initialized immediately.
2019-02-15 13:32:31 +11:00
8d421f3d9b Fix T56665: Assert when selecting object
Selecting object w/ a different mode missed refreshing the screen
areas current tool.
2019-02-14 23:34:32 +11:00
20f78dc12f Fix T61430: invoke_popup() does not respect ui scale
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4341
2019-02-12 13:30:24 +01:00
2a6d03493c WM: default to opening maximized
Blender is typically used maximized or fullscreen,
load maximized instead of attempting to fill the screen bounds.

To load un-maximized use '--window-border' argument.

See D4332
2019-02-12 09:14:10 +11:00
1daaa74b08 WM: command line args to start blender maximized
Part of D4323 by @DragMZ
2019-02-11 14:46:25 +11:00
7fdda18ca1 Remove "Keep Session" preference
As far as we know this wasn't widely used, and relied no storing data
in the temp dir which may be cleared on reboot.

More generally, alternative behavior for a core area like file IO
is not something to keep if it has unresolved issues.

See D4310 for details.
2019-02-08 08:42:50 +11:00
fea5e1dc3a Fix T57342: Crash on render with workbench render engine via command line 2019-02-06 12:16:24 +01:00
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
ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
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
99b8eef6a5 BKE_global: clear deprecated flags on load (all of them) 2019-02-02 14:45:42 +11:00
d46c910b1a Cleanup: match logic for merging G.f & G.fileflags on load 2019-02-02 14:01:48 +11:00
afcbf7cf13 Cleanup: use G_FLAG_*/G_FILE_* for G.f/fileflags
Was confusing eg: G_AUTOPACK belonged to G.fileflags, G_PICKSEL to G.f.
2019-02-02 13:49:13 +11:00
6cbb4c576a Cleanup: manually remove header text not handled by automation 2019-02-02 01:49:31 +11:00
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
77254df480 Fix T59293: Can't assign shortcut to undo history 2019-01-31 17:27:46 +11:00
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