blender.git
3 months agoMesh Batch Cache: Speedup: Use flags to early remove unecessary checks
Clément Foucault [Tue, 7 May 2019 22:12:24 +0000 (00:12 +0200)]
Mesh Batch Cache: Speedup: Use flags to early remove unecessary checks

3 months agoDRW: Make batch validation run first during iteration
Clément Foucault [Tue, 7 May 2019 21:21:16 +0000 (23:21 +0200)]
DRW: Make batch validation run first during iteration

This reduces the cost of querying the batches to the batch cache.

3 months agoDRW: Move all batch request functions to own header
Clément Foucault [Tue, 7 May 2019 21:02:42 +0000 (23:02 +0200)]
DRW: Move all batch request functions to own header

This is in order to using BLI_INLINE for thoses functions and keep headers
cleany separated.

3 months agoDRW: Change function orders to improve CPU cache efficiency
Clément Foucault [Tue, 7 May 2019 20:08:42 +0000 (22:08 +0200)]
DRW: Change function orders to improve CPU cache efficiency

These changes seems to impact cache efficiency as it uses shgroup just
after creating a DRWCall before shgroup.

3 months agoObject Overlay: Add dupli fast path
Clément Foucault [Tue, 7 May 2019 20:09:28 +0000 (22:09 +0200)]
Object Overlay: Add dupli fast path

3 months agoWireframe: Create dupli fast path using DRW_duplidata_get
Clément Foucault [Tue, 7 May 2019 18:56:55 +0000 (20:56 +0200)]
Wireframe: Create dupli fast path using DRW_duplidata_get

3 months agoDRW: Add DRW_duplidata_get to create fast path for duplis
Clément Foucault [Tue, 7 May 2019 18:56:20 +0000 (20:56 +0200)]
DRW: Add DRW_duplidata_get to create fast path for duplis

This is in order to create less shading group when using duplis.

Data for dupli objects keep in draw manager state until the source object
changes so retrieval is fast.

Note that this system could be extended to all meshes.

3 months agoGPUViewport: Fix possible hash colision with enabled engines
Clément Foucault [Tue, 7 May 2019 16:42:28 +0000 (18:42 +0200)]
GPUViewport: Fix possible hash colision with enabled engines

Also fix engine data validation that was not previously not working.

3 months agoDRW: Remove uneeded calls to drw_viewport_engine_data_ensure when iterating
Clément Foucault [Tue, 7 May 2019 16:40:02 +0000 (18:40 +0200)]
DRW: Remove uneeded calls to drw_viewport_engine_data_ensure when iterating

This remove a bit of overhead specially in scene with lots of objects.

3 months agoDRW: Replace BLI_mempool by BLI_memblock
Clément Foucault [Tue, 7 May 2019 16:01:14 +0000 (18:01 +0200)]
DRW: Replace BLI_mempool by BLI_memblock

This remove a avoid the big overhead present in BLI_mempool when it is
cleared.

3 months agoDRW: Speedup: Don't call GPU_shader_uniform_vector if not needed
Clément Foucault [Tue, 7 May 2019 15:21:26 +0000 (17:21 +0200)]
DRW: Speedup: Don't call GPU_shader_uniform_vector if not needed

This seems to remove a bit of overhead of going into the function even if
the uniform is not needed.

3 months agoBLI_memblock: New memory allocator
Clément Foucault [Tue, 7 May 2019 15:52:57 +0000 (17:52 +0200)]
BLI_memblock: New memory allocator

This is really close to BLI_mempool but uses an array to keep track of the
chunks of memory. There is no tagging necessary to clear the whole
structure so reuse is fast.

Naturally supports iteration but does not support freeing.

3 months agoFix T64302: objects disappearing when disabling overlays
Jeroen Bakker [Wed, 8 May 2019 14:52:42 +0000 (16:52 +0200)]
Fix T64302: objects disappearing when disabling overlays

Only happened for Cycles, after recent changes.

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

3 months agoRevert "UI: Dynamic region size for file browser options"
Brecht Van Lommel [Wed, 8 May 2019 12:20:10 +0000 (14:20 +0200)]
Revert "UI: Dynamic region size for file browser options"

This breaks the user interface of exporters, so revert for now until there
is a solution for this.

This reverts commit ee0d8426ab6d301c0296496c25f9511b9a9768e9.

3 months agoSpline IK: fix a scaling hiccup as bones roll off the end of the curve.
Alexander Gavrilov [Wed, 8 May 2019 14:16:27 +0000 (17:16 +0300)]
Spline IK: fix a scaling hiccup as bones roll off the end of the curve.

3 months agoFix T64266: Incorrect modifier object target after making duplicates real for instanc...
Bastien Montagne [Wed, 8 May 2019 13:50:50 +0000 (15:50 +0200)]
Fix T64266: Incorrect modifier object target after making duplicates real for instanced collections.

Not sure why newid was set in evaluated object instead of orig one,
makes no sense to me, since we want to operate remapping of ID pointers
on orig data? Looks like that was something overseen when that code was
ported to new COW system.

3 months agoUI: Move scrollbars to the right in animation editors
Jacques Lucke [Wed, 8 May 2019 13:09:02 +0000 (15:09 +0200)]
UI: Move scrollbars to the right in animation editors

The text, that was in the scrollbars, stays on the left.

Reviewers: brecht, billreynish

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

3 months agoUI: Make File Browser bookmarks panels unparented again
William Reynish [Wed, 8 May 2019 13:07:07 +0000 (15:07 +0200)]
UI: Make File Browser bookmarks panels unparented again

Also open Recents again by default

3 months agoKeymap: Make Clip Editor Graph view consistent with regular Graph Editor
William Reynish [Wed, 8 May 2019 12:54:05 +0000 (14:54 +0200)]
Keymap: Make Clip Editor Graph view consistent with regular Graph Editor

Still missing a context menu here for now though

3 months agoFix heap buffer overflow in tabs to spaces
Sergey Sharybin [Wed, 8 May 2019 12:36:35 +0000 (14:36 +0200)]
Fix heap buffer overflow in tabs to spaces

Need to count string terminator.

3 months agoKeymap: Special keymap for clip editor scrubbing area
Jacques Lucke [Wed, 8 May 2019 12:10:09 +0000 (14:10 +0200)]
Keymap: Special keymap for clip editor scrubbing area

Reviewers: sergey

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

3 months agoNormals Menu: fix Average to be able to specify type.
Howard Trickey [Wed, 8 May 2019 11:44:15 +0000 (07:44 -0400)]
Normals Menu: fix Average to be able to specify type.

Also removed some rogue debugging printfs from normal selection code.

3 months agoKeymap: Drag in empty area to box select in animation editors
William Reynish [Wed, 8 May 2019 11:11:04 +0000 (13:11 +0200)]
Keymap: Drag in empty area to box select in animation editors

This is a patch for the default keymap in Blender.
It relates to the Dopesheet, Timeline, Graph Editor, NLA and Sequencer
Currently, in these editors, dragging outside of your selections does nothing.

This patch makes it so dragging outside the selection does a box select operation.
It is consistent with how the Node Editor works, as well as the 3D View, if you use the gizmo overlays.

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

Reviewers: campbellbarton

3 months agoCMake: Add support of Ninja's pools to ease building on limited amount of RAM.
Bastien Montagne [Tue, 7 May 2019 18:32:14 +0000 (20:32 +0200)]
CMake: Add support of Ninja's pools to ease building on limited amount of RAM.

Many modern computers support a lot of threads (parrallel building
jobs), but are somewhat restricted in memory, when some building jobs
can require several GB each.

Ninja builder has pools, which extend the usual `-j X` make
parallelizing option, by allowing to specify different numbers of
parallel jobs for different targets.

This commit defines three pools, one for linking, one for usual compile,
and one for compiling some 'heavy' cpp libs, when a single file can
require GB of RAM in full debug builds.

Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible
values for those three pools based on your machine specifications, you
can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings,
if you like.

On my system (8 cores, 16GB RAM), it allows to build a full debug with
all ASAN options build with roughly 7GB of RAM used at most, pretty much
as quickly as without that option (which would require up to 11GB of
available RAM at some points).

Review task: D4780.

3 months agoCopy Scale: support raising the copied scale to an arbitrary power.
Alexander Gavrilov [Wed, 8 May 2019 09:08:54 +0000 (12:08 +0300)]
Copy Scale: support raising the copied scale to an arbitrary power.

Since scale is multiplicative, the appropriate way to partially copy
it is to use power. However, the influence slider of constraints uses
linear interpolation. Thus, there is no way to correctly split scale
via constraints without adding this feature.

In addition, this allows inverting scale by using negative powers,
fulfilling the function of Copy Rotation's Invert checkboxes.

3 months agoDisable Constraint and Keep Transform
Sybren A. Stüvel [Wed, 8 May 2019 08:57:17 +0000 (10:57 +0200)]
Disable Constraint and Keep Transform

A 'Disable and Keep Transform' button for constraints was added. This
allows animators to disable a constraint without moving the constrained
object/bone, making it easier to toggle constriants on and off without
any visual consequence. Typical usage would be a character picking up an
object (enable 'Copy Transform' constraint) and placing it somewhere
else (disable the constraint).

Note that there could still be movement when there are muliple
constraints active. For example, when using this constraint stack

- #1: Copy Transform from Empty.001
- #2: Copy Rotation from Empty.002

and disabling constraint #2, constraint #1 is still active and will
still modify the visual transform of the object. According to our
in-house animators, this is expected behaviour.

Reviewers: campbellbarton, dfelinto, sergey

Reviewed By: campbellbarton

Subscribers: brecht

Tags: #animation

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

3 months agoFix T64274: Crash with more than 1 subdivision with the Multiresolution Modifier
Sergey Sharybin [Wed, 8 May 2019 08:40:56 +0000 (10:40 +0200)]
Fix T64274: Crash with more than 1 subdivision with the Multiresolution Modifier

Update more relevant fields in the sculpt session. Really becoming annoying, but
was also annoying in the old code as well.

3 months agoFix T64298: Overlapping scrubbing area in clip editors dopesheet
Jacques Lucke [Wed, 8 May 2019 08:29:17 +0000 (10:29 +0200)]
Fix T64298: Overlapping scrubbing area in clip editors dopesheet

3 months agoUI: Remove Filters toggle in the Clip Editor Graph view
William Reynish [Wed, 8 May 2019 07:10:29 +0000 (09:10 +0200)]
UI: Remove Filters toggle in the Clip Editor Graph view

This was trying to emulate the 2.79 Graph Editor.

The toggle took up more room that the filter toggle it revealed, and it made the header buttons jump around

Better to just have the filter toggles showing immediately.

3 months agoCleanup: tabs to spaces for generated theme
Campbell Barton [Wed, 8 May 2019 07:06:35 +0000 (17:06 +1000)]
Cleanup: tabs to spaces for generated theme

Update along with generation utility.

3 months agoFix T64283: Gizmo doesn't update after click-extrude
Campbell Barton [Wed, 8 May 2019 05:14:23 +0000 (15:14 +1000)]
Fix T64283: Gizmo doesn't update after click-extrude

3 months agoCleanup: unused var, doxy syntax for math_matrix.c
Campbell Barton [Tue, 7 May 2019 23:20:12 +0000 (09:20 +1000)]
Cleanup: unused var, doxy syntax for math_matrix.c

3 months agoFix: default keymap entry for Sequencer context menu
William Reynish [Tue, 7 May 2019 19:17:11 +0000 (21:17 +0200)]
Fix: default keymap entry for Sequencer context menu

Own mistake in previous commit

3 months agoUI: Add copy/paste icons to Sequencer context menu
William Reynish [Tue, 7 May 2019 19:12:22 +0000 (21:12 +0200)]
UI: Add copy/paste icons to Sequencer context menu

3 months agoUI: Add initial context menu to Sequencer
William Reynish [Tue, 7 May 2019 19:07:52 +0000 (21:07 +0200)]
UI: Add initial context menu to Sequencer

Add to both Blender and Industry Compat keymap

3 months agoUI: Add copy/paste icons to Graph and Dopesheet editor context menus
William Reynish [Tue, 7 May 2019 18:52:41 +0000 (20:52 +0200)]
UI: Add copy/paste icons to Graph and Dopesheet editor context menus

Consistent with others

3 months agoUI: Add initial context menu to NLA
William Reynish [Tue, 7 May 2019 18:49:53 +0000 (20:49 +0200)]
UI: Add initial context menu to NLA

Adding to both default and Industry Compat keymap

3 months agoSpline IK: support using both original scaling and volume preservation.
Alexander Gavrilov [Tue, 7 May 2019 16:52:10 +0000 (19:52 +0300)]
Spline IK: support using both original scaling and volume preservation.

Add a new option that makes the Spline IK solver apply volume
preservation on top of the original scaling, considering the
pre-IK scale of the bone as the goal volume to be preserved.

This basically works similar to the Stretch To constraint, and
allows easily rigging a stretchy chain that uniformly follows
its parent's scaling.

Since the Stretch To behavior is more familiar, the new option
is on by default for newly created Spline IK constraints.

3 months agoUI: Remove redundant titles in animation filter popover
William Reynish [Tue, 7 May 2019 16:09:15 +0000 (18:09 +0200)]
UI: Remove redundant titles in animation filter popover

It's clear what these do without and takes up much less space

3 months agoImplement Push/Relax from rest pose.
Sebastian Parborg [Tue, 7 May 2019 15:34:28 +0000 (17:34 +0200)]
Implement Push/Relax from rest pose.

Perviously it was only possible to interpolate from the breakdown poses.
Now you can Push/Relax in regard to the rest pose as well.

For this only one keyframe is needed while the old modes needs two.

3 months agoTests: add Cycles image texture colorspace tests
Brecht Van Lommel [Tue, 7 May 2019 14:14:56 +0000 (16:14 +0200)]
Tests: add Cycles image texture colorspace tests

3 months agoFix deadlock in recent Cycles colorspace changes
Brecht Van Lommel [Tue, 7 May 2019 14:51:33 +0000 (16:51 +0200)]
Fix deadlock in recent Cycles colorspace changes

This code is not used yet so didn't affect anyone.

3 months agoFix compilation error
Sergey Sharybin [Tue, 7 May 2019 15:23:50 +0000 (17:23 +0200)]
Fix compilation error

3 months agoFix T64257: Scrubbing in the Clip Editor Graph Editor doesn't work
Sergey Sharybin [Tue, 7 May 2019 15:07:04 +0000 (17:07 +0200)]
Fix T64257: Scrubbing in the Clip Editor Graph Editor doesn't work

While intent of such action is not very clear, there is no real
reason to forbid it.

3 months agoIndustry Compat keymap: Support for dragging markers in marker region
William Reynish [Tue, 7 May 2019 14:16:45 +0000 (16:16 +0200)]
Industry Compat keymap: Support for dragging markers in marker region

Now that there is a dedicated scrubbing area, the markers area can be used again for manipulating markers on drag.

3 months agoKeymap: Use right-click for context menus in the animation editors
William Reynish [Tue, 7 May 2019 14:12:17 +0000 (16:12 +0200)]
Keymap: Use right-click for context menus in the animation editors

  - This only applies to left click select. Right click select and the legacy keymap are unaffected
  - You can still set the playhead from anywhere, using Shift-RMB, just like how you set the cursor in the 3D View

3 months agoUI: Rename "Scrubbing Region" to "Scrubbing/Markers Region".
Pablo Vazquez [Tue, 7 May 2019 14:00:10 +0000 (16:00 +0200)]
UI: Rename "Scrubbing Region" to "Scrubbing/Markers Region".

Share theme setting since they serve similar purposes by sitting on top/bottom
of the animation/vse editors.

Reviewers: billreynish

3 months agoUI: Use scrubbing theme setting for markers background.
Pablo Vazquez [Tue, 7 May 2019 13:56:12 +0000 (15:56 +0200)]
UI: Use scrubbing theme setting for markers background.

The hard-coded transparency of just 16 made it hard to see the markers
when the background was busy with keyframes (or strips in VSE).

The rename of the setting is in the following commit.

Reviewers: billreynish

3 months agoFix Bevel T64107 - width/depth value wrong for vertex only.
Howard Trickey [Tue, 7 May 2019 13:26:53 +0000 (09:26 -0400)]
Fix Bevel T64107 - width/depth value wrong for vertex only.

Code fix from George Vogiatzis (Gvgeo), via D4811.
Needed to initalize vert_axis.

3 months agoUI: Animation editor scrubbing area
Jacques Lucke [Tue, 7 May 2019 13:09:14 +0000 (15:09 +0200)]
UI: Animation editor scrubbing area

The main reason for this change is to allow setting the
active frame with the left mouse button, while still being
able to select e.g. keyframes with the same mouse button.

The solution is to introduce a new scrubbing region with
a specialized keymap. There are a couple of related todos,
that will be handled in separate commits.
Those are listed in D4654.

This solves T63193.

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

Reviewers: brecht, billreynish

3 months agoNormals menu for face strength improved.
Howard Trickey [Tue, 7 May 2019 12:45:01 +0000 (08:45 -0400)]
Normals menu for face strength improved.

Now cascading menus in Mesh > Normals set and select face
strength with explicit choices of Weak / Medium / Strong.

3 months agoDepsgraph: provide more granularity to PoseBone property links.
Alexander Gavrilov [Tue, 7 May 2019 11:51:40 +0000 (14:51 +0300)]
Depsgraph: provide more granularity to PoseBone property links.

Most properties aren't altered by the evaluation of the bone,
and can be read immediately from its input operation. B-Bone
properties can be evaluated at the last possible moment.

This provides more freedom in using drivers to connect bone
properties: for example, it is now possible to read raw local
transform values via drivers from a bone that depends on the
reader bone via constraints.

3 months agoIndustry Compat Keymap: Allow panning and zooming while using the Knife tool
William Reynish [Tue, 7 May 2019 11:51:11 +0000 (13:51 +0200)]
Industry Compat Keymap: Allow panning and zooming while using the Knife tool

Previously you could only orbit.

Apparently the order of the keys in the modal keymap makes a big difference.

Thanks to users Znio.G and Oskar on Devtalk who provided this solution.

3 months agoFix T64223: missing volume panel for Eevee world
Brecht Van Lommel [Tue, 7 May 2019 09:56:55 +0000 (11:56 +0200)]
Fix T64223: missing volume panel for Eevee world

3 months agoSound: Revert all the recent changes to sound
Sergey Sharybin [Tue, 7 May 2019 09:30:00 +0000 (11:30 +0200)]
Sound: Revert all the recent changes to sound

This happened to be a bigger rabbit hole to hell than it originally seemed,
and there are higher priority design tasks to be handled (at this point high
priority design task is more important than high priority bug fix).

After talking to Brecht the decision was made to revert to the known isolated
issue, which will allow everyone in the studio work same as prior to last
Friday.

The remaining bits will be worked on after all the design tasks are out of
the way.

This commit reverts:

4cdb4b9532c Fix T64161: Crashing using undo and multiple windows
064273a4ae7 Sound: Port more cases to be a part of dependency graph
2e582f8ab53 Sound: Fix access wrong dependency graph
5fc49d9c915 Sound: add stubs to build without audaspace
c68c81a870b Sound: Make sure spin lock is initialized for new sound datablocks
c02534469ac Sound: Delay creating sound scene handle for until is needed
9f681bea68f Fix T64144: Crash when displaying audio waveforms in VSE
2f79286453e Cleanup: unused vars
bed8ad6f95a Fix crash in background rendering after recent sound changes
773691310f9 Fix T64143: Crash when scrubbing in the graph editor
888852055c1 Sound: Fix for being unable to jump to a frame during playback with A/V sync
6ab7b384645 Sound: More fixes for access of original scene
35db1195455 Sound: Fix access original scene during playback
211c4fd2e9a Depsgraph: Make comment about evaluation more obvious
c5fe16e121e Sound: Make sound handles only be in evaluated datablocks
b4e1e0946bf Depsgraph: Preserve sound and audio pointers through copy-on-write
4eedf784b04 Depsgraph: Store original sequencer strip pointer
6990ef151c1 Sound: Move evaluation to dependency graph
d02da8de23b Sound: Delay opening handlers for until really needed
3369b828916 Depsgraph: Add scene audio component
e8f10d64757 Depsgraph: Tag sequencer for update on changes
6e4b7a6e4d9 Depsgraph: Initial work to cover sequencer
17447ac5a6b Depsgraph: Make sound ID part of the graph

3 months agoViewport: add better reflection checking matcaps
Brecht Van Lommel [Tue, 7 May 2019 09:24:20 +0000 (11:24 +0200)]
Viewport: add better reflection checking matcaps

Contributed by Manny Hise.

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

3 months agoIndustry Compat keymap: Use Alt-Double-Click to select edge rings
William Reynish [Tue, 7 May 2019 09:32:05 +0000 (11:32 +0200)]
Industry Compat keymap: Use Alt-Double-Click to select edge rings

You can also add Shift or Ctrl to add or subtract to selections

Based on user requests

3 months agoFix T64210: crash using Live Unwrap without UVMap
Philipp Oeser [Tue, 7 May 2019 08:09:22 +0000 (10:09 +0200)]
Fix T64210: crash using Live Unwrap without UVMap

Reviewers: brecht

Maniphest Tasks: T64210

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

3 months agoCleanup: Make comment more readable and avoid wrapping
Sergey Sharybin [Mon, 6 May 2019 16:02:57 +0000 (18:02 +0200)]
Cleanup: Make comment more readable and avoid wrapping

3 months agoCleanup: Simplify access to read-only render settings
Sergey Sharybin [Mon, 6 May 2019 15:59:31 +0000 (17:59 +0200)]
Cleanup: Simplify access to read-only render settings

Will allow to avoid confusion about original/evaluated scene used
to access those in the nearest future.

3 months agoCleanup: Use more const pointers in render pipeline
Sergey Sharybin [Mon, 6 May 2019 15:57:23 +0000 (17:57 +0200)]
Cleanup: Use more const pointers in render pipeline

3 months agoCleanup: Make Render finalization function more generic
Sergey Sharybin [Mon, 6 May 2019 15:47:22 +0000 (17:47 +0200)]
Cleanup: Make Render finalization function more generic

Allows to extend that code more easily.

3 months agoCleanup: Remove remaining parts of frameserver
Sergey Sharybin [Mon, 6 May 2019 15:38:27 +0000 (17:38 +0200)]
Cleanup: Remove remaining parts of frameserver

3 months agoCleanup: More clear naming for rendering functions
Sergey Sharybin [Mon, 6 May 2019 15:36:34 +0000 (17:36 +0200)]
Cleanup: More clear naming for rendering functions

3 months agoFix T57767: Pivot point broken after scaling to 0 in a dimension
Philipp Oeser [Sun, 5 May 2019 14:04:10 +0000 (16:04 +0200)]
Fix T57767: Pivot point broken after scaling to 0 in a dimension

matrix inversion was changed in rB01c75c3765eb from own code to EIGEN
for performance reasons. EIGEN would return a zero matrix on failure
(resulting in the pivot always being at the object origin).
This brings back the "old" matrix inversion code (which has the benifit
of providing a partial solution which makes the local transform center
appear correct)

Reviewers: campbellbarton

Maniphest Tasks: T57767

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

3 months agoRNA: provide access to the vertex index array of the Hook modifier.
Alexander Gavrilov [Sat, 4 May 2019 17:10:43 +0000 (20:10 +0300)]
RNA: provide access to the vertex index array of the Hook modifier.

This allows creating hooks completely without the use of operators.
Also fix subtarget to actually recompute the inverse matrix.

In order to follow the vertex_indices_set function naming convention,
it is necessary to fix makesrna to avoid a naming conflict between
the function wrapper and the property accessor by adding a tag.

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

3 months agoFix T64232: crash on Weight from Bones redo
Philipp Oeser [Tue, 7 May 2019 07:29:31 +0000 (09:29 +0200)]
Fix T64232: crash on Weight from Bones redo

3 months agoFix graph editor selection tolerance ignoring DPI
Campbell Barton [Tue, 7 May 2019 07:30:56 +0000 (17:30 +1000)]
Fix graph editor selection tolerance ignoring DPI

3 months agoDrawManager: External Engines + Overlays
Jeroen Bakker [Fri, 3 May 2019 13:48:21 +0000 (15:48 +0200)]
DrawManager: External Engines + Overlays

Do not iterate over degsgraph when overlays are turned off and
rendering via an external engine. External engines sync data
from Blender differently. The external engine
draws the depth buffer, but that is only needed for overlays.

Reviewers: fclem, brecht

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

3 months agoTheme: set dark grey for line number background
Campbell Barton [Tue, 7 May 2019 07:18:18 +0000 (17:18 +1000)]
Theme: set dark grey for line number background

This color is also used for the right margin,
so use a color that contrasts with the background.

Also use 2x width line.

3 months agoFix T64230: Crash on weight paint gradient redo
Campbell Barton [Tue, 7 May 2019 05:14:30 +0000 (15:14 +1000)]
Fix T64230: Crash on weight paint gradient redo

3 months agoCleanup: improve transform data sorting function
Campbell Barton [Tue, 7 May 2019 03:08:18 +0000 (13:08 +1000)]
Cleanup: improve transform data sorting function

Replace comments on caller with more meaningful name.

3 months agoFix T64130: Bezier curve vanishes on transform
Campbell Barton [Tue, 7 May 2019 02:59:47 +0000 (12:59 +1000)]
Fix T64130: Bezier curve vanishes on transform

3 months agoClanup: clang-format
Campbell Barton [Tue, 7 May 2019 02:34:32 +0000 (12:34 +1000)]
Clanup: clang-format

3 months agoKeymap: double click to close cut
Campbell Barton [Tue, 7 May 2019 00:16:45 +0000 (10:16 +1000)]
Keymap: double click to close cut

Restore from 2.7x (lost when migrating to migrating keymap to Python).

3 months agoCleanup: typo, tweak proportional edit check
Campbell Barton [Tue, 7 May 2019 00:01:25 +0000 (10:01 +1000)]
Cleanup: typo, tweak proportional edit check

3 months agoDRW: Remove is_negative_m4 per draw call
Clément Foucault [Mon, 6 May 2019 15:08:48 +0000 (17:08 +0200)]
DRW: Remove is_negative_m4 per draw call

This had some cost in perf and is not needed most of the time. If the
drawcall really needs it, it should use a correct ob pointer.

3 months agoCleanup: Eevee/Workbench: Remove non-needed matrix inversion
Clément Foucault [Mon, 6 May 2019 15:06:26 +0000 (17:06 +0200)]
Cleanup: Eevee/Workbench: Remove non-needed matrix inversion

Theses are garanteed by the depsgraph now.

3 months agoDRW: Attempt to fix slowdown caused by gizmo drawing
Clément Foucault [Mon, 6 May 2019 10:41:55 +0000 (12:41 +0200)]
DRW: Attempt to fix slowdown caused by gizmo drawing

3 months agoCleanup: GPUMaterial remove unused struct members
Clément Foucault [Sat, 4 May 2019 13:41:14 +0000 (15:41 +0200)]
Cleanup: GPUMaterial remove unused struct members

3 months agoCleanup: Eevee: Remove comment about vcol support in sculpt mode
Clément Foucault [Sat, 4 May 2019 13:23:53 +0000 (15:23 +0200)]
Cleanup: Eevee: Remove comment about vcol support in sculpt mode

3 months agoMaintain Volume: introduce an option switching between modes.
Alexander Gavrilov [Mon, 6 May 2019 18:47:51 +0000 (21:47 +0300)]
Maintain Volume: introduce an option switching between modes.

After a lot of thinking about this, I decided that all operation modes
that I've tried over the past couple of years, including the original
2.79 one, have their uses after all. Thus the only reasonable solution
is to add yet another option.

The modes are:

- Strict: The current 2.80 mode, which overrides the original scaling
  of the non-free axes to strictly preserve the volume. This is the most
  obvious way one would expect a 'Maintain Volume' constraint to work.

- Uniform: The original 2.79 mode, which assumes that all axes have been
  scaled the same as the free one when computing the volume. This seems
  strange, but the net effect is that when simply scaling the object
  uniformly with S, the volume is preserved; however, scaling the non-
  free axes individually allows deviating from the locked volume.
  This was obviously intended as a more or less convenient UI tool.

- Single Axis: My own variant of the intent of the Uniform scale, which
  does volume-preserving if the object is scaled just on the Free axis,
  while passing the non-free axis scaling through. I.e. instead of
  uniform S scaling, the user has to scale the object just on its
  primary axis to achieve constant volume. This can allow reducing the
  number of animation curves when only constant volume scaling is needed,
  or be an easier to control tool inside a complex rig.

3 months agoUI: Offset checkbox in the Outliner filter popover
William Reynish [Mon, 6 May 2019 18:54:35 +0000 (20:54 +0200)]
UI: Offset checkbox in the Outliner filter popover

Aligned with the other checkboxes

3 months agoNode select: refactor, fix some inconsistent behaviors in socket selection.
Bastien Montagne [Mon, 6 May 2019 18:34:01 +0000 (20:34 +0200)]
Node select: refactor, fix some inconsistent behaviors in socket selection.

Refactor a bit node selection code, mostly in the socket selection in
one place 'extend' logic usage was inverted, deselection of other
sockets/nodes was not working properly.

Also now make node active when selecting a socket, this makes more sense
and makes the NODE_OT_link_viewer macro much more useful (this is the
only user of the 'socket select' feature currently, afaics).

3 months agoGPencil: Verify Brush has GPencil data
Antonioya [Mon, 6 May 2019 18:34:24 +0000 (20:34 +0200)]
GPencil: Verify Brush has GPencil data

This avoid errors in old files.

3 months agoTests: add Eevee reference images, and add workbench tests
Brecht Van Lommel [Mon, 6 May 2019 17:46:32 +0000 (19:46 +0200)]
Tests: add Eevee reference images, and add workbench tests

Being able to compare Eevee reference images is useful for refactoring I'm
working on so might as well add them now, even if we can still improve them.

Workbench tests are just rendering the same files as Cycles and Eevee. This
doesn't really tests many workbench settings until we add tests specifically
for them, but does cover how it it handles the different object types.

3 months agoFix: T64213 Properties Editor Icon Colors are wrong for Text and Light Probes
William Reynish [Mon, 6 May 2019 17:44:33 +0000 (19:44 +0200)]
Fix: T64213 Properties Editor Icon Colors are wrong for Text and Light Probes

3 months agoFix T64111: add a NULL check to avoid crash with bad constraint subtarget.
Alexander Gavrilov [Mon, 6 May 2019 17:30:18 +0000 (20:30 +0300)]
Fix T64111: add a NULL check to avoid crash with bad constraint subtarget.

3 months agoFix T63046, T61413: crash reading paint slots from 32 bit .blend on 64 bit
Brecht Van Lommel [Mon, 6 May 2019 16:02:22 +0000 (18:02 +0200)]
Fix T63046, T61413: crash reading paint slots from 32 bit .blend on 64 bit

Thanks to matc for helping to find this, it was writing the paint slots wrong.

3 months agoDrivers: add an Average Scale option to the Transform Channel driver vars.
Alexander Gavrilov [Sun, 5 May 2019 10:25:43 +0000 (13:25 +0300)]
Drivers: add an Average Scale option to the Transform Channel driver vars.

Unlike location and rotation, there is a meaningful definition of
overall/average scaling via the total change in the volume. This
adds an option to retrieve that via a single driver variable,
instead of having to use three and an expression.

Using the determinant to compute the volume scaling also allows
detecting flipping due to negative scale - this is impossible
to do via the three variable approach.

The volume_scale functions are added purely for code readability:
'volume scale factor' is easier to understand than determinant.

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

3 months agoUI: Outliner Filter popover: Remove wrong use of icons
William Reynish [Mon, 6 May 2019 15:33:04 +0000 (17:33 +0200)]
UI: Outliner Filter popover: Remove wrong use of icons

Missed this file from prior commit.

3 months agoUI: Add tooltips to the select tool modes
William Reynish [Mon, 6 May 2019 14:47:13 +0000 (16:47 +0200)]
UI: Add tooltips to the select tool modes

Especially needed now that they are just icons

3 months agoFix T64161: Crashing using undo and multiple windows
Sergey Sharybin [Mon, 6 May 2019 14:38:17 +0000 (16:38 +0200)]
Fix T64161: Crashing using undo and multiple windows

It is possible that dependency graph was not yet initialized,
so need to do NULL pointer check.

3 months agoUI: Use expanded icon row for Select tool modes
William Reynish [Mon, 6 May 2019 13:59:34 +0000 (15:59 +0200)]
UI: Use expanded icon row for Select tool modes

3 months agoIndustry Compat Keymap: Accept Knife tool with double-click
William Reynish [Mon, 6 May 2019 13:03:40 +0000 (15:03 +0200)]
Industry Compat Keymap: Accept Knife tool with double-click

Suggested by users on Devtalk

3 months agoimprove tooltip of ViewLayer.use
Philipp Oeser [Mon, 6 May 2019 12:24:33 +0000 (14:24 +0200)]
improve tooltip of ViewLayer.use

thx @Zoot (Gavin Scott) for spotting and providing better wording

Fixes T64157

3 months agoremove unused T_LOCAL_MATRIX
Philipp Oeser [Mon, 6 May 2019 09:15:30 +0000 (11:15 +0200)]
remove unused T_LOCAL_MATRIX

- was introduced in rB844a17a3d9d2 but apparently never used
- spotted while looking into T57767

Reviewers: brecht

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

3 months agoFix T64164: Resetting a curvemap could result in a mirrored curve
Philipp Oeser [Mon, 6 May 2019 11:03:23 +0000 (13:03 +0200)]
Fix T64164: Resetting a curvemap could result in a mirrored curve

A template_curve_mapping with brush=True was always resetting the curve
to a positive slope (descending from left to right).
Behaviour is now changed so that specifying "use_negative_slope" is
taken into account as well.

Also use this for:
- paint "cavity_curve"
- gpencil "curve_sensitivity" / "curve_strength" / "curve_jitter" /
"interpolation_curve"

Reviewers: brecht

Maniphest Tasks: T64164

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

3 months agoUI: Remove wrong use of icon for Rename Active Item
William Reynish [Mon, 6 May 2019 11:42:06 +0000 (13:42 +0200)]
UI: Remove wrong use of icon for Rename Active Item

3 months agoUI: Outliner Filter popover layout
William Reynish [Mon, 6 May 2019 11:40:51 +0000 (13:40 +0200)]
UI: Outliner Filter popover layout

  - Use checkboxes with aligned text
  - Use icons next to the checkboxes
  - Remove wrong use of icons
  - Better grouping