8 weeks agoGizmo: highlighted gizmo now handles all events first
Campbell Barton [Thu, 23 May 2019 04:20:33 +0000 (14:20 +1000)]
Gizmo: highlighted gizmo now handles all events first

Only mouse events were handled by the highlighted gizmo,
this allows more flexibility with event handling.

8 weeks agoCleanup: split keymap handling into functions
Campbell Barton [Thu, 23 May 2019 04:01:50 +0000 (14:01 +1000)]
Cleanup: split keymap handling into functions

Move keymap handler logic for keymap and gizmo handlers
into their own functions.

This makes it possible to refactor keymap handling
without large changes or duplicating code.

8 weeks agoCleanup: de-duplicate popover_group arguments
Campbell Barton [Thu, 23 May 2019 02:29:28 +0000 (12:29 +1000)]
Cleanup: de-duplicate popover_group arguments

8 weeks agoCleanup: modernize code of new `BLE_main_id_refcount_recompute()`.
Bastien Montagne [Wed, 22 May 2019 21:50:39 +0000 (23:50 +0200)]
Cleanup: modernize code of new `BLE_main_id_refcount_recompute()`.

No functional change expected!

8 weeks agoMerge branch 'blender2.7'
Bastien Montagne [Wed, 22 May 2019 21:34:07 +0000 (23:34 +0200)]
Merge branch 'blender2.7'


8 weeks agoFix (unreported) broken collections after undo/redo, or remapping (leading to crashes).
Bastien Montagne [Wed, 22 May 2019 20:57:16 +0000 (22:57 +0200)]
Fix (unreported) broken collections after undo/redo, or remapping (leading to crashes).

Those are two cases where keeping infamous backward `parents` pointers
of collections in sync is kind of impossible to do... So rebuilding
those relationships from scratch instead.

Fixes e.g. a crash when undoing, then reloading a library, and likely
many more weird ones like that.

Uncovered while investigating T64764.

8 weeks agoBKE Collection: Add new function to rebuild parent relationships.
Bastien Montagne [Wed, 22 May 2019 20:51:36 +0000 (22:51 +0200)]
BKE Collection: Add new function to rebuild parent relationships.

