Commit Graph

99603 Commits

Author SHA1 Message Date
Bastien Montagne df8a63bb9c Fix T80078: Overrides: Crash with animated IK control on linked armature.
Issue was with our dear posebones again... when applying overrides we
keep the same address/pointer for the IDs themselves, (which avoids us
the need to remap their usages), but their inner data is often
re-allocated.

Therefore, we need once again to go over armature objects and invalidate
their posebone pointers.

This should also be back-ported to Blender LTS 2.83.

Maniphest Tasks: T80078

Differential Revision: https://developer.blender.org/D8734
2020-08-28 14:53:22 +02:00
Jeroen Bakker 0852ecd844 DrawEngine: Shader Test Suite
A test case that compiles all the GLSL shaders for workbench, gpencil, overlay and some
of eevee. Compilation is still platform dependent, but when run on a test-farm
with different hardware we will be able to detect GLSL compilation
errors early on.

The test will be compiled when `WITH_GTEST` and `WITH_OPENGL_DRAW_TESTS`
are On.

For eevee only the shaders inside eevee_shaders.c are included. EEVEE has some shaders
located inside the submodule. They aren't accessible to the outside and aren't added
to the test case. We should see how we want to add them. For the test cases it is better
to move them to eevee_shaders.c, but for eevee perspective it is better to keep them in
the submodule. Keeping them in the submodule could lead to situations that is harder to test.
as the shader could already have been initialized.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8667
2020-08-28 14:47:27 +02:00
Jeroen Bakker 2654e9c9c1 Fix T80141: Fix Compiling Workbench Volume Shaders (Mesa 20.0.8)
Default mesa driver for ubuntu 20.04 fails when a name is defined twice.
M_PI is defined in both `common_workbench_lib` and `common_math_lib`. This patch
remove the define out of common_workbench_lib

For reference it fails on https://github.com/mesa3d/mesa/blob/mesa-20.0.8/src/compiler/glsl/glcpp/glcpp-parse.y#L1186
during the check if the macros are the same.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8741
2020-08-28 14:41:41 +02:00
Jeroen Bakker 922aac999d Fix T79920: Fix Compiling EEVEE Volume Shaders
There were some missing UBO bindings, what asserted in debug mode.
This patch fixes this by binding the missing UBO's

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8742
2020-08-28 14:40:06 +02:00
Jeroen Bakker 3198fec1fe Fix T80160: Workbench shadows are broken
In recent refactoring {a9f2ebb21508} an issue was introduced that the
opengl rasterizer would be disabled when only writing to a stencil
buffer.

This fix adds stencil writing to the write mask and set it. This makes
the write map not evaluate to GPU_WRITE_NONE and the rasterizer will be
enabled in `GLStateManager::set_write_mask`.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8743
2020-08-28 14:38:33 +02:00
Philipp Oeser df8e2c76c9 Merge branch 'blender-v2.90-release' 2020-08-28 14:35:04 +02:00
Jeroen Bakker c284326809 GPU: Fix Segmentation Fault Freeing Failed Shader
The CPP Shader class does not initialize the interface attribute.
What will crash when deleting the shader.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8740
2020-08-28 14:32:29 +02:00
Jacques Lucke a48d78ce07 Refactor: move CustomData .blend I/O to blenkernel
This is part of T76372.
2020-08-28 14:30:45 +02:00
Jacques Lucke 3dc222ea7b Refactor: move defvert .blend IO to blenkernel
This is part of T76372.
2020-08-28 14:30:45 +02:00
Philipp Oeser 65dcf812a5 Fix T80182: Curve [Edit Mode] : Can't Deselect Control Point with Select Box
Caused by rB49f59092e7c8: Curves: Implement Handles for selected points
only

Changes from deselecting all were not considered as changes anymore.

Maniphest Tasks: T80182

Differential Revision: https://developer.blender.org/D8744
2020-08-28 14:28:57 +02:00
Philipp Oeser 2bb60db94a Merge branch 'blender-v2.90-release' 2020-08-28 14:00:51 +02:00
Jacques Lucke 0e021414fe Cleanup: improve function names
With this change, the three .blend read operations: data reading, lib reading
and expanding are more grouped together.
2020-08-28 13:18:24 +02:00
Jacques Lucke a443287908 IDTypeInfo: add .blend file io callbacks
This is part of T76372.
It adds the `blend_write`, `blend_read_data`, `blend_read_lib`
and `blend_read_expand` which correspond to the various
steps when reading and writing .blend files.
Having these callbacks allows us to decentralize the blenloader
code a lot more. This has the affect that code related to any
specific ID type is less scattered.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D8670
2020-08-28 13:05:48 +02:00
Brecht Van Lommel d3f2037966 Fix T80149: Cycles OpenCL baking broken after changes to uses tiles for baking
We forgot to update this code as part of D3108. I'd like to include this in 2.90,
it's entirely broken now so can't really get any worse.

Differential Revision: https://developer.blender.org/D8738
2020-08-28 12:53:50 +02:00
Bastien Montagne 346023b457 Cleanup 'make vertex parent' operator code.
More localized variables, avoid ugly 'offset by one' index usage in
favor of explicit `INDEX_UNSET` define, etc.

No behavior change expected from this commit.
2020-08-28 11:08:03 +02:00
Campbell Barton 94d6b54826 Merge branch 'blender-v2.90-release' into master 2020-08-28 14:37:05 +10:00
Campbell Barton 1725e46cee Fix T80135: Duplicate doesn't preserve active spline
Checks to preserve the active spline on duplication
required an active vertex too.

Now having no active vertex doesn't prevent duplicate
from keeping the spline active.

Reviewed by: @mano-wii

Ref D8729
2020-08-28 14:35:30 +10:00
Campbell Barton bc2830a3ce Cleanup: use doxy sections in interface_panels.c 2020-08-28 14:25:23 +10:00
Campbell Barton 84ae44138d Cleanup: spelling 2020-08-28 14:25:19 +10:00
Nathan Craddock 5ee60c9815 Fix (unreported): Walk expansion on scene collection
Left walk navigation while the scene collection is active would collapse
the subtree which shouldn't be allowed. This adds another check to
`outliner_item_openclose` to prevent collapsing the scene collection.

Introduced in rBb077de086e14.
2020-08-27 18:49:47 -06:00
Nathan Craddock e726ed3c6b Fix: Outliner walk navigation in Data API mode
Because the subtrees in Data API mode are empty for performance reasons,
it was impossible to move through the tree with walk navigation. This
adds an exception to allow walk navigation to expand subtrees in that
mode.
2020-08-27 18:25:51 -06:00
Philipp Oeser 2a0e996d77 Fix T80159: Custom Normals Averaging crash after clearing
custom split normals data

Clearing custom split normals would get rid of the CD_CUSTOMLOOPNORMAL
layer - but editing data `lnor_spacearr` would be kept.

Adding a CD_CUSTOMLOOPNORMAL layer (if none exists yet) should be done
in `edbm_average_normals_exec` / `BKE_editmesh_lnorspace_update` /
`BM_lnorspace_update` / `BM_lnorspacearr_store`. The thing is that if
the editing data `lnor_spacearr` would still be valid after `Clear
Custom Split Normals Data`, blender would happily call
`BM_lnorspace_rebuild` instead. Doing that without a CD_CUSTOMLOOPNORMAL
layer is asking for trouble.

Now clear lnor_spacearr on `Clear Custom Split Normals Data` as well.

Thx @mont29 for feedback here.

Maniphest Tasks: T80159

Differential Revision: https://developer.blender.org/D8730
2020-08-27 22:12:12 +02:00
Hans Goudey 770cc66f75 UI: Avoid redundant loops in region panel handler
Currently the panel handler loops through every block and every button
for every single panel. This commit moves that check to happen a single
time at the beginning.
2020-08-27 14:36:01 -05:00
Hans Goudey a8766de5d5 Fix T68317: Panel "A" key doesn't collapse subpanels properly
We need to only collapse or expand the first panel under the cursor
rather than all of them. Note that whether the parent panel or
the subpanel is first depends on the order of the uiBlocks in the
region's list.
2020-08-27 14:22:28 -05:00
Hans Goudey 714dbf273c Clang Tidy: Fix warning
Fix readability-static-definition-in-anonymous-namespace in new code
2020-08-27 14:18:06 -05:00
Hans Goudey f1565e7f73 UI: Cleanup / refactor region panel event handling
The code for handling panel events was much more complicated than it
needed to be. This commit removes some unecessary function calls and
variables, reduces indentation levels by returning early, and does
some other general cleanup.
2020-08-27 14:02:14 -05:00
Antonio Vazquez 0649ed7fa2 GPencil: Don't convert color to sRGB
The color is linear, so the conversion is breaking the real color.
2020-08-27 20:13:51 +02:00
Brecht Van Lommel e74a24f0bb Fix T77382: zooming into adjust last operation panel clips contents
This panel should not have zoom functionality at all, just like headers and
many other regions don't have it either.
2020-08-27 19:52:56 +02:00
Hans Goudey 9d6789115a Cleanup: Move panel category drawing to proper section
Somehow the panel category drawing functions ended up in the middle
of the region event handling code. This commit moves them to their
own section next to the rest of the drawing code.
2020-08-27 12:33:27 -05:00
Ray Molenkamp eed8ea1b73 Cleanup: Fix white space in versions.cmake 2020-08-27 11:03:31 -06:00
Julian Eisel 9b0ef34534 Fix Outliner allowing to enter Pose Mode on linked armature
If a different object was active, clicking on a linked armature's pose
in the Outliner would enter Pose Mode for it.
This would actually cause a failed assert, but in release builds the
armature would just enter pose mode.

Steps to reproduce were:
* Link in armature object
* Activate a different object
* In the Outliner, un-collapse the armature object
* Activate Pose Mode by clicking on its pose there
2020-08-27 16:40:56 +02:00
Ray Molenkamp 8a984ddd0f Cleanup: Fix build warning on windows
MSBuild on windows currently spews a warning about
buildinfo.h_fake not being generated.

For build info we use a non existing file to trigger a
custom_command on every build, which has worked well for
years now, however in recent versions of MSBuild it has
started issuing warnings about files that should be
generated but are not.

CMake is actually aware of this being a problem and states
in the documentation that "If the output of the custom command
is not actually created as a file on disk it should be marked
with the SYMBOLIC source file property."

This change fixes the build warning by properly marking the
buildinfo.h_fake as symbolic resolving the warning.
2020-08-27 08:10:37 -06:00
Sergey Sharybin e51c721315 Fix crash of alembic tests after recent depsgraph builder change
Need to make sure node factories are initialized prior to the dependency
graph allocation.

The regression was initially introduced in 5b021dff41

Thanks Brecht for testing!
2020-08-27 14:52:58 +02:00
Sebastian Parborg 1131328aeb Fix: Mantaflow always builds openvdb statically
This would lead to problems when we build a dynamic openvdb library.
2020-08-27 14:49:34 +02:00
Sebastian Parborg 91aeb452ab Fix: FindEmbree.cmake looking for non existing dynamic libraries and failing
It is now possible to build against a shared embree library.
Before it was only possible to build against static Embree libraries.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D8702
2020-08-27 11:55:40 +02:00
Campbell Barton 54b47da565 Cleanup: clang-format 2020-08-27 15:33:33 +10:00
Ray Molenkamp 8b82693898 MSVC: Set proper flags for C++17 support.
MSVC already builds with the /std:c++17 flag but for
'reasons' [1] MSVC still gives the wrong value for the
__cplusplus define.

This change sets an additional cxx flag on supported
compilers to allow the compiler properly identify
C++17 support.

This resolves 2 warnings coming out of bullet about
the register keyword being deprecated.

[1] https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
2020-08-26 22:25:40 -06:00
Ray Molenkamp bbf00a6231 Cleanup: Fix build warning with MSVC and OSL
OSL requires RTTI to be off, this is done with the /GR- flag for
MSVC, however /GR is in the default CXX flags leading to warning

D9025 : overriding '/GR' with '/GR-'

which cannot be suppressed.

/GR is on by default and this flag is not required, so removing
it from the default CXX flags makes it possible later use /GR-
without generating warnings.
2020-08-26 22:20:34 -06:00
Nathan Craddock 7f3febf4c0 Fix (unreported): Outliner Data API tree subtree expansion
The changes in rB70151e41dc02 broke subtree expansion in the Data API
display mode because the closed subtrees are empty lists. Move the empty
subtree check from `outliner_item_openclose` to the walk navigation
code to prevent the issue.
2020-08-26 21:29:45 -06:00
Ray Molenkamp 489b5790cf Cleanup: Fix build warning with MSVC
`IDTypeForeachCacheFunctionCallback` lists the `flags` parameter
as `uint`, having these functions use `eIDTypeInfoCacheCallbackFlags`
results in the following warning when building with MSVC:

warning C4028: formal parameter 4 different from declaration

This change resolves this warning by changing the parameter to
the appropriate type.
2020-08-26 19:14:17 -06:00
Ray Molenkamp 6438fc4f79 Cleanup: Fix MSVC warning in mantaflow
This resolves the following MSVC warning:

warning C4805: '&=': unsafe mix of type 'int' and type 'bool' in operation
2020-08-26 19:07:24 -06:00
Red Mser 479ce00809 UI: Use alternating row theme color in file browser
The outliner already uses the alternating row theme color as an
overlay for every other row. This uses the same color for the file
browser, instead of a hardcoded shading.

The file browser background color is slightly tweaked to match the
outliner, and the Blender Light theme is updated to use a lighter
background color like the outliner.

Reviewed by: Hans Goudey, Julian Eisel

Differential Revision: https://developer.blender.org/D8717
2020-08-26 16:53:58 -05:00
Jacques Lucke 8a9912eaf8 Tests: fail automated tests on memory leaks and other internal errors
This adds a new `--debug-exit-on-error` flag. When it is set, Blender
will abort with a non-zero exit code when there are internal errors.
Currently, "internal errors" includes memory leaks detected by
guardedalloc and error/fatal log entries in clog.

The new flag is passed to Blender in various places where automated
tests are run. Furthermore, the `--debug-memory` flag is used in tests,
because that makes the verbose output more useful, when dealing
with memory leaks.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D8665
2020-08-26 22:02:02 +02:00
bastien d8cf6ee316 install_deps: add fontconfig to installed libs/tools. 2020-08-26 20:44:53 +02:00
Ray Molenkamp f807b27b67 Cleanup: Fix const warning with BLI_array_free
when you call the BLI_array_free macro with a const pointer you get a
warning when the macro calls `MEM_freeN` (warning C4090: 'function':
different 'const' qualifiers)

This was warning originating from
`smart_uv_project_calculate_project_normals` in `uvedit_unwrap_ops.c`

Normally we resolve these with a non const cast at the callsite
but given BLI_array_free is a macro not a function this is not
an option here and it has to be resolved in the macro.
2020-08-26 11:42:40 -06:00
Brecht Van Lommel 0498feb0df Fix T80129: Cycles shadow catcher viewport error with exposure other than 1 2020-08-26 19:26:38 +02:00
Brecht Van Lommel bd678918ae Fix T80080: improve tooltip for render number of threads
Since the switch to TBB, the threads value specificies the maximum number of
CPU cores used while rendering, it is not longer possible to use more threads
than cores. Change the tooltip to make this more clear.
2020-08-26 19:26:38 +02:00
Brecht Van Lommel f699ba3d30 Cleanup: better naming and no bad level access in BLI_winstuff 2020-08-26 19:26:38 +02:00
Nathan Craddock 9de18c361b Outliner: Use `shift` for restrict button child toggle
The `ctrl` key was mapped to recursive bone selectable and visibility
toggling. This changes the key to `shift` to be consistent with objects
and collections. Also adds an explanation to the tooltip.

Part of T77408

Differential Revision: https://developer.blender.org/D8650
2020-08-26 11:19:19 -06:00
Nathan Craddock 70151e41dc Outliner: Left and right walk navigation
Previously the left and right arrow keys would close and open the active
tree element, but a subsequent key press would not select up or
down the tree as is common in tree-based interfaces.

Walking left and right now does a selection action after opening or closing
the active tree item. For example, a right key press on a closed element
will open it's subtree, and an additional right key press will select
the first child element.

A left key press anywhere in a subtree will first close the active
element if it's subtree is expanded. Walking left again will select the
parent element.

Part of T77408

Differential Revision: https://developer.blender.org/D8650
2020-08-26 10:58:23 -06:00