9 months agoCleanup/MSVC: Enable C++ conformance mode on compiler versions that support it.
Ray Molenkamp [Fri, 14 Feb 2020 00:13:07 +0000 (17:13 -0700)]
Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support it.

MSVC has a conformance mode (/permissive-) where the C++ standard is more strictly
enforced. This mode is available on MSVC 15.5+ [1]

This patch enables this mode on compilers that support it and cleans up the few violations it threw up in the process.

- Mantaflow was using M_PI without requesting them using the _USE_MATH_DEFINES define to opt in to non default behaviour.
- Collada did not include the right header for std::cerr, this seemingly was fixed for other platforms already but put inside a platform guard.
- Ghost had some scoping issues regarding uninitialized variables and goto behaviour

Second landing of this patch, earlier commit was reverted due to some compiler configurations having slipped though testing


Differential Revision:

Reviewed By: brecht

9 months agoFreestyle: Add option for rendering Freestyle to a separate pass
Lukas Stockner [Thu, 13 Feb 2020 00:29:30 +0000 (01:29 +0100)]
Freestyle: Add option for rendering Freestyle to a separate pass

This allows for more flexibility in Compositing compared to the
hardcoded alpha-over that is currently used.

Reviewed By: brecht

Differential Revision:

9 months agoDRW: Fix color management in material/rendered mode
Clément Foucault [Thu, 13 Feb 2020 17:12:28 +0000 (18:12 +0100)]
DRW: Fix color management in material/rendered mode

We only do exposure/gamma if not using scene lighting

9 months agoAdd initial, very basic save/open & library linking blendfile tests.
Bastien Montagne [Thu, 13 Feb 2020 16:48:00 +0000 (17:48 +0100)]
Add initial, very basic save/open & library linking blendfile tests.

Do not do much for now, but would have been enough to catch the crash
introduced the other day in linking code...

9 months agoPy API: Add `orphans_purge` helper to ``.
Bastien Montagne [Thu, 13 Feb 2020 16:46:57 +0000 (17:46 +0100)]
Py API: Add `orphans_purge` helper to ``.

Much more convinient than trying to use outliner operator...

9 months agoFix for fix (c) assert from own recent commit.
Bastien Montagne [Thu, 13 Feb 2020 15:54:44 +0000 (16:54 +0100)]
Fix for fix (c) assert from own recent commit.

This master_collection thing is really, really annoyingly spreading all
over the place...

9 months agoCleanup: add clarifying comment to ViewLayer->layer_collections
Jacques Lucke [Thu, 13 Feb 2020 15:33:39 +0000 (16:33 +0100)]
Cleanup: add clarifying comment to ViewLayer->layer_collections

9 months agoFix (unreported) private/embedded IDs being added to `` dict.
Bastien Montagne [Thu, 13 Feb 2020 15:23:23 +0000 (16:23 +0100)]
Fix (unreported) private/embedded IDs being added to `` dict.

We do not want those here.

9 months agoFix (unreported) fully broken `` helper.
Bastien Montagne [Thu, 13 Feb 2020 15:14:45 +0000 (16:14 +0100)]
Fix (unreported) fully broken `` helper.

The introduction of python instancing for ID data in 2.80 completely
broke the 'smart & efficient' hack of using a same py object as key for
initial quick check, since rebuilding the RNAPointer in the
BPy_StructRNA would actually affect the py instance of the first ID used
to generate that py object...

TL;DR: No need for this complex and unclear optimization anymore, since
we do not actually rebuild a whole py object anymore every time we call
`pyrna_id_CreatePyObject()` from a same ID pointer.

9 months agolibquery: Add 'owner id' to callback data.
Bastien Montagne [Thu, 13 Feb 2020 14:13:19 +0000 (15:13 +0100)]
libquery: Add 'owner id' to callback data.

In some cases it's important to always have a proper ID as reference,
e.g. whene generating data supposed to represent main data-base...

9 months agoCleanup old special cases from some libquery callbacks.
Bastien Montagne [Thu, 13 Feb 2020 13:26:27 +0000 (14:26 +0100)]
Cleanup old special cases from some libquery callbacks.

We now have proper flagging for horrible loopback pointers...

