Commit Graph

100192 Commits

Author SHA1 Message Date
Antonio Vazquez
0bd736e5da GPencil: Small tweak to Fill panel for Holdout
For gradient, put the parameter below both colors.
2020-09-20 15:29:02 +02:00
Antonio Vazquez
31ae1462f2 GPencil: Move Holdout parameter below Base Color
It's better keep this parameter here instead to put it at the end of the panel.
2020-09-20 15:29:02 +02:00
Howard Trickey
e351c96089 Fix a wrong return type (float instead of double) in double2.hh 2020-09-20 08:38:44 -04:00
Campbell Barton
f470a02afa Fix T80982: Crash using custom orientations beside the first
Regression in f7829787da5c64b3fa715a042c2a45ecd4314676
2020-09-20 15:59:22 +10:00
Hans Goudey
84653f015a UI: Gray out fade inactive geometry overlay slider when off
The slider should be inactive when the setting is turned off like
the wireframe slider.
2020-09-19 23:11:58 -05:00
Campbell Barton
56748dbbcd Fix T61985: NLA Bake exception baking pose with non-pose selection 2020-09-20 14:00:14 +10:00
Hans Goudey
7d2a67f258 Cleanup: Fix clang tidy inconsistent parameter warning 2020-09-19 22:38:36 -05:00
Hans Goudey
1d5b191f9f UI: Always set curve fill mode inactive for object bevel type
The bevel type is a more useful check for graying out this property
because its effects will be apparent before choosing an object. Before,
the fill type property would only gray out with a bevel object selected.
2020-09-19 22:13:23 -05:00
Cody Winchester
e0f13f41c6 Fix invert vertex group weight miscalculation for modifiers
Warp & weight vertex-group editing modifiers miscalculated vertex weight
inversion, the weights were multiplied before being subtracted from 1.

Ref D8241
2020-09-20 12:54:38 +10:00
Nathan Craddock
94a63f7505 Fix T80945: Build modifier not updating after outliner copy
Build modifiers linked or copied to objects from the outliner would not
animate until the file was saved and reopened due to a missing depsgraph
relations tag.
2020-09-19 16:33:45 -06:00
Hans Goudey
4115229637 Cleanup: Use shorthand variables
We don't use the other variables in the sorting struct,
so we might as well use the panels directly.
2020-09-19 16:24:10 -05:00
Pablo Dobarro
c9c51c07cf Fix light rotation slider in Lookdev popover being disabled
Light rotation is supported both in world and view light orientation in
lookdev, so no reason to disable it.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D8958
2020-09-19 18:07:49 +02:00
Antonio Vazquez
d989ae84a8 GPencil: Change tooltip for Holdout option 2020-09-19 10:56:36 +02:00
Campbell Barton
14b2a35c8b Cleanup: use parenthesis for if statements in macros 2020-09-19 16:28:17 +10:00
Campbell Barton
17a2820da8 Cleanup: consistent TODO/FIXME formatting for names
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-19 14:34:32 +10:00
Campbell Barton
a78130c610 Cleanup: spelling 2020-09-19 14:26:40 +10:00
Nathan Craddock
8ca698427f Fix T80880: Outliner colored hierarchy lines on objects
Expanded objects with children immediately after a colored collection
would have the color applied to their hierarchy lines as well. The fix
is to reset the collection color to `COLLECTION_COLOR_NONE` for each
open subtree.
2020-09-18 19:32:44 -06:00
Clément Foucault
7b9e47a35e EEVEE: Fix Missing GGX multi-scattering on Glass BSDF
Oversight that should have been in rB6f3c279d9e70
2020-09-19 00:24:43 +02:00
Clément Foucault
6f3c279d9e EEVEE: Add support for GGX Multi-scatter
Based on http://jcgt.org/published/0008/01/03/

This is a simple trick that does *not* have a huge performance impact but
does work pretty well. It just modifies the Fresnel term to account for
the multibounce energy loss (coloration).

However this makes the shader variations count double. To avoid this we
use a uniform and pass the multiscatter use flag inside the sign of f90.
This is a bit hacky but avoids many code duplication.

This uses the simplification proposed by McAuley in
A Journey Through Implementing Multiscattering BRDFs and Area Lights

This does not handle area light differently than the IBL case but that's
already an issue in current implementation.

This is related to T68460.

Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8912
2020-09-19 00:09:51 +02:00
Clément Foucault
aa2e978bd8 Fix T79557 EEVEE: Normalize in vector math node is not null vector safe
This add basic null safe handling for this operation.
2020-09-18 23:42:51 +02:00
Hans Goudey
a0a536bbff Property Search: Don't set expansion for panels in inactive tabs
The search should check if a panel is active before changing its
expansion, otherwise it sets the expansion for all of the region's
panels, even invisible ones in other tabs.
2020-09-18 16:39:43 -05:00
Clément Foucault
ea72c5d69b GPUShader: Fix wide line emulation with flat color interpolation.
This was causing flashing colors in the node editor grid.

This is because in some cases the flat color is only set on the provoking
vertex which is the last of the primitive by default.
2020-09-18 22:41:49 +02:00
Clément Foucault
649b0ccac8 GPUImmediate: Add system wide workaround for wide line
This makes wide line supported on MacOS and other implementation that
does not support wide line by default.

This workaround works for all Line types but only if using one of the 5
default shaders.

The workaround is completely isolated and invisible to the outside. It has
no side effect.

Note: This does not affect the GPUBatch drawing.
2020-09-18 22:41:49 +02:00
Hans Goudey
f17302be6b UI: Remove colons in property names 2020-09-18 15:40:09 -05:00
Ray Molenkamp
104df2453a deps: fix build issue on windows.
Windows does not build libxml2 so the dependency recently
added for mac caused a cmake error.
2020-09-18 13:52:06 -06:00
Hans Goudey
05c57dc563 UI: Use property split in UV editor panels
This is not an exhaustive change, just for the 2D cursor and
UDIM grid properties. Also vertically align the "UV Vertex"
buttons like in the 3D view panels.
2020-09-18 14:37:33 -05:00
Julian Eisel
a13b14b67d Fix misalignment of menu items in Preferences > Save & Load menu
Checking for the layout alignment is not a reliable way to filter out
which items need the additional icon/text offset. Instead check if the
buttons are icon-only (which we rarely do, e.g. for collection colors in
the Outliner context menu).
2020-09-18 20:59:27 +02:00
Julian Eisel
9ce1a04e2a Cleanup: Resolve warnings
Unused variables, missing include for declaration, missing 'static'
specifier. Also rename function to match naming convention.
2020-09-18 20:51:22 +02:00
Julian Eisel
9d528381b5 UI: Support interacting with superimposed icons while editing
For example you can now start entering text in the Properties or
Outliner search, and press the 'x' while the button is still in
text-edit mode.
This way you don't have to exit text editing first, before being able to
quickly clear the string with a mouse click. So this is a small
improvement for convenience.

It also works for the eyedropper (change to picking an object while text
editing) or the '+' and '-' icons in the file saving dialog.
2020-09-18 20:38:45 +02:00
Julian Eisel
aacf8d75f5 UI: Support mouse over highlighting for superimposed icons
E.g. the 'x' icons or eyedropper icons in text buttons. They didn't use
to have any mouse over feedback, now we dim the icon until hovered.
This kind of feedback helps users see that the icons are interactive,
and if they are within their interaction hotspot.
2020-09-18 20:38:45 +02:00
Hans Goudey
a6a0cbcd74 Curves: Allow caps for all geometry types
I think this wasn't allowed before because the section of a curve was
built in multiple parts. But since rBe34d3e32dda7, the whole slice
of a curve is built in one piece, so we can easily support curve
caps for all geometry types, including the new custom profile option.

Note that this also allows "caps" when the fill type is not full.
They could easily be disabled by checking for "Full" fill type
if that was preferred in the future.

