blender.git
2 years agoCleanup: trailing space in CMake files
Campbell Barton [Sun, 17 Jun 2018 18:15:24 +0000 (20:15 +0200)]
Cleanup: trailing space in CMake files

2 years agoPython: Allow untrusted py-drivers to run limited expressions
Campbell Barton [Sun, 17 Jun 2018 17:51:05 +0000 (19:51 +0200)]
Python: Allow untrusted py-drivers to run limited expressions

Limit to a restricted set of built-ins, as well as the math module.
Also restrict of op-codes, disallowing imports and attribute access.

This allows most math expressions to run
without any performance cost once the initial check is done.

See: D1862 for details.

2 years agoCleanup: trailing space for remaining source/
Campbell Barton [Sun, 17 Jun 2018 15:06:28 +0000 (17:06 +0200)]
Cleanup: trailing space for remaining source/

2 years agoCleanup: trailing space for blenloader
Campbell Barton [Sun, 17 Jun 2018 15:06:07 +0000 (17:06 +0200)]
Cleanup: trailing space for blenloader

2 years agoCleanup: trailing space for blenkernel
Campbell Barton [Sun, 17 Jun 2018 15:05:51 +0000 (17:05 +0200)]
Cleanup: trailing space for blenkernel

2 years agoCleanup: trailing space for compositor
Campbell Barton [Sun, 17 Jun 2018 15:05:29 +0000 (17:05 +0200)]
Cleanup: trailing space for compositor

2 years agoCleanup: trailing space for freestyle
Campbell Barton [Sun, 17 Jun 2018 15:05:14 +0000 (17:05 +0200)]
Cleanup: trailing space for freestyle

2 years agoCleanup: trailing space for imbuf module
Campbell Barton [Sun, 17 Jun 2018 15:04:54 +0000 (17:04 +0200)]
Cleanup: trailing space for imbuf module

2 years agoCleanup: trailing space for modifiers
Campbell Barton [Sun, 17 Jun 2018 15:04:27 +0000 (17:04 +0200)]
Cleanup: trailing space for modifiers

2 years agoCleanup: trailing space for DNA headers
Campbell Barton [Sun, 17 Jun 2018 15:04:09 +0000 (17:04 +0200)]
Cleanup: trailing space for DNA headers

2 years agoCleanup: trailing space in source/gameengine/
Campbell Barton [Sun, 17 Jun 2018 15:01:43 +0000 (17:01 +0200)]
Cleanup: trailing space in source/gameengine/

2 years agoCleanup: trailing space for BLI
Campbell Barton [Sun, 17 Jun 2018 14:32:54 +0000 (16:32 +0200)]
Cleanup: trailing space for BLI

2 years agoCleanup: remove unused BLI_rebase_path
Campbell Barton [Sun, 17 Jun 2018 14:26:47 +0000 (16:26 +0200)]
Cleanup: remove unused BLI_rebase_path

2 years agoCleanup: BLI path extension API
Campbell Barton [Sun, 17 Jun 2018 14:13:24 +0000 (16:13 +0200)]
Cleanup: BLI path extension API

Use BLI_path_extension_* prefix.

2 years agoBLI_path: add string size debug define
Campbell Barton [Sun, 17 Jun 2018 13:35:00 +0000 (15:35 +0200)]
BLI_path: add string size debug define

Off by default, only for debugging.

2 years agoCMake: add missing headers
Campbell Barton [Sun, 17 Jun 2018 09:56:20 +0000 (11:56 +0200)]
CMake: add missing headers

2 years agoCleanup: use clamp_* from BLI_math (replace macro)
Campbell Barton [Sun, 17 Jun 2018 09:50:56 +0000 (11:50 +0200)]
Cleanup: use clamp_* from BLI_math (replace macro)

2 years agomake.bat: Fix `make showhashes` not working.
Ray Molenkamp [Sat, 16 Jun 2018 18:29:38 +0000 (12:29 -0600)]
make.bat: Fix `make showhashes` not working.

broke in recent refactor.

2 years agoFix T55427: Removing Vertex Group used by Data Transfer Modifier results in crash.
Bastien Montagne [Sat, 16 Jun 2018 14:19:53 +0000 (16:19 +0200)]
Fix T55427: Removing Vertex Group used by Data Transfer Modifier results in crash.

Only fixing crash, proper handling (a.k.a remapping) of all
possible cases here, for all possible data layers, is rather involved...

2 years agoUI: refactor drag-toggle for other button types
Campbell Barton [Sat, 16 Jun 2018 14:04:26 +0000 (16:04 +0200)]
UI: refactor drag-toggle for other button types

2 years agoUI: minor changes from 2.8
Campbell Barton [Sat, 16 Jun 2018 13:44:13 +0000 (15:44 +0200)]
UI: minor changes from 2.8

- Option to skip multi-data edits.
- Open hold buttons on drag.
- Utility function to set default value.

2 years agoCycles Cleanup: Remove unneccessary color management call
Lukas Stockner [Sat, 16 Jun 2018 11:47:49 +0000 (13:47 +0200)]
Cycles Cleanup: Remove unneccessary color management call

2 years agoCycles: change Ambient Occlusion shader to output colors.
Lukas Stockner [Fri, 15 Jun 2018 09:03:29 +0000 (11:03 +0200)]
Cycles: change Ambient Occlusion shader to output colors.

This means the shader can now be used for procedural texturing. New
settings on the node are Samples, Inside, Local Only and Distance.

Original patch by Lukas with further changes by Brecht.

Differential Revision: https://developer.blender.org/D3479

2 years agoWM: suppress drag events if motion is handled
Campbell Barton [Fri, 15 Jun 2018 17:09:43 +0000 (19:09 +0200)]
WM: suppress drag events if motion is handled

2 years agoCleanup: some more G.main removal.
Bastien Montagne [Fri, 15 Jun 2018 15:42:17 +0000 (17:42 +0200)]
Cleanup: some more G.main removal.

We are really starting to scratch the last bits here...

2 years agoCleanup: validate G.main's in creator code.
Bastien Montagne [Fri, 15 Jun 2018 15:36:44 +0000 (17:36 +0200)]
Cleanup: validate G.main's in creator code.

Using G_MAIN here is valid!

2 years agoCleanup: some more G.main removal/validation...
Bastien Montagne [Fri, 15 Jun 2018 15:21:07 +0000 (17:21 +0200)]
Cleanup: some more G.main removal/validation...

2 years agoFix more Cycles CUDA errors after recent changes.
Brecht Van Lommel [Fri, 15 Jun 2018 13:58:48 +0000 (15:58 +0200)]
Fix more Cycles CUDA errors after recent changes.

2 years agoFix T55490, intersect two triangles fails.
Howard Trickey [Fri, 15 Jun 2018 12:48:45 +0000 (08:48 -0400)]
Fix T55490, intersect two triangles fails.

Need to use the 'use_partial_connect' option in island connect,
so changed signatures of various functions to pass that into and
then down from BM_mesh_intersect (making true for intersect, false
for boolean).
Then fix bm_face_split_edgenet_partial_connect to work when
input edges are not necessarily wire, but at least not in the
face they are being connected in. That caused generalization
of core BM_vert_separate_hflag_wire (which is only used in
this one place in all Blender).

2 years agoFix (unreported) Text Editor: scrollbar exiting early
Philipp Oeser [Fri, 15 Jun 2018 08:25:18 +0000 (10:25 +0200)]
Fix (unreported) Text Editor: scrollbar exiting early

caused by recent clickdrag changes

2 years agoFix Cycles CUDA error after recent changes.
Brecht Van Lommel [Fri, 15 Jun 2018 08:06:32 +0000 (10:06 +0200)]
Fix Cycles CUDA error after recent changes.

2 years agoWM: 2.8 screen compatibility
Campbell Barton [Fri, 15 Jun 2018 08:23:03 +0000 (10:23 +0200)]
WM: 2.8 screen compatibility

Without these minor changes loading files from 2.8 will crash.

Manually applied edits from 26786a2b87a08

2 years agoCycles: Query XYZ to/from Scene Linear conversion from OCIO instead of assuming sRGB
Lukas Stockner [Thu, 14 Jun 2018 15:48:19 +0000 (17:48 +0200)]
Cycles: Query XYZ to/from Scene Linear conversion from OCIO instead of assuming sRGB

I've limited it to just the RGB<->XYZ stuff for now, correct image handling is the next step.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3478

2 years agoCycles: Connect value inputs to Strength instead of Color when inserting an Emission...
Lukas Stockner [Thu, 14 Jun 2018 20:16:42 +0000 (22:16 +0200)]
Cycles: Connect value inputs to Strength instead of Color when inserting an Emission node

Same result, but saves an additional ConvertNode.

2 years agoCycles: Automatically detect HDRI resolution by default and use non-square sampling map
Lukas Stockner [Thu, 14 Jun 2018 14:18:34 +0000 (16:18 +0200)]
Cycles: Automatically detect HDRI resolution by default and use non-square sampling map

The automatic mode checks all Enviroment Texture nodes and picks the largest image's resolution.
If there are no Enviroment Textures, it just uses the old default.

Also, the sampling map now isn't limited to square shapes. The automatic detection uses the exact image size,
the manual UI option now halves the value to get the height.

A default aspect ratio of 2:1 makes sense since this is what most HDRIs use.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3477

2 years agoCleanup: remove last G.main's from Collada code.
Bastien Montagne [Thu, 14 Jun 2018 13:15:51 +0000 (15:15 +0200)]
Cleanup: remove last G.main's from Collada code.

2 years agoCleanup: Remove last G.main's from WM code.
Bastien Montagne [Thu, 14 Jun 2018 10:34:13 +0000 (12:34 +0200)]
Cleanup: Remove last G.main's from WM code.

Was mostly validating valid usages of G.main -> G_MAIN actually.

2 years agoFix T55470: Add option to not fix polygons' winding to Edit Normals modifier.
Bastien Montagne [Thu, 14 Jun 2018 09:41:12 +0000 (11:41 +0200)]
Fix T55470: Add option to not fix polygons' winding to Edit Normals modifier.

this is actually adding option to add buggy behavior, but.. NPR often
expects buggy behaviors, and its one of the main targets for normal editing.
So think it's reasonable to add that option (disabled by default of
course).

Note that am not really happy with UI, but:
* Not sure where to put it, it's kind of own self-contained area option.
* Don't to make it too much visible, using this should be the exception!

2 years agoFix undo group to use human readable name, since this shows in the UI.
Brecht Van Lommel [Wed, 13 Jun 2018 16:38:38 +0000 (18:38 +0200)]
Fix undo group to use human readable name, since this shows in the UI.

2 years agoFix undo of transform after frame change undoing too much.
Brecht Van Lommel [Wed, 13 Jun 2018 16:22:17 +0000 (18:22 +0200)]
Fix undo of transform after frame change undoing too much.

For grouped undo we should not skip the undo push, rather replace the
previous undo push. This way undo goes back to the state after the last
operation in the group.

2 years agoCycles: auto insert emission node when linking color to closure.
Brecht Van Lommel [Wed, 13 Jun 2018 14:29:06 +0000 (16:29 +0200)]
Cycles: auto insert emission node when linking color to closure.

This is convenient for previewing the output of a node, and we agreed
to support this behavior in both Eevee and Cycles.

2 years agoWM: check release event for particle edit mode
Campbell Barton [Wed, 13 Jun 2018 16:23:09 +0000 (18:23 +0200)]
WM: check release event for particle edit mode

Caused by drag event.