It's not always possible to keep 'by hand' parent relationships valid in
collections hierarchy. Add functions to remake those
(re-using/factorizing code from `readfile.c` `lib_link_collection_data()`

Can't stress again how painful it is to have those kind of backward
relationships in our data structures, those *always* end up being
serious issues to keep in sync... Should only be generated on the fly
when needed, period. :(

8 weeks agoFix T64764: 'Reload' on linked libraries disconnects proxy armature datablocks.
Bastien Montagne [Wed, 22 May 2019 07:23:17 +0000 (09:23 +0200)]
Fix T64764: 'Reload' on linked libraries disconnects proxy armature datablocks.

Note that this only fixes the core issue reported (caused by own dummy
mistake in rBd0df7fb3b94ea), investigating that report uncovered at leat
two more issues, including a crasher (when reloading after an undo)...

8 weeks agofix T64873 collada export crashes Blender on Mac
Gaia Clary [Wed, 22 May 2019 19:33:50 +0000 (21:33 +0200)]
fix T64873 collada export crashes Blender on Mac

8 weeks agoFix (unreported) usercount of linked IDs becoming garbage after undo/redo.
Bastien Montagne [Wed, 22 May 2019 19:10:36 +0000 (21:10 +0200)]
Fix (unreported) usercount of linked IDs becoming garbage after undo/redo.

Not re-reading linked data-blocks in undo/redo case also means that we
do not touch to their usercounts. Even worse, lib_link process in
readfile will increase those (for cases where local data uses linked

Whole data management code is now heavily relying on valid consistent
refcount of all IDs, so we cannot allow that anymore.

Simple solution here could have been to then not increase that one for
linked IDs in `newlibadr_us()`, but unfortunately that would not be
totally bullet-proof, as some local users of linked data may be added or
removed by an undo step...

So I cannot think of any other solution than the ugly brute force one,
i.e. going over the whole Main database and recompute linked IDs users
count... Should not be a big issue performance wise though, this is
fairly cheap process.

8 weeks agoBKE Library handling: add function to recompute usercounts of IDs.
Bastien Montagne [Wed, 22 May 2019 19:08:51 +0000 (21:08 +0200)]
BKE Library handling: add function to recompute usercounts of IDs.

This will be needed in undo/redo case, since we do not re-read linked
IDs, their usercounts become total garbage (especially in 'used by local
ID' cases)...

8 weeks agoSequencer: ensure Strip is the default active panel
Brecht Van Lommel [Wed, 22 May 2019 17:50:40 +0000 (19:50 +0200)]
Sequencer: ensure Strip is the default active panel

8 weeks agoVisibility panel: Use "toggle" keyword
Dalai Felinto [Wed, 22 May 2019 16:18:44 +0000 (16:18 +0000)]
Visibility panel: Use "toggle" keyword

No functional nor visual change.
This is a partial revert of 0910932e71d2.

The toggle option was introduced on 6640bcca7422.
This allow us to simplify the outliner draw code so it uses the icon as
defined in the RNA (as oppose to get the value there once again).

8 weeks agoUI: allow shrinking panel height to zero when open.
Alexander Gavrilov [Wed, 22 May 2019 14:59:06 +0000 (17:59 +0300)]
UI: allow shrinking panel height to zero when open.

Currently if a panel becomes empty (draw simply returns), it stays
at the last non-empty height. This seems to be caused by some legacy
checks that may be completely obsolete, but the safest fix is to at
least allow resetting height when the panel is open.

8 weeks agoSequencer: Swap Data and Info panel names
William Reynish [Wed, 22 May 2019 14:42:11 +0000 (16:42 +0200)]
Sequencer: Swap Data and Info panel names

Following feedback from Blender Studio animators

8 weeks agoError in last commit
Campbell Barton [Wed, 22 May 2019 14:38:29 +0000 (00:38 +1000)]
Error in last commit

8 weeks agoFix T64679: Missing dirty preferences tag
Campbell Barton [Wed, 22 May 2019 14:29:46 +0000 (00:29 +1000)]
Fix T64679: Missing dirty preferences tag

Use a default update function for user preferences that tags
dirty and redraws (if changed).

This avoids relying on button changes which fail in some cases.

8 weeks agoRNA: add fallback update function
Campbell Barton [Wed, 22 May 2019 14:29:31 +0000 (00:29 +1000)]
RNA: add fallback update function

Use so we can have a default update function,
that doesn't need to be set for every property.

8 weeks agoCleanup: disambiguate rna_userdef_update_ui/ui_update
Campbell Barton [Wed, 22 May 2019 13:58:37 +0000 (23:58 +1000)]
Cleanup: disambiguate rna_userdef_update_ui/ui_update

8 weeks agoCleanup: unused vars
Campbell Barton [Wed, 22 May 2019 14:35:14 +0000 (00:35 +1000)]
Cleanup: unused vars

8 weeks agoDrawEngines: Depth Of Field Units
Jeroen Bakker [Wed, 22 May 2019 13:22:10 +0000 (15:22 +0200)]
DrawEngines: Depth Of Field Units

The unit system is designed for displaying and editing and not for
rendering. Eevee, Workbench and GPencil used these settings to convert
the focal length and sensor size to world units. Making depth of field
render differently with Cycles.

For now we will remove the scale in the draw engines to match cycles,
until we implemented a camera parameters specific scale.

Reviewed By: brecht, fclem

Maniphest Tasks: T64988

Differential Revision:

8 weeks agoDRW/Eevee: Fix camera texture coordinates in renders
Clément Foucault [Wed, 22 May 2019 14:09:03 +0000 (16:09 +0200)]
DRW/Eevee: Fix camera texture coordinates in renders

This patch fix the issue introduced by recent refactor and fixes
computation when using overscans.

8 weeks agoUI: Sequencer menus
William Reynish [Wed, 22 May 2019 12:59:04 +0000 (14:59 +0200)]
UI: Sequencer menus

Final small tweaks and fixes by Peter Fog:

  - Remove commented lines
  - Set 'Both' handle selection before Left and Right
  - Small tweaks to Strip and Context menus

Any further tweaks will be postponed for 2.81

8 weeks agoWorkbench: FXAA Artifacts
Jeroen Bakker [Wed, 22 May 2019 12:02:36 +0000 (14:02 +0200)]
Workbench: FXAA Artifacts

When using FXAA when rendering to an image the alpha channel was not
correct what lead to visual artifacts.

These artifacts come from the FXAA function that overwrites the alpha
channel with the original Luma of the texel. In the shader this can be
turned on or off. But at the end it always overwrites the alpha with the

We didn't use this feature, but the alpha of the resulting pixel still
contained the luma value what lead to render artifacts.
By overwriting the alpha channel with the original alpha we remove these

Reviewed By: fclem

Maniphest Tasks: T64947

Differential Revision:

8 weeks agoRNA: fix missing depsgraph update tagging in FCurve methods.
Alexander Gavrilov [Wed, 22 May 2019 11:40:11 +0000 (14:40 +0300)]
RNA: fix missing depsgraph update tagging in FCurve methods.

Add tags in fcurve.update(), keyframe_point.insert/add/remove(),

8 weeks agoRNA: allow 'TIME' on Actions and any IDs with AnimData in ID.update_tag.
Alexander Gavrilov [Wed, 22 May 2019 11:33:28 +0000 (14:33 +0300)]
RNA: allow 'TIME' on Actions and any IDs with AnimData in ID.update_tag.

8 weeks agoFix: Auto Merge icon state were wrongly swapped
William Reynish [Wed, 22 May 2019 12:21:31 +0000 (14:21 +0200)]
Fix: Auto Merge icon state were wrongly swapped

8 weeks agoDRW: Only change VAO if geometry changes
Clément Foucault [Wed, 22 May 2019 11:27:43 +0000 (13:27 +0200)]
DRW: Only change VAO if geometry changes

8 weeks agoGPU: Refactor GPU_batch_draw_range_ex
Clément Foucault [Wed, 22 May 2019 09:31:49 +0000 (11:31 +0200)]
GPU: Refactor GPU_batch_draw_range_ex

Rename it to GPU_batch_draw_advanced and use base instance when possible.

Also add GPU_batch_bind to bind the vao independantly of drawing commands.

8 weeks agoFox drwview
Clément Foucault [Tue, 21 May 2019 22:32:12 +0000 (00:32 +0200)]
Fox drwview

8 weeks agoCleanup: DRW: Remove, rename stuffs
Clément Foucault [Tue, 21 May 2019 21:56:55 +0000 (23:56 +0200)]
Cleanup: DRW: Remove, rename stuffs

8 weeks agoDRW: Do not update the view ubo for each pass
Clément Foucault [Tue, 21 May 2019 20:11:53 +0000 (22:11 +0200)]
DRW: Do not update the view ubo for each pass

Only update if the view changes.

8 weeks agoFix T64806 Missing sss_blur pass in EEVEE crashing indirect light bake
Clément Foucault [Tue, 21 May 2019 19:31:58 +0000 (21:31 +0200)]
Fix T64806 Missing sss_blur pass in EEVEE crashing indirect light bake

8 weeks agoDRW: DRWView: Finish refactor
Clément Foucault [Tue, 21 May 2019 19:29:25 +0000 (21:29 +0200)]
DRW: DRWView: Finish refactor

8 weeks agoEevee: Make lookdev shader use common_view_lib
Clément Foucault [Tue, 21 May 2019 18:28:14 +0000 (20:28 +0200)]
Eevee: Make lookdev shader use common_view_lib

8 weeks agoEevee: Make lightprobes work with new DRWView system
Clément Foucault [Tue, 21 May 2019 18:24:54 +0000 (20:24 +0200)]
Eevee: Make lightprobes work with new DRWView system

8 weeks agoEevee: Make Planar reflections work with the new DRWView system
Clément Foucault [Tue, 21 May 2019 15:53:49 +0000 (17:53 +0200)]
Eevee: Make Planar reflections work with the new DRWView system

Also get rid of clip_block which did the same as clipplanes inside

8 weeks agoDRW: Add view param to DRW_culling_* functions
Clément Foucault [Tue, 21 May 2019 14:55:17 +0000 (16:55 +0200)]
DRW: Add view param to DRW_culling_* functions

8 weeks agoEevee: Use DRW_view_* API instead of DRW_viewport_matrix_*
Clément Foucault [Tue, 21 May 2019 10:34:48 +0000 (12:34 +0200)]
Eevee: Use DRW_view_* API instead of DRW_viewport_matrix_*

8 weeks agoGPencil: Use DRW_view_* API instead of DRW_viewport_matrix_*
Clément Foucault [Tue, 21 May 2019 08:35:59 +0000 (10:35 +0200)]
GPencil: Use DRW_view_* API instead of DRW_viewport_matrix_*

8 weeks agoBLI_memblock: Refactor for faster iteration and allocation
Clément Foucault [Mon, 20 May 2019 22:54:03 +0000 (00:54 +0200)]
BLI_memblock: Refactor for faster iteration and allocation

Remove the clear allocation flag as it has little impact since there should
be very few allocation per redraw.

Make BLI_memblock_alloc and BLI_memblock_iterstep much more cache efficient
removing them almost entirely from performance profiles.

8 weeks agoWorkbench: Fix TAA logic
Clément Foucault [Tue, 21 May 2019 08:07:41 +0000 (10:07 +0200)]
Workbench: Fix TAA logic

Having both TAA and FXAA enabled at the same time resulted in conflicts.
The jitter_index was incremented twice before being used instead of once.

8 weeks agoWorkbench: Use DRWView instead of DRW_viewport_matrix_*
Clément Foucault [Mon, 20 May 2019 18:33:56 +0000 (20:33 +0200)]
Workbench: Use DRWView instead of DRW_viewport_matrix_*

Continuing the transition to the new API

8 weeks agoDRW: Remove some usage of DRW_viewport_matrix_get
Clément Foucault [Mon, 20 May 2019 17:35:20 +0000 (19:35 +0200)]
DRW: Remove some usage of DRW_viewport_matrix_get

8 weeks agoDRW: Remove DRW_state_clip_planes_reset
Clément Foucault [Mon, 20 May 2019 17:11:21 +0000 (19:11 +0200)]
DRW: Remove DRW_state_clip_planes_reset

8 weeks agoDRW: Remove DRW_state_clip_planes_set_from_rv3d
Clément Foucault [Mon, 20 May 2019 17:05:02 +0000 (19:05 +0200)]
DRW: Remove DRW_state_clip_planes_set_from_rv3d

This should be handled by DST.view_default

8 weeks agoDRW: Add DRWView to improve different view handling
Clément Foucault [Mon, 20 May 2019 16:01:42 +0000 (18:01 +0200)]
DRW: Add DRWView to improve different view handling

This will have multiple benefit.

TODO detail benefits (culling, more explicit, handling of clipping planes)

For now the view usage is wrapped to make changes needed more progressive.

8 weeks agoEevee: Lookdev: Make winmat point to negative Z
Clément Foucault [Tue, 21 May 2019 18:47:17 +0000 (20:47 +0200)]
Eevee: Lookdev: Make winmat point to negative Z

8 weeks agoCleanup: DRW: Refactor code for better readability and simplification
Clément Foucault [Sun, 19 May 2019 14:54:01 +0000 (16:54 +0200)]
Cleanup: DRW: Refactor code for better readability and simplification

- Remove DST.frontface and DST.backface.
- Separate uniform update into its own function draw_update_uniforms.

8 weeks agoTemplates: updated 2D animation template
Brecht Van Lommel [Mon, 20 Aug 2018 12:29:32 +0000 (14:29 +0200)]
Templates: updated 2D animation template

From the grease pencil team.

8 weeks agoBLI_memiter: unpoison memory before freeing it
Jacques Lucke [Wed, 22 May 2019 10:33:15 +0000 (12:33 +0200)]
BLI_memiter: unpoison memory before freeing it

8 weeks agoFix T64480: Tweak needed to Audaspace CMake options
Jörg Müller [Wed, 22 May 2019 10:14:51 +0000 (12:14 +0200)]
Fix T64480: Tweak needed to Audaspace CMake options

The issue was that Audaspace options ended up in the cmake cache though
they should not be there.

Also reverting indentation change by @ideasman42.
Thanks to @mont29 for reporting and helping with the fix.

8 weeks agoFix T64981: background images do not come along with linked cameras
Brecht Van Lommel [Wed, 22 May 2019 08:44:02 +0000 (10:44 +0200)]
Fix T64981: background images do not come along with linked cameras

8 weeks agoFix T64972: object convert to mesh not working after recent changes
Brecht Van Lommel [Wed, 22 May 2019 08:32:40 +0000 (10:32 +0200)]
Fix T64972: object convert to mesh not working after recent changes

This was the only remaining cases that used a string lookup, which didn't
work anymore now that it's no longer a real value in the context.

8 weeks agoFix T64969: changing color space in image texture node loses changes
Brecht Van Lommel [Wed, 22 May 2019 08:06:31 +0000 (10:06 +0200)]
Fix T64969: changing color space in image texture node loses changes

Don't allow changing it for painted images until they have been saved, similar
to sidebar panels. This could be solved better, for now the important thing is
not to lose changes.

8 weeks agoFix T64965: crash using masks in texture paint mode
Brecht Van Lommel [Wed, 22 May 2019 07:59:52 +0000 (09:59 +0200)]
Fix T64965: crash using masks in texture paint mode

8 weeks agoFix T64974: misisng multi-object edit for some curve operators, like smooth
Brecht Van Lommel [Wed, 22 May 2019 07:35:14 +0000 (09:35 +0200)]
Fix T64974: misisng multi-object edit for some curve operators, like smooth

8 weeks agoFix T64499: edit mode display glitch on Intel HD 4x00 and Windows 7/8
Brecht Van Lommel [Tue, 21 May 2019 21:59:57 +0000 (23:59 +0200)]
Fix T64499: edit mode display glitch on Intel HD 4x00 and Windows 7/8

There may well be more vertex shaders that need this, but I couldn't find them
in my testing.

Differential Revision:

8 weeks agoUI: tweak order of shading mode display
Campbell Barton [Wed, 22 May 2019 05:15:55 +0000 (15:15 +1000)]
UI: tweak order of shading mode display

Order 'Matcaps' first instead of 'Flat'.
Order 'Material' first instead of 'Single'.

While we don't have to order defaults first, it's strange
to have obscure options first (in the case of 'Flat').

8 weeks agoUI: use term 'Factory Settings' for preference menu
Campbell Barton [Wed, 22 May 2019 04:33:02 +0000 (14:33 +1000)]
UI: use term 'Factory Settings' for preference menu

It's not clear what 'Defaults' mean in this context because we have
the defaults the users has saved & factory defaults.

8 weeks agoPreferences: add handler for loading factory preferences
Campbell Barton [Wed, 22 May 2019 04:28:10 +0000 (14:28 +1000)]
Preferences: add handler for loading factory preferences

Allows app-templates to define their own adjustments to preferences.
This matches `load_factory_startup_post`, use when loading preferences.

8 weeks agoWM: call wm_file_read_post after resetting preferences
Campbell Barton [Wed, 22 May 2019 04:05:22 +0000 (14:05 +1000)]
WM: call wm_file_read_post after resetting preferences

Also avoid diverging code paths for loading startup & preferences.

8 weeks agoFix T63852: Invalid keymaps written
Campbell Barton [Wed, 22 May 2019 03:22:45 +0000 (13:22 +1000)]
Fix T63852: Invalid keymaps written

Track-pad & NDOF events were using KM_NOTHING which wasn't included in
the RNA enum, causing the value to be an empty string in exported key-map
(which then failed to load back).

Add back 'Nothing' value, keep it last since it's not used often.

8 weeks agoFix WITH_PYTHON_MODULE linking
Campbell Barton [Wed, 22 May 2019 01:20:40 +0000 (11:20 +1000)]

Also remove bf_blenfont since it's not used by creator directly.

8 weeks agoFix WITH_HEADLESS build
Campbell Barton [Wed, 22 May 2019 00:34:34 +0000 (10:34 +1000)]

8 weeks agoGPU_select_buffer_stride_realign: fix crash when one of the rect's dimensions is 0.
mano-wii [Tue, 21 May 2019 23:56:27 +0000 (20:56 -0300)]
GPU_select_buffer_stride_realign: fix crash when one of the rect's dimensions is 0.

8 weeks agodna_genfile: add SDNA struct/elem queries that use alias names
Campbell Barton [Tue, 21 May 2019 23:15:06 +0000 (09:15 +1000)]
dna_genfile: add SDNA struct/elem queries that use alias names

Allow versioning code to use checks which use run-time naming
instead of the old names which are only listed in dna_rename_defs.h.

Addresses T64791.

8 weeks agoCleanup: minor corrections
Campbell Barton [Tue, 21 May 2019 22:39:15 +0000 (08:39 +1000)]
Cleanup: minor corrections

8 weeks agoRemove "_base*" from context API
Dalai Felinto [Tue, 21 May 2019 13:49:05 +0000 (10:49 -0300)]
Remove "_base*" from context API

We are not exposing RNA_ObjectBase in the 2.80 API.

Thus we can't have operators relying on it (e.g, CTX_data_visible_bases,
CTX_data_active_base, ...). Otherwise users won't be able to override
context for these operators.

This commit keep the CTX_data_.*bases() functions around so we don't
need to change the operators and potentially break things that late into
2.80. However as far as the Python scripters are concerned there is no
base to be overriden, ever.

That also simplify the guessing game addon developers have to play when
trying to override an operatori context. They still need to find whether an
operator requires editables, visibles, selected, ... objects. But at
least they don't need to find out whether the operators need base or

8 weeks agoUI: Edit Mode Options panel cleanup
William Reynish [Tue, 21 May 2019 20:50:02 +0000 (22:50 +0200)]
UI: Edit Mode Options panel cleanup

  - Move Live Unwrap to UV menu
  - Move Auto Merge Threshold into a sub-section of Auto Merge to make the relationships clearer

Differential Revision:

Reviewers: Brecht Van Lommel, Pablo Vazquez

8 weeks agoFix T58492: Removes jitter when using adaptive smoke domains
Sebastián Barschkis [Tue, 21 May 2019 20:07:35 +0000 (22:07 +0200)]
Fix T58492: Removes jitter when using adaptive smoke domains

This small fix in the GLSL shader seems do to the trick: now smoke won't jitter when using the adaptive domain.

The previous workaround rB3891ad8e0317 is still needed too, i.e. the bug that caused jitter this time was not related to the previous one.

8 weeks agoVSE: Don't store `cfra` in cache
Richard Antalik [Tue, 21 May 2019 19:29:17 +0000 (12:29 -0700)]
VSE: Don't store `cfra` in cache

Strips can move in time. Using cfra may give us erratic results.

Reviewed by: brecht

Differential Revision:

8 weeks agoFix: Reset to the default theme not auto-saved
Dalai Felinto [Tue, 21 May 2019 14:26:47 +0000 (11:26 -0300)]
Fix: Reset to the default theme not auto-saved

T64679 mention a desire for a solution that is not in a per-case basis.
However until then we are still better off with this working then not.

Specially since changing individual theme elements works, while reset
theme was not working.

8 weeks agoUI: Fix wrong naming and tooltips
William Reynish [Tue, 21 May 2019 18:03:43 +0000 (20:03 +0200)]
UI: Fix wrong naming and tooltips

Double Threshold -> Merge Threshold
This relates to Auto Merge

AutoMerge Editing -> Auto Merge
No need for redundant 'Editing' here

8 weeks agoFix T64738: pick short path seam not doing live unwrap
Brecht Van Lommel [Tue, 21 May 2019 16:07:47 +0000 (18:07 +0200)]
Fix T64738: pick short path seam not doing live unwrap

8 weeks agoFix UV editor selection colors not matching 3D viewport
Brecht Van Lommel [Tue, 21 May 2019 15:59:20 +0000 (17:59 +0200)]
Fix UV editor selection colors not matching 3D viewport

8 weeks agoFix T64414: crash deleting collection used for particle group and use count
Brecht Van Lommel [Tue, 21 May 2019 15:47:04 +0000 (17:47 +0200)]
Fix T64414: crash deleting collection used for particle group and use count

8 weeks agoFix T64903: Freestyle line alpha not working for Eevee
Brecht Van Lommel [Tue, 21 May 2019 15:42:24 +0000 (17:42 +0200)]
Fix T64903: Freestyle line alpha not working for Eevee

8 weeks agoGPU: double uniform names buffer size
Jacques Lucke [Tue, 21 May 2019 15:14:38 +0000 (17:14 +0200)]
GPU: double uniform names buffer size

Adding a constant yields quadratic time complexity which can
have quite a big impact on some scenes.

I used the file from T64901 for testing.
In the test file, the time it took to execute `wm_draw_update`
changed from `0.60s` to `0.51s`.

Reviewers: brecht

Differential Revision:

8 weeks agoCleanup: remove unused function
Brecht Van Lommel [Tue, 21 May 2019 15:05:54 +0000 (17:05 +0200)]
Cleanup: remove unused function

8 weeks agoCleanup: pep8
Campbell Barton [Tue, 21 May 2019 14:27:01 +0000 (00:27 +1000)]
Cleanup: pep8

8 weeks agoCleanup: clang-format, sort structs
Campbell Barton [Tue, 21 May 2019 13:54:43 +0000 (23:54 +1000)]
Cleanup: clang-format, sort structs

8 weeks agoFix part of T64679: Missing dirty preferences tag
Campbell Barton [Tue, 21 May 2019 12:08:10 +0000 (22:08 +1000)]
Fix part of T64679: Missing dirty preferences tag

- Editing shortcuts.
- Editing walk mode navigation.
- Adding/removing paths.

8 weeks agoParticle: optimize threading for many particles and many cores
Juan Gea [Tue, 21 May 2019 14:30:03 +0000 (16:30 +0200)]
Particle: optimize threading for many particles and many cores

The maximum particles per task of 256 was outdated and lead to too much thread
contention. Instead define a low fixed number of tasks per thread.

On a i7-7700HQ, creating 4 million particles went down from 31s to 4s.

Thanks to Oscar Abad, Sav Martin, Zebus3d, Sebastián Barschkis and Martin Felke
for testing and advice.

Differential Revision:

8 weeks agoFix T64804 crash editing image paint fallof in edit mode
Brecht Van Lommel [Tue, 21 May 2019 14:31:42 +0000 (16:31 +0200)]
Fix T64804 crash editing image paint fallof in edit mode

8 weeks agopython templates: update operator_modal_view3d_raycast to 2.8
Philipp Oeser [Tue, 21 May 2019 13:21:33 +0000 (15:21 +0200)]
python templates: update operator_modal_view3d_raycast to 2.8

Reviewers: JacquesLucke, sergey

Differential Revision:

8 weeks agoFix T64936: Grease Pencil point pressure max value too low
Antonioya [Tue, 21 May 2019 14:35:13 +0000 (16:35 +0200)]
Fix T64936: Grease Pencil point pressure max value too low

The API had an old  limit of 1.0f.

8 weeks agoViewport: MSAA support during ViewportRendering
Jeroen Bakker [Tue, 21 May 2019 08:33:45 +0000 (10:33 +0200)]
Viewport: MSAA support during ViewportRendering

When rendering viewport to an offscreen buffer the buffer was
constructed for non anti aliasing (0 samples). This made the objects
that are drawn by the `object_mode` including `wireframe` draw type

The offscreen buffers will be constructed based on the user setting for
viewport multisampling (`U.ogl_multisamples`). The same setting will
also be used when previewing scene strips in the sequencer. For now
this only improves wireframe drawing in the scene strips. To improve the
Anti aliasing in the scene strips we need to get finer control in the
draw manager. This will be part of a different patch I am preparing.

Please note that this patch also cleansup some unused code in the offscreen rendering (FSAA code was still existing, but never called)

Reviewed By: brecht

Maniphest Tasks: T64849

Differential Revision:

8 weeks agoOffscreenRendering: Fix Incorrect Window Coordinates
Jeroen Bakker [Wed, 15 May 2019 07:47:22 +0000 (09:47 +0200)]
OffscreenRendering: Fix Incorrect Window Coordinates

When doing offscreen rendering (Viewport Render or Sequencer Scene
strip) EEVEE and workbench used the wrong window coordinates. These
coordinates included the border that was not drawn.

Reviewed By: brecht

Maniphest Tasks: T64505

Differential Revision:

8 weeks agoGPencil: Set samples to 10 for Soft brush
Antonioya [Tue, 21 May 2019 13:59:36 +0000 (15:59 +0200)]
GPencil: Set samples to 10 for Soft brush

8 weeks agoGPencil: Set default Fill brush size to 20
Antonioya [Tue, 21 May 2019 13:58:26 +0000 (15:58 +0200)]
GPencil: Set default Fill brush size to 20

8 weeks agoMask: Fix missing remap of active spline/point on copy
Sergey Sharybin [Tue, 21 May 2019 13:45:03 +0000 (15:45 +0200)]
Mask: Fix missing remap of active spline/point on copy

8 weeks agopython templates: update operator_modal_draw to 2.8
Philipp Oeser [Tue, 21 May 2019 11:53:17 +0000 (13:53 +0200)]
python templates: update operator_modal_draw to 2.8

part of T56351

Reviewers: JacquesLucke

Differential Revision:

8 weeks agoFix T64842: crash rendering files with bevel curves
Brecht Van Lommel [Tue, 21 May 2019 12:54:08 +0000 (14:54 +0200)]
Fix T64842: crash rendering files with bevel curves

This is old logic that no longer makes sense in the new depsgraph, and causes
issues when multiple threads try to modify the same bevel object.

Differential Revision:

8 weeks agoCTest: Fix Bli_task_test failing on windows.
Ray Molenkamp [Tue, 21 May 2019 12:51:24 +0000 (06:51 -0600)]
CTest: Fix Bli_task_test failing on windows.

The task_scheduler was not being explicitly freed, leading to
unpredictable behavior when the process was exiting. The test
would pass, but would sometimes segfault at process shutdown.

8 weeks agoCleanup: use term pad instead of padding
Campbell Barton [Tue, 21 May 2019 12:27:09 +0000 (22:27 +1000)]
Cleanup: use term pad instead of padding

- Use min/max instead of bottom/top
  (in keeping with the rest of the BLI_rect API).
- Swap args (was passing in max, min).

8 weeks agoFix T64758: crash loading certain DDS textures
Brecht Van Lommel [Tue, 21 May 2019 11:00:43 +0000 (13:00 +0200)]
Fix T64758: crash loading certain DDS textures

8 weeks agoFix T64421: crash using redraw timer benchmark
Brecht Van Lommel [Tue, 21 May 2019 10:34:54 +0000 (12:34 +0200)]
Fix T64421: crash using redraw timer benchmark

8 weeks agoGraph Editor: view-selected takes scrubbing and marker region into account
Jacques Lucke [Tue, 21 May 2019 09:59:10 +0000 (11:59 +0200)]
Graph Editor: view-selected takes scrubbing and marker region into account

8 weeks agoKeymap: Add additional scrubbing affordance (Alt-LMB)
William Reynish [Tue, 21 May 2019 09:28:46 +0000 (11:28 +0200)]
Keymap: Add additional scrubbing affordance (Alt-LMB)

This adds an additional way to scrub the playhead, by holding Alt and dragging with the left mouse button, in addition to Shift-RMB.

It's easier to do this, especially with pen input. The other method is still kept, in case you have Emulate 3 Button Mouse enabled, in which case Alt-LMB pans the view

And of course, you can still scrub simply by dragging the playhead, without holding any modifier keys.

Right click select is unaffected.