See the patch for images.

Differential Revision: https://developer.blender.org/D8911
2020-09-18 13:30:01 -05:00
Pablo Dobarro
5502517c3c Unify all XYZ symmetry options using Mesh Symmetry
This adds XYZ symmetry as a property of meshes and updates all modes to
use the mesh symmetry by default to have a consistent tool behavior
between all modes and when switching objects.

Reviewed By: brecht, mano-wii, campbellbarton

Maniphest Tasks: T79785

Differential Revision: https://developer.blender.org/D8587
2020-09-18 19:58:58 +02:00
Pablo Dobarro
827dfd76dd Object: Switch Object operator
This object operator exits and frees the edit data of the
current object and enters the same mode in another one in a single step,
without going through object mode or keeping multiple edit object data
active. It is assigned to the D key.

This solves all conflicts that the right/click select keymap and the
emulate 3 button mouse produces for this operation and it is independent
of the state of Lock object modes.
Also, as the SculptSession is freed, when using Multires objects go
back to their preview resolution level, so it is possible to work on
high vertex count scenes without slowing down the viewport and other
performance problems.

Reviewed By: #user_interface, pablovazquez

Differential Revision: https://developer.blender.org/D7510
2020-09-18 19:40:40 +02:00
Pablo Dobarro
6c9ec1c893 Sculpt: Render Mask and Face Sets with modifiers active
This removes the limitation of the sculpt overlays not being visible
with modifiers active.

Reviewed By: fclem

Maniphest Tasks: T68900

Differential Revision: https://developer.blender.org/D8673
2020-09-18 19:30:51 +02:00
Pablo Dobarro
ea6cd1c8f0 Overlay: Fade Inactive Geometry
This implements a new overlay that blends the bakground color over the
objects that are not in the same mode as the active object, making
them fade with the background.
This is especially needed for sculpt mode as there is no other overlay
or indication in the viewport to display which object is active.

This is intended to be used with D7510 in order to have a faster
workflow when sculpting models with multiple objects.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D8679
2020-09-18 19:24:58 +02:00
Pablo Dobarro
5855f317a7 LookDev: Lock HDRI rotation to View
This adds an option for the HDRI rotation to follow the view rotation.
When this option is enabled, this allows EEVEE materials to be used as
matcaps for sculpting and painting.

This has an extra performance cost when orbiting around the model as the
lookdev cache needs to be recalculated, but in my test it is barely
noticeable.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D8566
2020-09-18 19:15:15 +02:00
Pablo Dobarro
5d728d38b9 Sculpt: Scale Cloth Filter
This filter scales the mesh as it was a softbody, producing folds in the
surface. The orientation of the folds can be controlled using the filter
axis and orientation.

This is an example of a cloth filter that uses deform coordinates instead
of forces, but probably it does not make much sense to expose it to the
user in a different way and with different parameters. I'll remove
FilterCache->enabled_force_axis in a later commit and use always
enabled_axis in SCULPT_filter_zero_disabled_axis_components
for both forces and deformation filters, so this function can also be used
in the mesh filter.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8661
2020-09-18 19:10:40 +02:00
Pablo Dobarro
8ac1ca13c8 Sculpt: Lower the default cloth deformation constraints strength
The deformation constraints strength were too strong and they were
preventing the cloth effects of the brushes with cloth deformation target
to create folds properly. This lowers the default, making the simulation
follow the deformation in a more relaxed way.

I'll make a separate patch to expose this as a property for certain brushes
and cloth deformers that may need higher values (like boundary with loop
falloff on a low poly mesh), but I think this default will work better for
most use cases.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8884
2020-09-18 19:06:24 +02:00
Clément Foucault
a0f6da0abc Revert "Fix T79523 Paint Cursor: Wide line not supported on OSX"
This commit caused regression on some sculpt paint cursors. A better
approach is being worked on.

This reverts commit 6ade522f277fb74d4691973b7bb55840300043a2.
2020-09-18 19:04:00 +02:00
Antonio Vazquez
0335c1fd21 GPencil: Implement Holdout materials
This new feature allows to use the strokes as an eraser of any stroke below. This is very handy to open holes in filled areas.

After running some tests, we have decided to keep the additive effect of the holdout color. To get clean holdout areas, just move the color to black to remove any additive effect. To have additive effect can be used in situations like tint slightly a transparent window with blue to simulate the glass.

See T79878 for more details

Differential Revision: https://developer.blender.org/D8932
2020-09-18 18:28:17 +02:00
Brecht Van Lommel
7b988188dc Fix T79929: crashes with Cycles denoising on older Macs
This was a bug in OpenImageDenoise, upgrade to latest 1.2.3 which has the fix.
This in turn required a newer ispc version.

Differential Revision: https://developer.blender.org/D8892
2020-09-18 18:11:32 +02:00
Brecht Van Lommel
007e90e8c0 Fix T78793, T79707: Cycles crash on macOS with older CPUs
Embree static libraries need additional linking flags to avoid SSE and
AVX symbols getting mixed up.
2020-09-18 18:10:49 +02:00
Julian Eisel
ff44429421 Fix warning printed when duplicating marker
Steps to reproduce were:
* Create a marker in the timeline
* With the mouse over the marker region, press Shift+D

The function for moving markers was reused and had handling specific to
tweak events. This is not relevant in case of duplicating markers.
2020-09-18 18:05:32 +02:00
Julian Eisel
ce558a46c1 UI: Correct superimposed icon interaction hotspot
The hotspot was slighly too large, which could be apparent in cases
where there are multiple superimposed icons.
2020-09-18 18:05:32 +02:00
Jeroen Bakker
0cac3c79cc Fix T80927: UV Edges Not Visible When Repeat Image Active
When repeat image was active the image was drawn in the foreground
making most uv overlays not visible. This change creates a shared
defined value for repeating and not repeating images.
2020-09-18 18:00:12 +02:00
Hans Goudey
6303cb7bd0 Fix 80909: Switching to profile bevel can explode Curve geometry
We need to make sure the CurveProfile is initialized with the proper
number of segments when switching to profile bevel mode.
2020-09-18 09:32:09 -05:00
Ankit Meel
402a4cadba CMake/LLVM: Add INCLUDE_DIRS to find package.
Ref {D8855}

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8919
2020-09-18 19:14:01 +05:30
Ankit Meel
b746179d0a CMake/OpenSubdiv: Rename INCLUDE_DIR -> INCLUDE_DIRS.
Ref {D8855}

Unix and Apple platform files use find_package(OpenSubdiv) which sets
`OPENSUBDIV_INCLUDE_DIR` as an advanced variable, as well as
`OPENSUBDIV_INCLUDE_DIRS` which should be used usually.
Windows sets `OPENSUBDIV_INCLUDE_DIR` which is used by the rest
of the code.

This patch renames it to `_DIRS` everywhere, for it to be like other
similar variables.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8917
2020-09-18 19:12:26 +05:30
Philipp Oeser
df126861b2 Fix T80900: Crash lasso-selecting in particle editmode in certain
situations

In the situation that the PTCacheEdit is not available (e.g. when
editing unbaked Cloth or Softbody caches - or, as in the report, being
in Cloth or Softbody Editing Type for Hair particles), accesing the
corresponding ParticleSystem or ParticleSystemModifierData would crash.

Now access these later (after PE_start_edit had the chance to return
early on this non-valid situation).

Reviewers: JacquesLucke

Maniphest Tasks: T80900

Differential Revision: https://developer.blender.org/D8941
2020-09-18 14:24:22 +02:00
Philipp Oeser
a5dccd3320 Fix T80905: GPencil: bones cannot be selected using Ctrl + LMB (with Left Selection Preference)
Was missing a dedicated entry for LMB select, this is to be consistent
with how it is done for meshes.

Maniphest Tasks: T80905

Differential Revision: https://developer.blender.org/D8935
2020-09-18 14:15:43 +02:00