2 years agoCleanup: get rid of last G.main in BMesh code.
Bastien Montagne [Wed, 13 Jun 2018 14:29:12 +0000 (16:29 +0200)]
Cleanup: get rid of last G.main in BMesh code.

2 years agoCleanup: moar ugly G.main removal...
Bastien Montagne [Wed, 13 Jun 2018 12:26:26 +0000 (14:26 +0200)]
Cleanup: moar ugly G.main removal...

Note that due to RNA get/setters issue, that one may actually add some
G.main usages to the total... But at least it's not hidden anymore in a
very low-level, dark corner of BKE pointcache code!

2 years agoFix T55467: nodes cant be resized after recent clickdrag change
Philipp Oeser [Wed, 13 Jun 2018 12:03:46 +0000 (14:03 +0200)]
Fix T55467: nodes cant be resized after recent clickdrag change

2 years agoCleanup: swapped X/Y UI_UNIT
Campbell Barton [Wed, 13 Jun 2018 09:10:32 +0000 (11:10 +0200)]
Cleanup: swapped X/Y UI_UNIT

2 years agoCleanup: remove more G.main from BKE area.
Bastien Montagne [Wed, 13 Jun 2018 08:57:10 +0000 (10:57 +0200)]
Cleanup: remove more G.main from BKE area.

2 years agoCleanup: moar G.main removal from BKE area.
Bastien Montagne [Tue, 12 Jun 2018 15:57:24 +0000 (17:57 +0200)]
Cleanup: moar G.main removal from BKE area.

2 years agoCleanup: BKE_scene_free should not have to worry about cleaning its usages.
Bastien Montagne [Tue, 12 Jun 2018 15:46:16 +0000 (17:46 +0200)]
Cleanup: BKE_scene_free should not have to worry about cleaning its usages.

This is supposed to be handled by calling code! Henceforce, no need to
call BKE_sequencer_clear_scene_in_allseqs() here, and... no need for
that ugly G.main case. ;)

2 years agoWM: remove sloppy region type access
Campbell Barton [Tue, 12 Jun 2018 15:34:44 +0000 (17:34 +0200)]
WM: remove sloppy region type access

Avoid accidentally operating on the wrong region type.

2 years agoWM: rename BKE_regiontype_from_id
Campbell Barton [Tue, 12 Jun 2018 15:26:38 +0000 (17:26 +0200)]
WM: rename BKE_regiontype_from_id

This returns the first as a fallback, causing confusing usage.
Renamed and added a version of the function that doesn't.

2 years agoFix T55452: Crash on saving with visible particle system.
Bastien Montagne [Tue, 12 Jun 2018 14:17:05 +0000 (16:17 +0200)]
Fix T55452: Crash on saving with visible particle system.

Missing Main pointer in recent refactor/cleanup of G.main usages...

2 years agoCleanup: moar removal of G.main in BKE area...
Bastien Montagne [Tue, 12 Jun 2018 13:16:45 +0000 (15:16 +0200)]
Cleanup: moar removal of G.main in BKE area...

2 years agoCleanup/simplify G.main usages.
Bastien Montagne [Tue, 12 Jun 2018 13:03:51 +0000 (15:03 +0200)]
Cleanup/simplify G.main usages.

Using G.main only to get main bled filepath, or built-in fonts, is OK.
So now using the 'valid' G_MAIN macro here instead.

2 years agoCleanup: remove moar G.main from BKE area.
Bastien Montagne [Tue, 12 Jun 2018 10:53:27 +0000 (12:53 +0200)]
Cleanup: remove moar G.main from BKE area.

2 years agoCleanup: remove some G.main from ED's animsys.
Bastien Montagne [Tue, 12 Jun 2018 10:28:14 +0000 (12:28 +0200)]
Cleanup: remove some G.main from ED's animsys.

The easy ones - there some much, much trickier to tackle there...

2 years agoCleanup: remove some G.main from BKE area.
Bastien Montagne [Tue, 12 Jun 2018 09:21:54 +0000 (11:21 +0200)]
Cleanup: remove some G.main from BKE area.

2 years agoFix T55448: Typo in Cycles CUDA debug output
Lukas Stockner [Tue, 12 Jun 2018 08:37:51 +0000 (10:37 +0200)]
Fix T55448: Typo in Cycles CUDA debug output

Reviewers: sergey, lukasstockner97

Reviewed By: lukasstockner97

Tags: #cycles, #bf_blender

Differential Revision: https://developer.blender.org/D3472

2 years agoCleanup: remove moar ugly G.main usages...
Bastien Montagne [Mon, 11 Jun 2018 13:40:37 +0000 (15:40 +0200)]
Cleanup: remove moar ugly G.main usages...

BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)

2 years agoCycles: Cleanup, silence strict compiler warning
Sergey Sharybin [Mon, 11 Jun 2018 10:54:17 +0000 (12:54 +0200)]
Cycles: Cleanup, silence strict compiler warning

There is one legit place in the code where memcpy was used as an
optimization trick. Was needed for older version of GCC, but now
it should be re-evaluated and checked if it still helps to have
that trick.

In other places it's somewhat lazy programming to zero out all
object members. That is absolutely unsafe, at the moment when
less trivial class is used as a member in that object things
will break.

Other cases were using memcpy into an object which comes from
an external library. We don't control that object, and we can
not guarantee it will always be safe for such memory tricks
and debugging bugs caused by such low level access is far fun.

Ideally we need to use more proper C++, but needs to be done with
big care, including benchmarks of each change, For now do
annoying but simple cast to void*.

2 years agoLibmv: Cleanup, make strict compiler more happy
Sergey Sharybin [Mon, 11 Jun 2018 10:53:11 +0000 (12:53 +0200)]
Libmv: Cleanup, make strict compiler more happy

In C++ it is not really safe to memcpy objects, and newer GCC will warn
about this. However, we don't use our vector for unsafe-to-memcpy objects,
so just explicitly silence that warning.

2 years agoCleanup: Moar G.main removal of Hell.
Bastien Montagne [Mon, 11 Jun 2018 10:14:18 +0000 (12:14 +0200)]
Cleanup: Moar G.main  removal of Hell.

This commit actually adds some G.main... but at much, much higher level
than the ones it removes, so should still be better ;)

2 years agoCleanup: remove some G.main usages...
Bastien Montagne [Mon, 11 Jun 2018 09:05:37 +0000 (11:05 +0200)]
Cleanup: remove some G.main usages...

2 years agoFix bad level stubs
Sergey Sharybin [Mon, 11 Jun 2018 09:36:22 +0000 (11:36 +0200)]
Fix bad level stubs

2 years agoCleanup: Use BLI_strncpy
Sergey Sharybin [Mon, 11 Jun 2018 09:05:24 +0000 (11:05 +0200)]
Cleanup: Use BLI_strncpy

It has behavior which we expect, and silences strict compiler warning.

2 years agoFix T55278: Lightmap Pack > New Image broken when active object is None
Philipp Oeser [Mon, 11 Jun 2018 09:00:19 +0000 (11:00 +0200)]
Fix T55278: Lightmap Pack > New Image broken when active object is None

thanx bblanimation (Christopher Gearhart) for spotting the issue and
providing the fix!

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3449

2 years agopath_util: avoid overflow w/ strtoll use
Campbell Barton [Mon, 11 Jun 2018 08:43:34 +0000 (10:43 +0200)]
path_util: avoid overflow w/ strtoll use

Also style cleanup.

2 years agoFix PyConsole: Drag events finished early in modal text selection
Philipp Oeser [Mon, 11 Jun 2018 08:18:51 +0000 (10:18 +0200)]
Fix PyConsole: Drag events finished early in modal text selection

2 years agoFix T55140: opened image doesn't show up in movie clip editor
Philipp Oeser [Fri, 1 Jun 2018 09:58:50 +0000 (11:58 +0200)]
Fix T55140: opened image doesn't show up in movie clip editor

atoi usage in BLI_stringdec could overflow, use strtoll instead and
check
valid range with INT_MIN and INT_MAX

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3452

2 years agoFix T55349: crash adding paint slot when object is on hidden layer
Philipp Oeser [Mon, 11 Jun 2018 07:12:29 +0000 (09:12 +0200)]
Fix T55349: crash adding paint slot when object is on hidden layer

use better poll and get ob with 'ED_object_active_context' (instead of
'CTX_data_active_object')

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3467

2 years agoWM: add macros to check mouse button/gesture/wheel
Campbell Barton [Sun, 10 Jun 2018 10:08:09 +0000 (12:08 +0200)]
WM: add macros to check mouse button/gesture/wheel

Use to check click/drag,
fixes issue with mouse wheel triggering pie menu.

2 years agoCleanup: trailing space in CMake files
Campbell Barton [Sun, 10 Jun 2018 06:12:13 +0000 (08:12 +0200)]
Cleanup: trailing space in CMake files

2 years agoRNA: remove Layout.introspect
Campbell Barton [Sat, 9 Jun 2018 16:55:51 +0000 (18:55 +0200)]
RNA: remove Layout.introspect

This was added as an experiment to extract information for docs
but this was never all that useful for its intended purpose.

2 years agoCleanup: unused functions
Campbell Barton [Sat, 9 Jun 2018 16:47:39 +0000 (18:47 +0200)]
Cleanup: unused functions

2 years agoCleanup: remove some G.main usages.
Bastien Montagne [Sat, 9 Jun 2018 13:16:44 +0000 (15:16 +0200)]
Cleanup: remove some G.main usages.

2 years agoCleanup: trailing space in RNA
Campbell Barton [Sat, 9 Jun 2018 12:40:09 +0000 (14:40 +0200)]
Cleanup: trailing space in RNA

2 years agoCleanup: style
Campbell Barton [Sat, 9 Jun 2018 12:30:32 +0000 (14:30 +0200)]
Cleanup: style

2 years agoGHOST/X11: Print the keycode w/ debug enabled
Campbell Barton [Sat, 9 Jun 2018 10:53:39 +0000 (12:53 +0200)]
GHOST/X11: Print the keycode w/ debug enabled

2 years agoGHOST/X11: Correct non-latin kb workaround case
Campbell Barton [Sat, 9 Jun 2018 10:04:07 +0000 (12:04 +0200)]
GHOST/X11: Correct non-latin kb workaround case

Harmless since this is always enabled,
only do this for easier troubleshooting when disabling the define.

2 years agoGHOST/X11: support accessing physical keycodes
Campbell Barton [Sat, 9 Jun 2018 09:23:41 +0000 (11:23 +0200)]
GHOST/X11: support accessing physical keycodes

This means we can check keys such as tilde in a generic way.

2 years agoWM: correct recent change to click/drag detection
Campbell Barton [Fri, 8 Jun 2018 20:17:21 +0000 (22:17 +0200)]
WM: correct recent change to click/drag detection

fb1915d87090a - caused click/drag events not to be detected.

Now check a key is a mouse or keyboard event.

2 years agoWM: fix panel drag event handling
Campbell Barton [Fri, 8 Jun 2018 16:58:41 +0000 (18:58 +0200)]
WM: fix panel drag event handling

2 years agoWM: fix node link & background drag
Campbell Barton [Fri, 8 Jun 2018 16:52:00 +0000 (18:52 +0200)]
WM: fix node link & background drag

2 years agoGHOST/X11: Map unknown es,dk keys to accentgrave
Campbell Barton [Fri, 8 Jun 2018 13:21:20 +0000 (15:21 +0200)]
GHOST/X11: Map unknown es,dk keys to accentgrave

2 years agoGHOST/X11: Map unknown de,fr keys to accentgrave
Campbell Barton [Fri, 8 Jun 2018 12:53:03 +0000 (14:53 +0200)]
GHOST/X11: Map unknown de,fr keys to accentgrave

This still uses the correct string when typing text,
it just allows the key to be used in keymaps.

We should eventually add scan-code support.

2 years agoPrevent wheel causing spurious click/drag events
Campbell Barton [Fri, 8 Jun 2018 12:09:45 +0000 (14:09 +0200)]
Prevent wheel causing spurious click/drag events

2 years agoCleanup: getting rid of G.main.
Bastien Montagne [Fri, 8 Jun 2018 10:16:37 +0000 (12:16 +0200)]
Cleanup: getting rid of G.main.

Sometimes one needs a *lot* of changes for a single G.main... :/

2 years agoCMake: disable WITH_COMPILER_ASAN for CMAKE_BUILD_TYPE Release
Jeroen Bakker [Fri, 8 Jun 2018 09:45:05 +0000 (11:45 +0200)]
CMake: disable WITH_COMPILER_ASAN for CMAKE_BUILD_TYPE Release

2 years agoFix regression in grease pencil drawing
Campbell Barton [Fri, 8 Jun 2018 08:52:49 +0000 (10:52 +0200)]
Fix regression in grease pencil drawing

Drag events finished drawing early.

2 years agoFix T55301: Transform confirm on release fails w/ MMB
Campbell Barton [Fri, 8 Jun 2018 06:48:21 +0000 (08:48 +0200)]
Fix T55301: Transform confirm on release fails w/ MMB

2 years agoWM: backport event/keymap type util from 2.8
Campbell Barton [Fri, 8 Jun 2018 06:46:31 +0000 (08:46 +0200)]
WM: backport event/keymap type util from 2.8

2 years agoCleanup: trailing space
Campbell Barton [Fri, 8 Jun 2018 06:07:48 +0000 (08:07 +0200)]
Cleanup: trailing space

Remove from blender/nodes, collada, blenfont & render.

2 years agoFix recently added drag events closing menus
Campbell Barton [Fri, 8 Jun 2018 06:01:43 +0000 (08:01 +0200)]
Fix recently added drag events closing menus

2 years agoWM: fix drag events applying after release
Campbell Barton [Thu, 7 Jun 2018 18:37:28 +0000 (20:37 +0200)]
WM: fix drag events applying after release

2 years agoGHOST/X11: Xinput/XIM support caused double key-up
Campbell Barton [Thu, 7 Jun 2018 18:32:51 +0000 (20:32 +0200)]
GHOST/X11: Xinput/XIM support caused double key-up

All keyboard events were sending double key events (including modifiers)
when xinput was enabled with gnome (causing much confusion!).

I cant test if XIM works,
but this isn't useful to send double events, so disabling for now.

2 years agoCleanup: typo, and 0 -> false for booleans.
Bastien Montagne [Thu, 7 Jun 2018 16:35:37 +0000 (18:35 +0200)]
Cleanup: typo, and 0 -> false for booleans.

2 years agoWM: add support for drag events
Campbell Barton [Thu, 7 Jun 2018 15:05:49 +0000 (17:05 +0200)]
WM: add support for drag events

This allows for a single key to be mapped to both release and drag,
useful for pie menus to share a key with a different action.

2 years agoFix key repeat events resetting the click timer
Campbell Barton [Thu, 7 Jun 2018 14:51:03 +0000 (16:51 +0200)]
Fix key repeat events resetting the click timer

2 years agoCleanup: trailing space for windowmanager
Campbell Barton [Thu, 7 Jun 2018 14:43:52 +0000 (16:43 +0200)]
Cleanup: trailing space for windowmanager

2 years agoWM: check for release instead of not pressed
Campbell Barton [Thu, 7 Jun 2018 14:19:59 +0000 (16:19 +0200)]
WM: check for release instead of not pressed

Makes reasoning about events more predictable.