blender.git
2 years agoMerge branch 'blender2.7'
Bastien Montagne [Thu, 23 May 2019 08:23:11 +0000 (10:23 +0200)]
Merge branch 'blender2.7'

Conflicts:
source/blender/blenkernel/intern/library_remap.c

2 years agoFix (unreported) missing remapping of proxy_from pointer.
Bastien Montagne [Thu, 23 May 2019 08:17:43 +0000 (10:17 +0200)]
Fix (unreported) missing remapping of proxy_from pointer.

That would break proxy behavior after a library reload.

The usual super-annoying loop-back pointers... At least that one is
easily detectable and can be fixed in-place.

Found while investigating T64764.

2 years agoFix T65023: Tracking marker color is not updated when using Copy Color
Sergey Sharybin [Thu, 23 May 2019 08:02:37 +0000 (10:02 +0200)]
Fix T65023: Tracking marker color is not updated when using Copy Color

Missing dependency graph update.

Ideally need to introduce more clear ID_RECALC flag, and maybe go over all
of the operators (some of them might not use dependency graph still).

2 years agoMasks: Properly port to Copy-on-Write concept
Sergey Sharybin [Tue, 21 May 2019 15:29:58 +0000 (17:29 +0200)]
Masks: Properly port to Copy-on-Write concept

Masks were not really covered by Copy-on-Write due to mistake
in the dependency graph. After correcting that mistake a lot
of tools became broken, so majority of the patch is related
on making it so access to evaluated/tessellated masks is done.

When accessing evaluated mask state make sure access to an
evaluated dependency graph is done. This solves possible
access to NULL data on redo.

Fixes T64899: Re-doing new point addition causes crash

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T64899

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

2 years agoCorrect last commit (gizmo order was reversed)
Campbell Barton [Thu, 23 May 2019 07:21:11 +0000 (17:21 +1000)]
Correct last commit (gizmo order was reversed)

2 years agoCleanup: replace the visible gizmo linked list with an array
Campbell Barton [Thu, 23 May 2019 06:33:21 +0000 (16:33 +1000)]
Cleanup: replace the visible gizmo linked list with an array

Avoids an allocation per gizmo & simplifies limiting the lookup
past the first intersecting 2D gizmo found.

2 years agoCleanup: allow BLI_Buffer to be used without it's header
Campbell Barton [Thu, 23 May 2019 06:32:58 +0000 (16:32 +1000)]
Cleanup: allow BLI_Buffer to be used without it's header

Without this any functions declared that take BLI_Buffer
also needed to include the header.

2 years 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.

2 years 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.

2 years 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

2 years 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!

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

Conflicts:
source/blender/blenkernel/intern/library.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/screen/screen_edit.c

2 years 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.

2 years 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()`
function).

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. :(

2 years 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)...

2 years 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

2 years 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
one).

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.

2 years 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)...

2 years 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

2 years 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).

2 years 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.

2 years 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

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

2 years 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.

2 years 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.

2 years 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

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

2 years 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: https://developer.blender.org/D4925

2 years 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.

2 years 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

2 years 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
luminance.

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
artifacts.

Reviewed By: fclem

Maniphest Tasks: T64947

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

2 years 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(),
fmodifier.control_points.add/remove().

2 years 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.

2 years 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

2 years 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

2 years 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.

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

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

2 years 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.

2 years 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

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

2 years 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

2 years 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

2 years 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
common_view_lib.glsl.

2 years 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

2 years 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_*

2 years 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_*

2 years 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.

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years 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

2 years 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: https://developer.blender.org/D4921

2 years 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').

2 years 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.

2 years 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.

2 years 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.

2 years 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.

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

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

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

2 years 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.

2 years 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.

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

2 years 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
object.

2 years 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: https://developer.blender.org/D4919

Reviewers: Brecht Van Lommel, Pablo Vazquez

2 years 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.

2 years 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: https://developer.blender.org/D4898

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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: https://developer.blender.org/D4916

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

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

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

2 years 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.

2 years 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: https://developer.blender.org/D4910

2 years 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

2 years 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: https://developer.blender.org/D4914

2 years 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.

2 years 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
non-anti-aliased.

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: https://developer.blender.org/D4907

2 years 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: https://developer.blender.org/D4864

2 years 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

2 years 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

2 years 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

2 years 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: https://developer.blender.org/D4912