blender.git
4 weeks agoAssetEngines: fix memleaks in append case... asset-engine
Bastien Montagne [Thu, 23 May 2019 19:34:43 +0000 (21:34 +0200)]
AssetEngines: fix memleaks in append case...

4 weeks agoMerge branch 'master' into asset-engine
Bastien Montagne [Thu, 23 May 2019 19:12:09 +0000 (21:12 +0200)]
Merge branch 'master' into asset-engine

Conflicts:
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_remap.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_defaults.c
source/blender/editors/space_file/space_file.c
source/blender/makesdna/DNA_space_types.h
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_files_link.c
source/blender/windowmanager/intern/wm_init_exit.c

4 weeks agoIndustry Compat Keymap: Support Transform tool
William Reynish [Thu, 23 May 2019 16:13:08 +0000 (18:13 +0200)]
Industry Compat Keymap: Support Transform tool

Using the T key, which is after WER

4 weeks agoUI: Move Transform tool to be after Move, Rotate, Scale in the toolbar
William Reynish [Thu, 23 May 2019 16:12:14 +0000 (18:12 +0200)]
UI: Move Transform tool to be after Move, Rotate, Scale in the toolbar

4 weeks ago3D View: add back transform tool
Campbell Barton [Thu, 23 May 2019 15:35:48 +0000 (01:35 +1000)]
3D View: add back transform tool

Further changes are planned in T64928,
this is just the initial basic version.

4 weeks agoDepsgraph: Ensure DOF object is always in the graph
Sergey Sharybin [Thu, 23 May 2019 14:57:39 +0000 (16:57 +0200)]
Depsgraph: Ensure DOF object is always in the graph

Related in T60961.
Unfortunately, doesn't fix it yet. Needs deeper investigation.

4 weeks agoEevee: Ignore COW tag when deciding on auto-bake
Sergey Sharybin [Wed, 22 May 2019 09:43:43 +0000 (11:43 +0200)]
Eevee: Ignore COW tag when deciding on auto-bake

This is too generic flag, and it might be used by anything, starting from
changes in transform ending with changes in ID properties.

The check here is to be as specific as possible. If that is not possible
the decision must be documented.

Related on T63111.

Reviewers: brecht

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

4 weeks agoDepsgraph: Don't tag original IDs for recalc
Sergey Sharybin [Wed, 22 May 2019 09:40:25 +0000 (11:40 +0200)]
Depsgraph: Don't tag original IDs for recalc

Tagging original ID introduces a conflict of interest when a separate
graph is created and is tagging objects to be re-evaluated with its
context.

This is part of the problem in T63111: tags within a temporary dependency
graph affects viewport and vice versa, which makes logic to wrongly
consider that something did change in the scene and that baking is to
be redone.

This effectively reverts db3bfd0, but this time everything seems to
be updating fine in the viewport.

4 weeks agoFix several issues with recent node selection changes.
Bastien Montagne [Thu, 23 May 2019 14:24:46 +0000 (16:24 +0200)]
Fix several issues with recent node selection changes.

Root of the issue (beside lack of control over operators evaluation in
keymaps, since tools always get tried first), is that wurrent WM code
only allows one modal op to start from a single event (returning
`PASSTHROUGH` in that case is useless, WM code still considers event as
consumed and does not try any further handling of it).

Solution is then to change trigger events of resize/link operators from
`LEFTMOUSE` to `EVT_TWEAK_L`, which makes more sense anyway, imho, for
drag operations...

Fix T64693: Can't resize selected node.
Fix T64933: "Dots" in node editor can no longer be selected by just clicking on them.
Fix T64660: no access to node connectors when a node is inside a layout frame.

4 weeks agoRevert "Fix T64660: no access to node connectors when a node is inside a layout frame."
Bastien Montagne [Thu, 23 May 2019 14:23:44 +0000 (16:23 +0200)]
Revert "Fix T64660: no access to node connectors when a node is inside a layout frame."

This reverts commit 59b7f3a16463f2286a8349028f15e7e7a3be06dc, which was
causing T64933.

4 weeks agoCleanup: Nodes: make it clear that SOCK_IN/_OUT are bitflags.
Bastien Montagne [Thu, 23 May 2019 13:28:05 +0000 (15:28 +0200)]
Cleanup: Nodes: make it clear that SOCK_IN/_OUT are bitflags.

4 weeks agoFix T65035: Wokbench Material Alpha
Jeroen Bakker [Thu, 23 May 2019 14:31:13 +0000 (16:31 +0200)]
Fix T65035: Wokbench Material Alpha

When using texture drawing the material alpha was not set correctly, It
used the `shading.xray_alpha` as this was the default set in the forward
renderer.

4 weeks agoRender: Use dependency graph for compositor/sequencer
Sergey Sharybin [Mon, 20 May 2019 13:14:10 +0000 (15:14 +0200)]
Render: Use dependency graph for compositor/sequencer

This change makes it so a minimal dependency graph which only includes
compositor and sequencer is built for the render pipeline purposes.

Tricky part here is that it's only compositor itself and sequencer who
to use this dependency graph and IDs from it. Render engines are still
to be provided original IDs because:

- They will create dependency graph for the given scene, and currently
  it is not possible to create dependency graph from CoW scene.

- IDs from the compositor/sequencer dependency graph are "stripped",
  as in, they wouldn't have all view layers, collections or objects
required for proper final render.

This creates annoying mess of mixing evaluated and original scene
access in various parts of the pipeline.

Fixes T63927: Compositing nodes - drivers don't really work

Reviewers: brecht

Maniphest Tasks: T63927

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

4 weeks agoDepsgraph: Allow building scene properties
Sergey Sharybin [Fri, 17 May 2019 15:07:45 +0000 (17:07 +0200)]
Depsgraph: Allow building scene properties

This is used by driers and this is a first step towards support of
scenes used for only compositor or sequencer.

Fixes T61014: Assert adding a driver that uses a single property of a scene ID

4 weeks agoDepsgraph: Allow having ID built checks be more granular
Sergey Sharybin [Mon, 20 May 2019 10:03:46 +0000 (12:03 +0200)]
Depsgraph: Allow having ID built checks be more granular

4 weeks agoFix addon preference registration setting preferences dirty
Campbell Barton [Thu, 23 May 2019 13:59:43 +0000 (23:59 +1000)]
Fix addon preference registration setting preferences dirty

Setting the `bl_idname` on registration was setting dirty.

4 weeks agoDepsgraph: Fix fake dependnecy cycle in proxies
Sergey Sharybin [Thu, 23 May 2019 08:26:17 +0000 (10:26 +0200)]
Depsgraph: Fix fake dependnecy cycle in proxies

Noticed when was looking into T64764, F7043663.

This is a weird case when proxy group is not a group, but is the
same as linked object.

Remove useless relation which was causing cycle, but had no functional
meaning.

Pair programming session with Brecht.

Reviewers: angavrilov, brecht

Reviewed By: brecht

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

4 weeks agoFix T65002: after hiding edit mode object, clicking in wireframe mode crashes
George Vogiatzis [Thu, 23 May 2019 11:57:03 +0000 (13:57 +0200)]
Fix T65002: after hiding edit mode object, clicking in wireframe mode crashes

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

4 weeks agoEevee: Fix SSS energy disapearing with alpha blended material
Clément Foucault [Thu, 23 May 2019 13:30:38 +0000 (15:30 +0200)]
Eevee: Fix SSS energy disapearing with alpha blended material

4 weeks agoDepsgraph: Correct relations for proxy group
Sergey Sharybin [Thu, 23 May 2019 12:28:57 +0000 (14:28 +0200)]
Depsgraph: Correct relations for proxy group

At some point when the transform evaluation was split into EVAL and FINAL
the b350edc was re-introduced by EVAL being run prior to proxy_group's
matrix is evaluated.

4 weeks agoCompositor: FileOutput
Jeroen Bakker [Thu, 23 May 2019 10:29:55 +0000 (12:29 +0200)]
Compositor: FileOutput

The File output node stores it settings locally, but the stereo settings
were not displayed, making users only able to use the default settings
of the node.

The cause of not displaying the buttons are was a NULL-pointer check in
`uiTemplateImageFormatViews`. The NULL pointer was used to check if
multiview was enabled. in case of the file output node this check was
performed by the node, so the nullpointer check could be ignored.

Reviewed By: brecht

Maniphest Tasks: T62767

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

4 weeks agoCleanup: Remove debug print
Jeroen Bakker [Thu, 23 May 2019 12:14:36 +0000 (14:14 +0200)]
Cleanup: Remove debug print

4 weeks agoFix T63176: Compositor stipes when scaling
Jeroen Bakker [Thu, 23 May 2019 11:28:03 +0000 (13:28 +0200)]
Fix T63176: Compositor stipes when scaling

4 weeks 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

4 weeks 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

4 weeks 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.

4 weeks 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.

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

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

4 weeks 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.

4 weeks 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

4 weeks 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](https://wiki.blender.org/wiki/Style_Guide/Python)
on the wiki.

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

Reviewed by: sergey

4 weeks 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

4 weeks agoFix (unreported) missing remapping of proxy_from pointer. blender2.7
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.

4 weeks 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).

4 weeks 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

4 weeks 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)

4 weeks 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.

4 weeks 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.

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

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

4 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

4 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!

4 weeks 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

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

4 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()`
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. :(

4 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)...

4 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

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

4 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)...

4 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

4 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).

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

4 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

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

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

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

4 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

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

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

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

4 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

4 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
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

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

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

4 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

4 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

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

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

4 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

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

4 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

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

4 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

4 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

4 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
common_view_lib.glsl.

4 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

4 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_*

4 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_*

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

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

4 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

4 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

4 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

4 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

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

4 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

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

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

4 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

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

4 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

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

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

4 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

4 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

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

4 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').

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

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