9 months agoRefactor libquery ID looper callback to take a single parameter.
Bastien Montagne [Thu, 13 Feb 2020 11:56:10 +0000 (12:56 +0100)]
Refactor libquery ID looper callback to take a single parameter.

Using a struct here allows to change given parameters to the callbacks
without having to edit all callbacks functions, which is always noisy
and time consuming.

9 months agoFix OptiX denoising when multiple CUDA streams are active
Patrick Mours [Thu, 13 Feb 2020 14:15:38 +0000 (15:15 +0100)]
Fix OptiX denoising when multiple CUDA streams are active

9 months agoCleanup: Remove some unnecessary OptiX device code
Patrick Mours [Thu, 13 Feb 2020 13:25:00 +0000 (14:25 +0100)]
Cleanup: Remove some unnecessary OptiX device code

9 months agoCloth: Optimization in self collision
mano-wii [Thu, 13 Feb 2020 13:39:21 +0000 (10:39 -0300)]
Cloth: Optimization in self collision

15% to 20% improvement in cloth simulation performance with

The idea is to reduce the number of collisions computed by avoiding
overlapping tris with the same combination (eg. (1,0) and (0,1)).

Reviewed By: zeddb

Differential Revision:

9 months agoRevert "Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support...
Ray Molenkamp [Thu, 13 Feb 2020 14:04:30 +0000 (07:04 -0700)]
Revert "Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support it."

It is breaking compilation on some configurations, revert for now while
i see what is wrong.

This reverts commit 9fe469c110940af5d2525158305d5d365bd15276.

9 months agoFix T67649: clarify description of node update method
Brecht Van Lommel [Thu, 13 Feb 2020 10:02:12 +0000 (11:02 +0100)]
Fix T67649: clarify description of node update method

9 months agoFix T71112: UILayout.activate_init when used in popups that refresh
Campbell Barton [Thu, 13 Feb 2020 06:03:55 +0000 (17:03 +1100)]
Fix T71112: UILayout.activate_init when used in popups that refresh

9 months agoFix crash using 'activate_init' in popup menus
Campbell Barton [Thu, 13 Feb 2020 05:18:11 +0000 (16:18 +1100)]
Fix crash using 'activate_init' in popup menus

Reported in T71112

9 months agoFix crash using '--debug-handlers' command line argument
Campbell Barton [Thu, 13 Feb 2020 04:17:48 +0000 (15:17 +1100)]
Fix crash using '--debug-handlers' command line argument

9 months agoCleanup: pass const variables
Campbell Barton [Thu, 13 Feb 2020 03:01:52 +0000 (14:01 +1100)]
Cleanup: pass const variables

9 months agoFix T73727: Invalid event.type for Gizmo.modal callback
Campbell Barton [Thu, 13 Feb 2020 02:52:35 +0000 (13:52 +1100)]
Fix T73727: Invalid event.type for Gizmo.modal callback

9 months agoWorkbench: Fix depth of field background being glitchy
Clément Foucault [Thu, 13 Feb 2020 00:54:59 +0000 (01:54 +0100)]
Workbench: Fix depth of field background being glitchy

9 months agoRevert "VSE: Add option to select handles with box selection"
Campbell Barton [Thu, 13 Feb 2020 00:28:28 +0000 (11:28 +1100)]
Revert "VSE: Add option to select handles with box selection"

This partially reverts commit 5314161491d41461fe09c4774229481dde93e250.

Conflicts with Emulate "Middle Mouse Button".
This feature should be accessible under all supported configurations.

9 months agoWorkbench: Fix premultiply alpha issue in transparent material
Clément Foucault [Thu, 13 Feb 2020 00:24:40 +0000 (01:24 +0100)]
Workbench: Fix premultiply alpha issue in transparent material

9 months agoOverlay: Fix non meshes object disappearing if smooth wire is not enabled
Clément Foucault [Thu, 13 Feb 2020 00:07:15 +0000 (01:07 +0100)]
Overlay: Fix non meshes object disappearing if smooth wire is not enabled

9 months agoCleanup/MSVC: Enable C++ conformance mode on compiler versions that support it.
Ray Molenkamp [Wed, 12 Feb 2020 19:49:34 +0000 (12:49 -0700)]
Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support it.

MSVC has a conformance mode (/permissive-) where the C++ standard is more strictly
enforced. This mode is available on MSVC 15.5+ [1]

This patch enables this mode on compilers that support it and cleans up the few violations it threw up in the process.

- Mantaflow was using M_PI without requesting them using the _USE_MATH_DEFINES define to opt in to non default behaviour.
- Collada did not include the right header for std::cerr, this seemingly was fixed for other platforms already but put inside a platform guard.
- Ghost had some scoping issues regarding uninitialized variables and goto behaviour


Differential Revision:

Reviewed By: brecht

9 months agoremove "Select Linked" from the particle select and context menu
Philipp Oeser [Wed, 12 Feb 2020 15:47:19 +0000 (16:47 +0100)]
remove "Select Linked" from the particle select and context menu

The operator in its current state is based on mouse position and doesnt
make sense to be called from a menu.
(In fact it should be called 'select_linked_pick' internally and a
separate 'select_linked' should be implemented similar to how "Select
Linked" works for meshes, curves etc -- see D6823 for this)

Differential Revision:

9 months agoParticles: remove unused sel_col and nosel_col from
Philipp Oeser [Wed, 12 Feb 2020 18:17:19 +0000 (19:17 +0100)]
Particles: remove unused sel_col and nosel_col from
CacheEditrPathsIterData and PTCacheEdit

Followup to 80cecee5b7c8.

ref D6725

9 months agoFix T68788: Particle Edit Mode Hair vertex doesn't follow vertex theme
Philipp Oeser [Fri, 31 Jan 2020 12:02:20 +0000 (13:02 +0100)]
Fix T68788: Particle Edit Mode Hair vertex doesn't follow vertex theme

Selection and grooming only ever happens on hair keys (vertices), so
makes sense to use that theme color.

Sidenote: `CacheEditrPathsIterData` and `PTCacheEdit` have `sel_col` and
`nosel_col`, these can go, will do in a separate commit.

Maniphest Tasks: T68788

Differential Revision:

9 months agoCodesign: Attempt to make macOS codesign more reliable
Sergey Sharybin [Wed, 12 Feb 2020 17:57:07 +0000 (18:57 +0100)]
Codesign: Attempt to make macOS codesign more reliable

Is still sometimes .ready file appears prior to an actual archive.

9 months agoFix T59271: Curves with Extrude still show curve
Philipp Oeser [Fri, 31 Jan 2020 14:33:13 +0000 (15:33 +0100)]
Fix T59271: Curves with Extrude still show curve

Compared to 2.79, this also has the benefit of actually showing the curve
again if you set both bevel start and end to 0.0 for example.

Maniphest Tasks: T59271

Differential Revision:

9 months agoGPencil: Disable multisampling as it is not supported anymore
Clément Foucault [Wed, 12 Feb 2020 17:43:10 +0000 (18:43 +0100)]
GPencil: Disable multisampling as it is not supported anymore

Another AA method is comming in the GPencil refactor.

9 months agoGPencil: Fix colormanagement broken by recent refactor
Clément Foucault [Wed, 12 Feb 2020 17:21:53 +0000 (18:21 +0100)]
GPencil: Fix colormanagement broken by recent refactor

This is a quick fix that should work until the GPencil refactor lands.

9 months agoFix T69697: Remove not working "Inherit Scale" option from menu
Jacques Lucke [Wed, 12 Feb 2020 16:01:41 +0000 (17:01 +0100)]
Fix T69697: Remove not working "Inherit Scale" option from menu

The option can still be modified in the bone settings in the properties
editor. In the future a correct menu entry (using an enum) can be
added back. For that, an operator like `wm.context_collection_boolean_set`
could be added for enums.

9 months agoDRW: Fix debug drawcalls and annotation drawing
Clément Foucault [Wed, 12 Feb 2020 15:52:45 +0000 (16:52 +0100)]
DRW: Fix debug drawcalls and annotation drawing

9 months agoFix NLM denoiser no longer working with OptiX after recent commit
Patrick Mours [Wed, 12 Feb 2020 14:36:12 +0000 (15:36 +0100)]
Fix NLM denoiser no longer working with OptiX after recent commit

9 months agoHarmless Fix for recent cleanup.
Bastien Montagne [Wed, 12 Feb 2020 13:34:46 +0000 (14:34 +0100)]
Harmless Fix for recent cleanup.

For some reason that file did not get included in the commit...

9 months agoFix Cycles compiler warnings after recent commit
Brecht Van Lommel [Wed, 12 Feb 2020 13:28:29 +0000 (14:28 +0100)]
Fix Cycles compiler warnings after recent commit

9 months agoFix Cycles build errors and clang-format after recent commit
Brecht Van Lommel [Wed, 12 Feb 2020 13:05:00 +0000 (14:05 +0100)]
Fix Cycles build errors and clang-format after recent commit

9 months agoCleanup: Move common CUDA/OptiX Cycles device code into separate file
Patrick Mours [Tue, 11 Feb 2020 17:54:50 +0000 (18:54 +0100)]
Cleanup: Move common CUDA/OptiX Cycles device code into separate file

This reduces code duplication between the CUDA and OptiX device implementations: The CUDA device
class is now split into declaration and definition (similar to the OpenCL device) and the OptiX device
class implements that and only overrides the functions it actually has to change, while using the CUDA
implementation for everything else.

Reviewed By: brecht

Differential Revision:

9 months agoModifiers: Vertex Weight Modifiers add invert vgroup option
Cody Winchester [Wed, 12 Feb 2020 11:38:43 +0000 (12:38 +0100)]
Modifiers: Vertex Weight Modifiers add invert vgroup option

Adds the invert vgroup mask option to the Vertex Weight modifiers.

These 3 modifiers share the same functions so they needed to be modified at the same time. They are all setup the same with the invert vgroup option being added. I had to add a flag to the Mix modifier but the others I use the existing flags.

Differential Revision:

9 months agoModifiers: Weld Modifier - simplify invert_vgroup code
mano-wii [Wed, 12 Feb 2020 11:35:27 +0000 (08:35 -0300)]
Modifiers: Weld Modifier - simplify invert_vgroup code

No functional change

9 months agoWeight Paint: add a pie menu for locking and unlocking vertex groups.
Alexander Gavrilov [Mon, 23 Dec 2019 09:46:05 +0000 (12:46 +0300)]
Weight Paint: add a pie menu for locking and unlocking vertex groups.

Provide different options for locking and unlocking vertex groups
using bone selection, accessible via a pie menu triggered via the
'K' hotkey. To implement a variety of operations, extend the old
operator with a new option to mask it by bone selection. If the
X Mirror option is enabled, selection is automatically mirrored.

This follows D6533 as the next step in improving accessibility of
vertex group locking during weight painting.

Differential Revision:

9 months agoModifiers: Weld Modifier add invert vgroup option
Cody Winchester [Wed, 12 Feb 2020 10:04:20 +0000 (11:04 +0100)]
Modifiers: Weld Modifier add invert vgroup option

Adds the invert vgroup option to the weld modifier.

Differential Revision:

9 months agoCleanup: clang-format.
Bastien Montagne [Wed, 12 Feb 2020 09:45:21 +0000 (10:45 +0100)]
Cleanup: clang-format.

9 months agoModifiers: Hook Modifier add invert vgroup option
Cody Winchester [Wed, 12 Feb 2020 09:34:35 +0000 (10:34 +0100)]
Modifiers: Hook Modifier add invert vgroup option

Adds the invert group optin to the hook modifier.

Differential Revision:

9 months agoModifiers: Fix bug where UVWarp Modifier would try to get bone matrix from a non...
Cody Winchester [Wed, 12 Feb 2020 09:18:52 +0000 (10:18 +0100)]
Modifiers: Fix bug where UVWarp Modifier would try to get bone matrix from a non armature object

There is a bug where the UVWarp modifier will stop working if an armature bone is set as the Bone To target and then later changed to a non armature object without clearing the Bone To string property. The modifier will still think it is needing a bone matrix and not properly use the object matrix.

A simple fix by adding a check for the object being an armature as well as the bonename string being set.

Reviewed By: mont29

Differential Revision:

9 months agoFix T73446: WorkSpace ID properties not saved
Campbell Barton [Wed, 12 Feb 2020 07:19:14 +0000 (18:19 +1100)]
Fix T73446: WorkSpace ID properties not saved

9 months agoCleanup: clang-format
Campbell Barton [Wed, 12 Feb 2020 07:18:31 +0000 (18:18 +1100)]
Cleanup: clang-format

9 months agoCleanup: Fix build warnings from OSL shader compilation
Ray Molenkamp [Wed, 12 Feb 2020 04:40:23 +0000 (21:40 -0700)]
Cleanup: Fix build warnings from OSL shader compilation

There were to copies of stdosl.h one from stock OSL
and one in the cycles tree augmented with cycles
specific closures.

moved the cycles ones to stdcycles.h and copied
the stock stdosl.h and accompanying headers from
the OSL shader folder.

for further details see D6812.

Reviewed By: brecht

Differential Revision:

9 months agoFix T73740: Auto-key "Only Available" de-selects f-curves
Campbell Barton [Wed, 12 Feb 2020 03:20:03 +0000 (14:20 +1100)]
Fix T73740: Auto-key "Only Available" de-selects f-curves

This was especially bad with "Only Selected Curve Keyframes",
effectively making f-curves un-editable on each insertion.

9 months agoCleanup: warning
Campbell Barton [Wed, 12 Feb 2020 01:08:14 +0000 (12:08 +1100)]
Cleanup: warning

9 months agoFluid: Naming and UI visibility fixes for some parameters
Sebastián Barschkis [Tue, 11 Feb 2020 23:45:01 +0000 (00:45 +0100)]
Fluid: Naming and UI visibility fixes for some parameters

Cleaned up some inconsistencies in the UI, i.e. corrected name for velocity factor and fixed UI visibility for fractional obstacle parameter.

9 months agoSculpt: Split normal radius and area radius
Pablo Dobarro [Mon, 16 Dec 2019 22:16:21 +0000 (23:16 +0100)]
Sculpt: Split normal radius and area radius

This enables an extra layer of control in the sculpt brushes.
For now it is enabled only in Scrape, but it should work in all brushes (like normal radius). In the future it may also be enabled in other brushes.
You can tweak in this property in the scrape brush to achieve a much better behavior when working on curve surfaces and control how much volume you want to trim. In most cases, it also fixes the bug where the brush keeps trimming in the same area without disabling accumulate.
It should be possible to fix some other artifacts in other brushes by tweaking this default property.

Reviewed By: jbakker

Differential Revision:

9 months agoSculpt: Clay Strips Tip Roundness property
Pablo Dobarro [Tue, 11 Feb 2020 19:04:41 +0000 (20:04 +0100)]
Sculpt: Clay Strips Tip Roundness property

This patch allow to change the brush tip shape between a square and a
circle using a brush property.

After this change we are no longer testing the distance against a cube
(the Z axis is not used). I did not test this in depth, but if it does
not produce any artifacts I think we can keep it this way instead of
adding more complexity to the code.

In this new distance test the brush falloff is only applied on the
rounded parts of the square to avoid sharp artifacts in the
diagonals. Because of this, the round version is much softer than
the square one. The planned hardness property will fix this, but
this can also be avoided by setting the fallof to a custom curve.

Reviewed By: jbakker

Differential Revision:

9 months agoPose Brush: Option to disable the IK anchor point
Pablo Dobarro [Tue, 11 Feb 2020 18:43:36 +0000 (19:43 +0100)]
Pose Brush: Option to disable the IK anchor point

The IK chain was using an anchor point by default as it makes sense for
posing, but for creating curved shapes it is useful to be able to
disable it.

Reviewed By: jbakker

Differential Revision:

9 months agoSculpt: Clay Thumb Brush
Pablo Dobarro [Wed, 22 Jan 2020 01:23:51 +0000 (02:23 +0100)]
Sculpt: Clay Thumb Brush

This brush simulates deforming clay with your fingers, accumulating
material during the stroke. It has a plane that tilts during the stroke
in the front part of the brush to achieve this effect.

Reviewed By: jbakker

Differential Revision:

9 months agoFix T73442 Overlay: Wireframe infront buggy in material shading mode
Clément Foucault [Tue, 11 Feb 2020 17:37:21 +0000 (18:37 +0100)]
Fix T73442 Overlay: Wireframe infront buggy in material shading mode

This was caused by the refactor. The wireframe was drawn with the incorrect
depth buffer.

Should be included in 2.82

9 months agoCycles: Add support for denoising in the viewport
Patrick Mours [Tue, 11 Feb 2020 15:30:01 +0000 (16:30 +0100)]
Cycles: Add support for denoising in the viewport

The OptiX denoiser can be a great help when rendering in the viewport, since it is really fast
and needs few samples to produce convincing results. This patch therefore adds support for
using any Cycles denoiser in the viewport also (but only the OptiX one is selectable because
the NLM one is too slow to be usable currently). It also adds support for denoising on a
different device than rendering (so one can e.g. render with the CPU but denoise with OptiX).

Reviewed By: #cycles, brecht

Differential Revision:

9 months agoFix T73656: Use BKE_brush_alpha_get in texture paint
Pablo Dobarro [Tue, 11 Feb 2020 16:28:46 +0000 (17:28 +0100)]
Fix T73656: Use BKE_brush_alpha_get in texture paint

The code was using brush->alpha directly, so the alpha value from
UnifiedPaintSettings was not used when eneabled.

Reviewed By: brecht

Maniphest Tasks: T73656

Differential Revision:

9 months agoFix T70039, T68707: issues when opening .blend file from Finder on macOS
Yevgeny Makarov [Tue, 11 Feb 2020 16:40:43 +0000 (17:40 +0100)]
Fix T70039, T68707: issues when opening .blend file from Finder on macOS

* Missing close dialog displayed to warn about unsaved changes.
* No reaction when the file was opened on a different desktop.

Differential Revision:

9 months agoNodes: Add dynamic label support for Math Nodes
Charlie Jolly [Tue, 11 Feb 2020 15:31:40 +0000 (15:31 +0000)]
Nodes: Add dynamic label support for Math Nodes

Reviewed By: brecht

Differential Revision:

9 months agoCleanup: Sculpt/Paint, use correct types and iterator variable declaration
Pablo Dobarro [Sat, 8 Feb 2020 19:04:42 +0000 (20:04 +0100)]
Cleanup: Sculpt/Paint, use correct types and iterator variable declaration

Reviewed By: brecht

Differential Revision:

9 months agoCleanup: Sculpt, Comment formatting
Pablo Dobarro [Sat, 8 Feb 2020 22:59:22 +0000 (23:59 +0100)]
Cleanup: Sculpt, Comment formatting

Reviewed By: brecht

Differential Revision:

9 months agoFix T73706: Crash after disabling dyntopo with multires modifier
Pablo Dobarro [Mon, 10 Feb 2020 17:41:03 +0000 (18:41 +0100)]
Fix T73706: Crash after disabling dyntopo with multires modifier

ss->multires is set in sculpt_update_object, which is not called just
after disabling dyntopo, so it needs to be checked before running

Reviewed By: campbellbarton, brecht

Maniphest Tasks: T73706

Differential Revision:

9 months agoMerge branch 'blender-v2.82-release'
mano-wii [Tue, 11 Feb 2020 14:46:04 +0000 (11:46 -0300)]
Merge branch 'blender-v2.82-release'

9 months agoFix Attempt to free NULL pointer
mano-wii [Tue, 11 Feb 2020 14:45:07 +0000 (11:45 -0300)]
Fix Attempt to free NULL pointer

Assert when snapping `Selection to ...` but without objects.
Missed in the last commit.

9 months agoNode Editor: node resize can now be cancelled, like other operators
Matthias Ellerbeck [Tue, 11 Feb 2020 14:29:24 +0000 (15:29 +0100)]
Node Editor: node resize can now be cancelled, like other operators

Differential Revision:

9 months agoUI: improve graph editor channels drawing
Alessio Monti di Sopra [Tue, 11 Feb 2020 14:08:58 +0000 (15:08 +0100)]
UI: improve graph editor channels drawing

The channel color squares are no longer positioned under the visibility
icon, since contrast is poor. Instead they are thinner and drawn on the
left side, before the visibility icon. If the curve is hidden, the color
gets less opaque.

Differential Revision:

9 months agoFix T64024: monitor/fullscreen switching on macOS shows red line artifacts
Yevgeny Makarov [Tue, 11 Feb 2020 14:06:48 +0000 (15:06 +0100)]
Fix T64024: monitor/fullscreen switching on macOS shows red line artifacts

9 months agoFix Attempt to free NULL pointer
mano-wii [Tue, 11 Feb 2020 14:25:36 +0000 (11:25 -0300)]
Fix Attempt to free NULL pointer

Assert when snapping `Selection to ...` but without objects.

9 months agoDRW: Color Management improvement
Clément Foucault [Tue, 11 Feb 2020 14:18:55 +0000 (15:18 +0100)]
DRW: Color Management improvement

Reviewed By: brecht sergey jbakker

Differential Revision:

9 months correct clang/llvm download URLs
Philipp Oeser [Tue, 11 Feb 2020 13:56:25 +0000 (14:56 +0100)] correct clang/llvm download URLs

9 months agoFix: Build error on windows
Ray Molenkamp [Tue, 11 Feb 2020 13:51:18 +0000 (06:51 -0700)]
Fix: Build error on windows

USD "library" directory was not set, leading to an error
during the INSTALL phase.

9 months agoMerge branch 'blender-v2.82-release'
Sergey Sharybin [Tue, 11 Feb 2020 13:14:12 +0000 (14:14 +0100)]
Merge branch 'blender-v2.82-release'

9 months agoFix T73675: Leaving exit mode tags all objects for update
Sergey Sharybin [Tue, 11 Feb 2020 09:12:43 +0000 (10:12 +0100)]
Fix T73675: Leaving exit mode tags all objects for update

This is an oversight of a fix for T69834, where I didn't realize the
ED_object_editmode_exit_ex() function is called for all objects as an
opposite of only the ones which were in edit mode.

Seems a simple fix: just move tag into a check that object was in the
edit mode prior to tag.

Differential Revision:

9 months agoMerge branch 'blender-v2.82-release'
Campbell Barton [Tue, 11 Feb 2020 11:15:05 +0000 (22:15 +1100)]
Merge branch 'blender-v2.82-release'

9 months agoFix memory leak with 2D image painting
Campbell Barton [Tue, 11 Feb 2020 11:11:51 +0000 (22:11 +1100)]
Fix memory leak with 2D image painting

Regression from c30d6571bb477

9 months agoDocumentation: add note on altering data from frame change handlers
Sybren A. Stüvel [Tue, 11 Feb 2020 09:52:37 +0000 (10:52 +0100)]
Documentation: add note on altering data from frame change handlers

Blender can crash while rendering, when scene data is changed from within
a `frame_change_pre` or `frame_change_post` callback function. This results
in bug reports like T60094, T67627, and T73530. Until this is properly
resolved, this limitation should be documented.

No functional changes.

9 months agoFix T68243: Python sqlite module not working on macOS
Brecht Van Lommel [Tue, 11 Feb 2020 09:15:31 +0000 (10:15 +0100)]
Fix T68243: Python sqlite module not working on macOS

9 months agoCLeanup: clang-format
Campbell Barton [Tue, 11 Feb 2020 07:45:08 +0000 (18:45 +1100)]
CLeanup: clang-format

9 months agoCleanup: minor edit to last commit
Campbell Barton [Tue, 11 Feb 2020 07:23:52 +0000 (18:23 +1100)]
Cleanup: minor edit to last commit

Avoid repeating the fallback return.

9 months agoFix T73348: Surface Deform distortion on bind with small faces
Campbell Barton [Tue, 11 Feb 2020 07:19:34 +0000 (18:19 +1100)]
Fix T73348: Surface Deform distortion on bind with small faces

Thanks to @CodyWinch for finding the root cause

9 months agoMerge branch 'blender-v2.82-release'
Campbell Barton [Tue, 11 Feb 2020 06:20:31 +0000 (17:20 +1100)]
Merge branch 'blender-v2.82-release'

9 months agoFix T73682: Sampling color fails for float images
Campbell Barton [Tue, 11 Feb 2020 06:13:33 +0000 (17:13 +1100)]
Fix T73682: Sampling color fails for float images

9 months agoFix T73695: line highlight jitters with smooth scroll
Kai Jægersen [Tue, 11 Feb 2020 05:27:51 +0000 (16:27 +1100)]
Fix T73695: line highlight jitters with smooth scroll

9 months agoUI: Use popup dialog for make single user from operator search
Campbell Barton [Tue, 11 Feb 2020 03:01:01 +0000 (14:01 +1100)]
UI: Use popup dialog for make single user from operator search

Use a popup since the default action was to do nothing,
the user would always need to access the redo panel.

Resolves T73711.

9 months agoFix T56108: Crash editing corrupted vertex groups
Campbell Barton [Tue, 11 Feb 2020 01:35:10 +0000 (12:35 +1100)]
Fix T56108: Crash editing corrupted vertex groups

While the file in this report had corrupted values,
this is avoidable without adding any extra overhead.

Use unsigned vertex group indices since we don't need negative values,
this is an alternative to checking they aren't negative in many places.

Vertex group values over INT_MAX is still considered invalid,
so any accidental unsigned wrapping won't be silently ignored.

9 months agoCleanup: remove duplicate, commented structs
Campbell Barton [Tue, 11 Feb 2020 01:22:16 +0000 (12:22 +1100)]
Cleanup: remove duplicate, commented structs

9 months agoCleanup: extra semicolons, comma use, undeclared vars
Campbell Barton [Tue, 11 Feb 2020 01:01:29 +0000 (12:01 +1100)]
Cleanup: extra semicolons, comma use, undeclared vars

9 months agoCleanup: unused headers
Campbell Barton [Tue, 11 Feb 2020 00:51:12 +0000 (11:51 +1100)]
Cleanup: unused headers

9 months agoCleanup: add license header, use header guards
Campbell Barton [Tue, 11 Feb 2020 00:37:35 +0000 (11:37 +1100)]
Cleanup: add license header, use header guards

9 months agoDoc: update to T73699 fix
Campbell Barton [Tue, 11 Feb 2020 00:29:19 +0000 (11:29 +1100)]
Doc: update to T73699 fix

It's important to refer to "other selected objects" in this case.

9 months agoDoc: simplify T72883 fix
Campbell Barton [Tue, 11 Feb 2020 00:27:01 +0000 (11:27 +1100)]
Doc: simplify T72883 fix

Code example made it seem setting the active object was more complex
than a single assignment.

9 months agoRNA: Raise error assigning an active object which doesn't exist
Campbell Barton [Mon, 10 Feb 2020 10:58:52 +0000 (21:58 +1100)]
RNA: Raise error assigning an active object which doesn't exist

Previously this silently cleared the view layers active object.

9 months agoFix T72883: Correct Context Usage
Aaron Carlisle [Mon, 10 Feb 2020 19:08:34 +0000 (14:08 -0500)]
Fix T72883: Correct Context Usage

9 months agoFix T73699: Unhelpful error message when trying to knife project a manifold object
Aaron Carlisle [Mon, 10 Feb 2020 18:38:16 +0000 (13:38 -0500)]
Fix T73699: Unhelpful error message when trying to knife project a manifold object

9 months agoRevert "Sculpt: Remove partial viewport updates from sculpt stroke code"
Pablo Dobarro [Tue, 28 Jan 2020 00:22:30 +0000 (01:22 +0100)]
Revert "Sculpt: Remove partial viewport updates from sculpt stroke code"

This reverts commit 394b48029c5335381f774f83524ad6ee5cb986da.

Leaving this here does not affect performance in any significant way and it may be useful in the future.

Reviewed By: brecht

Differential Revision:

9 months agoFix T72690: Do not draw points behind the viewport camera in the paint cursor
Pablo Dobarro [Thu, 23 Jan 2020 20:41:30 +0000 (21:41 +0100)]
Fix T72690: Do not draw points behind the viewport camera in the paint cursor

In some situations the symmetry point may be behind the camera, so the
projection is inverted and it looks wrong. This avoids drawing points in
screen space when they are behind the camera.

Reviewed By: jbakker

Maniphest Tasks: T72690

Differential Revision: