3 months agoCollada exporter update
Gaia Clary [Thu, 23 May 2019 10:17:17 +0000 (12:17 +0200)]
Collada exporter update

Added new feature: Collada: global axis rotation upon export (UI)

The new feature allows to specify the target rest coordinate system upon export.
This allows for example to export a character that is in Blender orientation (Y forward)
to match the Secondlife orientation where (-X forward)

- Refactor:Added new utility methods to collada_utils
           Made BCMatrix class more powerfull
           moved Blender related structures into new BlenderContext class
           added class wrapper to encapsulate ExportSettings structure
           Added blender context getters to ExportSettings
           added access methods to BlenderContext into ExportSettings class
           Moved class BCMatrix into BlenderContext
           moved utility functions from collada_util into BlenderContext
           replace own function for parenting by a call to ED_object_parent_set()

- Cleanup: removed obsolete parameters from methods
           renamed parameters for better understanding
           cleanup whitespace and indentation
           removed obsolete comments

3 months agoGpencil: Fix assert when rendering with Eevee
Clément Foucault [Thu, 23 May 2019 10:10:25 +0000 (12:10 +0200)]
Gpencil: Fix assert when rendering with Eevee

3 months agoImage space, view menu: Fix access uninitialized variable
Sergey Sharybin [Thu, 23 May 2019 09:40:15 +0000 (11:40 +0200)]
Image space, view menu: Fix access uninitialized variable

Seems to be a copy-paste mistake in 7a2b203, causing menu to be
almost empty.

3 months agoFix too dense timeline grid spacing
Brecht Van Lommel [Wed, 22 May 2019 17:29:56 +0000 (19:29 +0200)]
Fix too dense timeline grid spacing

The default spacing changed when this started using the user preferences,
this makes it work more similar to before that.

3 months agoCleanup: unused import, pep8
Campbell Barton [Sun, 19 May 2019 10:44:28 +0000 (20:44 +1000)]
Cleanup: unused import, pep8

3 months agoCleanup: remove redundant separators
Campbell Barton [Tue, 21 May 2019 11:14:33 +0000 (21:14 +1000)]
Cleanup: remove redundant separators

3 months agoUI: change order of Live Unwrap in menu U key still goes to Unwrap first
Brecht Van Lommel [Thu, 23 May 2019 09:03:39 +0000 (11:03 +0200)]
UI: change order of Live Unwrap in menu U key still goes to Unwrap first

Also makes it more clear it's related specifically to this type of unwrapping.

3 months agoFix T64528: error in RenderEngine API docs example
Brecht Van Lommel [Thu, 23 May 2019 08:28:24 +0000 (10:28 +0200)]
Fix T64528: error in RenderEngine API docs example

3 months agoDepsgraph examples: don't assign to names of built-in Python objects
Sybren A. Stüvel [Thu, 23 May 2019 08:28:24 +0000 (10:28 +0200)]
Depsgraph examples: don't assign to names of built-in Python objects

`object` is the superclass of all objects. Old-style code could still be
using `class SomeClass(object)` and assigning something else to `object`
could have unexpected results.

This is now also documented in the
[Python style guide](
on the wiki.

Differential Revision:

Reviewed by: sergey

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


3 months 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.

3 months 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).

3 months 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:

3 months 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)

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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

3 months 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!

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


3 months 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.

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

3 months 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)...

3 months 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

3 months 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.

3 months 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)...

3 months 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

3 months 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).

3 months 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.

3 months 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

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

3 months 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.

3 months 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.

3 months 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

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

3 months 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:

3 months 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.

3 months 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

3 months 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:

3 months 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(),

3 months 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.

3 months 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

3 months 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

3 months 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.

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

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

3 months 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.

3 months 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

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

3 months 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

3 months 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

3 months 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

3 months 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

3 months 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_*

3 months 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_*

3 months 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.

3 months 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.

3 months 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

3 months 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

3 months 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

3 months 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

3 months 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.

3 months 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

3 months 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.

3 months 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.

3 months 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

3 months 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.

3 months 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

3 months 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.

3 months 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.

3 months 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

3 months 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

3 months 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:

3 months 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').

3 months 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.

3 months 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.

3 months 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.

3 months 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.

3 months 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.

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

3 months 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.

3 months 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.

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

3 months 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

3 months 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

3 months 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.

3 months 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:

3 months 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.

3 months 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

3 months 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

3 months 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

3 months 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

3 months 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

3 months 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:

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

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

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

3 months 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.

3 months 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: