1
1

Compare commits

...

1371 Commits

Author SHA1 Message Date
40f92e161a Quiet a warning in non-debug build. 2020-08-28 10:44:09 -04:00
b8cc4b9392 Merge branch 'master' into newboolean 2020-08-28 10:27:21 -04:00
8556a10bd9 Moved orientation etc tests into BLI_math_boolean.hh.
These tests are only used by the delaunay, mesh_intersect,
and mesh_boolean files. At the suggestion of Brecht, moving
them into BLI_math_boolean.hh and math_boolean.cc.
2020-08-28 10:21:59 -04:00
7b2fe4c9ec Refactor: move Lattice .blend I/O to IDTypeInfo callbacks 2020-08-28 16:10:17 +02:00
8815996418 Refactor: move Mesh .blend I/O to IDTypeInfo callbacks
I'm also adding `BKE_id_blend_write`, so that it can be accessed
outside of `readfile.c`.
2020-08-28 15:49:14 +02:00
5db5ac611a 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 15:45:07 +02:00
b8f990b0b4 Revert "GPU: Fix Segmentation Fault Freeing Failed Shader"
This reverts commit c284326809.
2020-08-28 15:43:14 +02:00
0ed7aedc71 Fix building without bullet support
The new BKE_rigidbody_is_affected_by_simulation function was in side the
WITH_BULLET ifdef guard.
2020-08-28 15:28:15 +02:00
b4a608c11c Merge branch 'blender-v2.90-release' into master 2020-08-28 15:09:42 +02:00
4fdd8452a6 DNA: add pragma once to dna_type_offsets.h
Sometimes, this generated file is included more than once,
so it should have an include guard.
2020-08-28 15:05:47 +02:00
8726354d46 Fix Rigidbody depsgraph passive and constraint transform relations.
We need to have transforms from passive objects if they are animated or
driven by parent relations. This is not immediately obvious as the
object transform matrix will still be available, it is just one frame
behind in some cases.

Fixed dependency cycles if there is a constraint between two rigid
bodies. Because bullet keeps track of its simulated bodies, we do not
need to supply objects transforms as bullet should already have them.

I need combine these two fixes because otherwise we will get depsgraph
warnings that nodes are missing that it expects to be there.

Reviewed By: Sergey, Jacques

Differential Revision: http://developer.blender.org/D8732
2020-08-28 14:55:59 +02:00
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
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
a48d78ce07 Refactor: move CustomData .blend I/O to blenkernel
This is part of T76372.
2020-08-28 14:30:45 +02:00
3dc222ea7b Refactor: move defvert .blend IO to blenkernel
This is part of T76372.
2020-08-28 14:30:45 +02:00
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
2bb60db94a Merge branch 'blender-v2.90-release' 2020-08-28 14:00:51 +02:00
123955377c Merge branch 'master' into newboolean 2020-08-28 07:43:07 -04:00
baf9ee73d3 Use blo_do_versions_290 to set Fast solver for pre-2.91 files. 2020-08-28 07:18:46 -04:00
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
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
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
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
94d6b54826 Merge branch 'blender-v2.90-release' into master 2020-08-28 14:37:05 +10:00
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
bc2830a3ce Cleanup: use doxy sections in interface_panels.c 2020-08-28 14:25:23 +10:00
84ae44138d Cleanup: spelling 2020-08-28 14:25:19 +10:00
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
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
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
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
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
714dbf273c Clang Tidy: Fix warning
Fix readability-static-definition-in-anonymous-namespace in new code
2020-08-27 14:18:06 -05:00
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
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
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
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
eed8ea1b73 Cleanup: Fix white space in versions.cmake 2020-08-27 11:03:31 -06:00
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
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
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
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
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
665ffa5dca Cleanup: more spelling corrections 2020-08-27 18:53:02 +10:00
cc0a0d3291 Expand on solver descriptions 2020-08-27 18:37:59 +10:00
e0cb025870 Cleanup: mostly comments, use doxy syntax & typos
- Use doxy syntax for functions.
- Use `pragma once` for header guard.
2020-08-27 18:18:47 +10:00
94884777b2 Merge branch 'master' into newboolean 2020-08-27 15:49:22 +10:00
54b47da565 Cleanup: clang-format 2020-08-27 15:33:33 +10:00
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
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
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
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
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
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
d8cf6ee316 install_deps: add fontconfig to installed libs/tools. 2020-08-26 20:44:53 +02:00
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
0498feb0df Fix T80129: Cycles shadow catcher viewport error with exposure other than 1 2020-08-26 19:26:38 +02:00
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
f699ba3d30 Cleanup: better naming and no bad level access in BLI_winstuff 2020-08-26 19:26:38 +02:00
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
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
b028a43245 Cleanup:Remove C++14 flags from extern/quadriflow
The main CMakeLists.txt specifies C++17, quadriflow tries to add C++14
flags leading to the following warnings when building with MSVC

Command line warning D9025 : overriding '/std:c++17' with '/std:c++14`

This change removes the C++14 flags, and fixes a build error caused
by the removal of `std::unary_function` in C++17 in the .obj loader
(which isn't used by blender)

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D8720
2020-08-26 10:04:24 -06:00
3185e17844 Logging: change error to warning
This is in preparation for https://developer.blender.org/D8665.
2020-08-26 17:48:20 +02:00
14608c5e86 Cleanup: Fix MSVC warning regarding flags in bullet
For bullet we compile at /W0 for MSVC but we did not
remove the standard /W3 flag. Leading to the following
warning:

Command line warning D9025 : overriding '/W3' with '/W0'

This change removes the W3 flag for bullet to get rid
of the warning.
2020-08-26 09:16:21 -06:00
Yevgeny Makarov
2ef5fabec9 Fix T77900: File Browser in macOS fullscreen crashes
When Blender is started in fullscreen mode from the command line,
or if the fullscreen state is saved in the startup file, all temporary windows
will also open in fullscreen mode. When closing the fullscreen File Browser,
Blender would either crash or parent window becomes black.

This does not happen if the Blender switches to full screen manually.

`NSWindowCollectionBehaviorFullScreenPrimary` should be set for windows that
can enter full-screen mode. Otherwise macOS will turn the wrong window into
full-screen.

Similar fix: rB4b39de677d20

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

Reviewed by: Julian Eisel
2020-08-26 16:27:05 +02:00
239b0ba750 Clenaup: Refactor Sculpt gesture mask operators
This refactors Box Mask and Lasso mask making both functions share the
same code. After this change it should be easier to add new
functionality, new gesture tools or implement new gesture modes.

No functional changes.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8707
2020-08-26 15:44:54 +02:00
08ec9b71df Merge branch 'blender-v2.90-release' into master 2020-08-26 23:28:44 +10:00
e0772c6607 Fix T80098: Mesh deform doesn't update in edit mode
Use BKE_mesh_wrapper API access to access mesh coordinates
for modifier evaluation.

Call BKE_mesh_wrapper_ensure_mdata when binding
since it's a one off operation.

Regression from deaff945d0.

Reviewed by: @brecht

Ref D8709
2020-08-26 23:20:37 +10:00
826bd46e66 GPencil: Hide Boundary strokes in Render
This change hides the boundary strokes used for closing filled areas in render mode (viewport and final render).

Related to T80128
2020-08-26 15:05:54 +02:00
d4f7c7f4cc GPencil: Fix Assert using fill tool
With the new changes in the Draw Manager, GPU_depth_mask must be set to ON, before clear depth.
2020-08-26 13:32:57 +02:00
0659560a10 Merge branch 'master' into newboolean 2020-08-26 07:21:08 -04:00
a7e1963b63 Cleanup: remove G.debug_value check for old mesh-deform behavior
Added in 2007, it doesn't seem useful to support alternate behavior.
2020-08-26 21:04:00 +10:00
7773663eb7 Cleanup: remove unused UvVertMap.flag 2020-08-26 21:01:28 +10:00
77242de80e Refactor to defer building Plane for Faces until later.
This is a precursor to a big speed optimization in the "finding clusters"
code. Right now there is no speedup, maybe even a bit of a slowdown,
but following commits should lead to nice speed increases.
2020-08-26 06:59:58 -04:00
70d48255ae Fix T79992: Error calling context.copy() in Properties Editor
This was an oversight in rB83e3d25bcae3.

Basically we still have the "hair" and "point_cloud" entries for the
context. However they were ifdef'ed.

Note this would mostly happen in 2.90 since we always build without hair
and particles there.

Differential Revision: https://developer.blender.org/D8712
2020-08-26 11:34:12 +02:00
e414afbaf6 Cleanup: typos 2020-08-26 11:24:10 +02:00
c44251c7d7 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-26 11:18:41 +02:00
Evan Wilson
8ddf8cfa6f Fix #ifdef WITH_PARTICLE_NODES and WITH_HAIR_NODES mixup in rna_internal.h
Differential Revision: https://developer.blender.org/D8711
2020-08-26 11:16:48 +02:00
0e50b6529c BLI: support removing multiple elements from a vector 2020-08-26 10:52:43 +02:00
6a10e69d27 UV: match 3D mesh editing behavior for edge-loop select
- Cycling between part of the boundary & the entire UV boundary.
- Include pole vertices in the selection.

Edge loop selection was rewritten to use BMesh connectivity data.
2020-08-26 18:39:25 +10:00
8f545375f9 Cleanup: simplify edge loop/boundary select cycling logic 2020-08-26 16:56:24 +10:00
7fb11f22a2 Docs: comments for interface_handlers.c
Explain why some features have defines,
also use doxy sections for defines & prototypes.
2020-08-26 10:31:50 +10:00
add48c0074 Cleanup: use const variables in interface code 2020-08-26 10:31:44 +10:00
88ada5e218 Cleanup: add SEQ_ALL_BEGIN, SEQ_CURRENT_BEGIN to .clang-format
These were missed in 70500121b4 which caused reformatting.
2020-08-26 09:59:15 +10:00
be4abb42c1 Cleanup: spelling 2020-08-26 09:41:30 +10:00
bbb6ec9e51 Cleanup: build without USE_KEYNAV_LIMIT defined 2020-08-26 09:41:09 +10:00
396d39c6b9 Cleanup: Declare variables where they are initialized
Further changes to interface_handlers.c to avoid a block of variable
declarations at the beginning of functions. Also use const in some
situations. I only made changes where the variable's intended scope
was obvious.
2020-08-25 14:28:04 -05:00
Valentin
6e06936c0e Cleanup in interface_handlers.c
- Reduce variables scope
 - Use some const prefixes
 - Initialize variables at declaration
 - Use comparison to boolean false instead of 0

Differential Revision: https://developer.blender.org/D8678
2020-08-25 13:15:57 -05:00
72bcb900d0 install_deps: also clear BLOSC cmake variables.
Otherwise when switching from self-built to distro packages for OpenVDB,
Blosc CMake cached variables break building...
2020-08-25 19:54:22 +02:00
999667a8c5 Fix T79494 Refrence Image reflects object after source got deleted
Silly typo was causing the error texture to not be bound.
2020-08-25 19:25:39 +02:00
97f75ca87f GPUState: Move state limits getter to the area they belong
This fix a GL_INVALID_VALUE error on startup due to 0.0f max line width.

Also moves the max anisotropy filter to the sampler creation.

This reduces code fragmentation.
2020-08-25 18:18:55 +02:00
2c34e09b08 Outliner: Include gpencil modifiers and effects in the tree
Grease pencil modifiers already had defined outliner icons, but had
never been included in the tree. This adds the modifiers and the shader
effects to the tree.

Part of T68498
2020-08-25 10:04:15 -06:00
21cb6f09ff Fix T77298: Cycles multiple object making not working with multiple samples
The previous fix loaded the pixels so existing tiles were not overwritten.
However the Cycles render buffer is expected to be scaled by the number of
sample, which was not taken into account.

This is not ideal in that previews could have a mismatched number of samples
between multiple objects, though the result will be correct. The better solution
would be to bake all objects together per tile, rather than one after the other.
But that is a bigger change than we can do in 2.90.

Differential Revision: https://developer.blender.org/D8704
2020-08-25 18:00:35 +02:00
949d92ad5d Fix T79811 MacOS: Edit Mode - vertex/edge/face selection is missing
The VAO reconfiguration from the offset workaround was not working.
2020-08-25 17:42:07 +02:00
b2b4f9fc9b Fix buildbot failing due to non-existent git submodule hash
The wrong hash was committed in 95cc709612, presumably due to local changes
to the submodule repository.
2020-08-25 16:13:58 +02:00
c336947dbb Merge branch 'blender-v2.90-release' into master 2020-08-25 23:56:34 +10:00
33ac3582bb Fix T77359: Crash adding UV's in edit-mode with linked duplicates
This prevents UV layer mix up in
MeshBatchCache.cd_used/cd_needed/cd_used_over_time which depends on the
extraction method.

One object's mesh can be accessed with MR_EXTRACT_MESH, another object
that uses the same mesh can use MR_EXTRACT_BMESH based on
(Object.mode & OB_MODE_EDIT), this causes a problem as the edit-mesh
and the mesh aren't always in sync, the custom data layers wont
necessarily match up, causing T77359.

Reviewed by @jbakker, @brecht

Ref D8645
2020-08-25 23:54:26 +10:00
9dd4d87f18 GPU: Fix compilation issue caused by rBb43f4fda19b9 2020-08-25 15:16:06 +02:00
b43f4fda19 GL: Add error checking function
This is to ease the debugging process on Apple GL implementation.
2020-08-25 15:02:34 +02:00
e51c428be6 GPUSelect: Avoid assert caused by clearing without a depth mask
This should not cause any problem since the depth test is required
in order to draw to the depth buffer and this is not altered by
this change.

To be on the safe side, we still restor the mask after altering it.
2020-08-25 15:02:34 +02:00
5f86a10477 Fix T80012: Bevel Shader node Samples value has too low hardcoded limit
Up the hard limit, keep the UI range max at 16

Maniphest Tasks: T80012

Differential Revision: https://developer.blender.org/D8701
2020-08-25 12:34:10 +02:00
8657c6cb71 Merge branch 'blender-v2.90-release' 2020-08-25 12:17:49 +02:00
Red Mser
3ea324488a Fix T80016: Shape key animation is linked when duplicating object
Fix T80016

Caused by a typo in rB7b1c406b5431ce65d84ddb5f2c53977c25c18373

Reviewed By: mont29, dfelinto

Maniphest Tasks: T80016

Differential Revision: https://developer.blender.org/D8693
2020-08-25 12:11:59 +02:00
ac8825621f Merge branch 'blender-v2.90-release' 2020-08-25 11:56:27 +02:00
263cf2ea94 Enabled workaround to solve threading issues in draw manager
This workaround addresses T79533 and T79038 for Blender 2.90. The
solution isn't clear and needs more research and work. In order to
continue with blender 2.90 release it was proposed to add this work
around.

It has been tested with the test files provided in the reports.

Reviewed By: Dalai Felinto, Clément Foucault

Differential Revision: https://developer.blender.org/D8695
2020-08-25 11:48:48 +02:00
024a9d17d2 Revert "Enabled workaround to solve threading issues in draw manager"
This reverts commit 141a8ff6b3.
2020-08-25 11:29:20 +02:00
8bb93ca80a Fix T79915: crash when changing to white noise texture
Reviewers: brecht, OmarSquircleArt

Differential Revision: https://developer.blender.org/D8697
2020-08-25 11:23:35 +02:00
Jeroen Bakker
141a8ff6b3 Enabled workaround to solve threading issues in draw manager
This workaround addresses T79533 and T79038 for Blender 2.90. The
solution isn't clear and needs more research and work. In order to
continue with blender 2.90 release it was proposed to add this work
around.

It has been tested with the test files provided in the reports.

Reviewed By: Dalai Felinto, Clément Foucault

Differential Revision: https://developer.blender.org/D8695
2020-08-25 08:18:25 +02:00
189ba40e9b Cleanup: use doxy sections 2020-08-25 15:10:36 +10:00
5eb7aa5ebb Fix T80077: Objects disappear when joining with a zero scaled axis
Use invert_m4_m4_safe_ortho when joining objects so zero scaled axis
doesn't cause all points to be scaled to zero.

Instead geometry is left un-scaled on degenerate axes.

Report a warning in this case since users may want to adjust the
active objects scale.
2020-08-25 14:32:10 +10:00
96401e2ef8 BLI_math_matrix: add invert_m4_m4_safe_ortho (m3 version too)
Unlike invert_m4_m4_safe, this calculates zeroed axes.
Useful when we need to use the inverse of an objects matrix,
keeping the valid axis, only filling in the zeroed ones.
2020-08-25 12:57:56 +10:00
46eca3366e Sculpt: Cloth Snake Hook Brush
This implements Snake Hook as a deform type for the cloth brush. This
brush changes the strength of the deformation constraints per brush step
to avoid affecting the results of the simulation as much as possible. It
allows to grab the cloth without producing any artifacts in the surface
and create more natural looking folds than any of the other deformation
modes.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8621
2020-08-24 23:28:01 +02:00
5a634735e6 Fix T80008: Smooth brush not deforming mesh boundaries correctly
In 2.83 and previous versions there was a bug that was causing boundary
vertices to be detected incorrectly that was preventing the smooth brush
to work on boundaries if there was a pole on them.
In 2.90 the boundary vertex detection was fixed, but it was still using a
simplified version of the algorithm without any boundary smoothing. This
patch implements a similar smoothing algorithm to what I think it was
the intention of 2.83 and previous versions, but working correctly.

Reviewed By: sergey

Maniphest Tasks: T80008

Differential Revision: https://developer.blender.org/D8680
2020-08-24 23:09:10 +02:00
ed4c83f61f T79811 MacOS: Edit Mode - vertex/edge/face selection is missing
This is quite embarassing... it was returning the base instance instead of
the correct vao. No wonder that it was causing crash and at most drawing
issues.
2020-08-24 19:25:43 +02:00
f5ca34d0b4 BLI: simplify lookup methods in Map
No functional changes expected.
2020-08-24 19:02:41 +02:00
975fc39457 Merge branch 'blender-v2.90-release' 2020-08-24 18:28:58 +02:00
1bced5884c Fix T80039: Do not subdivide with Multires is mesh has no faces
This skips the subdivision operation if the mesh has no loops, avoiding
the crash.

Reviewed By: sergey

Maniphest Tasks: T80039

Differential Revision: https://developer.blender.org/D8696
2020-08-24 18:27:49 +02:00
dc74d60915 Fix T79819: crash with OSL trace() and getmessage() after Embree changes
The return value of scene_intersect must be checked, the isect struct members
can't be assumed to be initialized if that returns false.

Differential Revision: https://developer.blender.org/D8692
2020-08-24 17:54:25 +02:00
8e18a99845 BLI: improve exception safety of Set and Map
For more information see rB2aff45146f1464ba8899368ad004522cb6a1a98c.
2020-08-24 17:24:13 +02:00
5303509354 Fix T80076: Cycles Alembic Motion Blur Problem
The problem occurs when a deforming modifier is added to the object
after the MeshSequenceCache modifier. We should only consider the cached
velocities if the MeshSequenceCache modifier is the last one on the
object and we also need to check for the correct vertex count before
adding the motion vertex attribute.
2020-08-24 16:56:23 +02:00
734abaa252 Cycles: cleanup, remove unused parameter
This parameter was introduced during a revision of the Alembic motion
blur patch, and is not needed anymore.
2020-08-24 16:56:23 +02:00
950d857505 Merge branch 'blender-v2.90-release' 2020-08-24 10:40:12 -04:00
9498eb2692 API Docs: Update Changelog from 2.83 2020-08-24 10:38:17 -04:00
39a09b536e Workbench: Fix assert with sculpt in textured color mode 2020-08-24 16:26:29 +02:00
5b021dff41 Fix T80035: Fix crash switching/adding scenes
Ensure that time source always is in the dependency graph, allowing to
tag the graph for time update prior it was fully built.

Collaboration of Philipp Oeser, Jacques Lucke and myself.
Thanks everyone :)
2020-08-24 15:55:07 +02:00
ee2e2f14ac numaapi: Sync with upstream
Fixes potential build error in some build configurations
2020-08-24 07:45:39 -06:00
Jeroen Bakker
95cc709612 Theme: Remove TH_UV_OTHERS from bTheme
`TH_UV_OTHERS` is a theme option that isn't hooked to anything since
blender 2.80. This patch will remove the option and related code.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D8669
2020-08-24 15:19:49 +02:00
1cac6fe542 Fix selected UV vertex drawing ignoring size 2020-08-24 22:51:31 +10:00
be920fe786 UVEdit: Fix assert caused by depth mask not being set before clear
This happened when using the shading panel when a uv editor opened.
2020-08-24 14:14:17 +02:00
7ce764c9ec Fix T79896 Awful performance with Dyntopo on
Regression caused by rB9443da6166f5. Forgot to clear the flag.
2020-08-24 13:52:01 +02:00
cb8da6efce GPUState: Fix scissor state being overwritten when changing scissor bounds
Fix T79899 viewport artifacts when sculpting
2020-08-24 12:28:54 +02:00
4883cc5728 BLI: add Array.last method
This makes it consistent with Vector and Span.
2020-08-24 11:51:41 +02:00
Imre Palik
afbc727da2 Cycles: Fix missing dependencies in libcycles_device
The code uses OpenGL functionality, so is to be linked against
OpenGL libraries.

This makes it easier to integrate with cycles using CMake.

Differential Revision: https://developer.blender.org/D8371
2020-08-24 11:45:47 +02:00
6b1b2ded77 Merge branch 'blender-v2.90-release' into master
# Conflicts:
#	source/blender/editors/space_node/node_draw.c
#	source/blender/editors/space_sequencer/sequencer_draw.c
2020-08-24 11:31:06 +02:00
35ef42d967 Fix T79970 EEVEE: Camera Animation Breaks Motion Blur (Two Steps or More)
This was caused by motion blur camera movement tagging the view as
invalid and thus resetting the temporal sampling.

Critical fix for 2.90. Need second look, but quite confident. This function
is only called once when Motion blur is off.

Reviewed by: jbakker

Differential Revision: https://developer.blender.org/D8676
2020-08-24 11:24:33 +02:00
40edb84dcf Revert "Fix T77564: VSE (and compositor background) lost stereoscopy preview"
This reverts commit d5b5b228e4.
This reverts commit 47c6f41b89.
2020-08-24 11:17:52 +02:00
4909e599e8 Some small speedups from parallelizing more parts.
Parallelized bounding box finding and degenerate triangle testing.
2020-08-23 10:12:55 -04:00
e4932d1167 Fix T80034 Crash using material panel on 2.91.0 alpha
This was caused by a NULL name.
2020-08-23 14:48:44 +02:00
e74ba9e09e Fix T79872: VSE - splitting strip shows the channel number when unused
This operator is dependent on mouse position (if the Use Cursor Position
option is used). The Channel property is irrelevant/unused in this case.
So it is not optimal displaying this property when calling this from the
menu (or even using the shortcut with default settings).

Now use a custom UI in the Adjust Last Operation panel in this case.
The properties are now drawn in relation to another then (Channel
underneath Use Cursor Position) next to some other minor layout
improvements.

Thx @HooglyBoogly for feedback (also providing UI code)

Maniphest Tasks: T79872

Differential Revision: https://developer.blender.org/D8625
2020-08-23 13:17:49 +02:00
833bc70399 Fix T79874: VSE - error clearing fades without animation data
Maniphest Tasks: T79874

Differential Revision: https://developer.blender.org/D8624
2020-08-23 13:09:57 +02:00
f18e537451 Cleanup: GPU: Use explicit clear value in GPU_clear* commands
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
2020-08-23 12:04:24 +02:00
846cac94db GPUFramebuffer: Use GPUState to temporary change write mask in clear fn
This avoid breaking sync of the state object. Also avoid more hazard.
2020-08-23 12:04:24 +02:00
72e78df464 GPUState: Expose Stencil mask and test
This is to be used by framebuffer clearing.
2020-08-23 12:04:24 +02:00
ed288a5786 Fix T79989: File browser Return doesn't open a directory
Regression in e4a50e3f47.
2020-08-23 16:32:33 +10:00
8f8ed8f567 Fix T80028: Crash opening a file from a timer 2020-08-23 13:44:18 +10:00
2cf930adf3 Cleanup: remove unused UvNearestHit struct members 2020-08-23 12:13:48 +10:00
010c1370af CMake: Fix policy warning about OSL_ROOT being set.
When the OSL_ROOT variable is set this is ignored
by findpackage on cmake < 3.12. CMake 3.12 and up
also  ignore it and warn about it. This change
tells cmake it is OK to use the variable and
stop warning
2020-08-22 16:24:09 -06:00
f4e337a7da Some tweaks to multithreading parameters based on tests to minimize time. 2020-08-22 15:53:22 -04:00
8f48a32f9f UI: In-line layout for camera passepartout
No need for a sub-panel when there is just one setting.
2020-08-22 21:53:16 +02:00
1885bf77b6 Fix T80013: Crash when toggling maximized area
Error renaming variable in 75aeb4b881
2020-08-22 11:30:51 -04:00
99d4d94762 Merge branch 'master' into newboolean 2020-08-22 09:44:33 -04:00
7cc85d8b9c A couple more cleanups inspire by reviewer comments. 2020-08-22 09:33:00 -04:00
2231c4bd89 Fix clang-tidy warnings. 2020-08-22 08:19:10 -04:00
7e06208f6a Fixed an error and warning on Linux from previous commit. 2020-08-22 08:02:33 -04:00
9810cfa1e8 Addressed comments of reviewers on D8623.
Almost all changes asked for by Campbell and Jacques have been
addressed. The clang-tidy fixes will happen in the next commit.
2020-08-22 07:30:13 -04:00
e26301f4d1 Fix T79971 Regression: Transform Gizmos doesnt work anymore
This changes the state of occlusion queries quite a bit. Now scissors is
explicitely disabled and we enabled color write.

I still don't understand why we now need this. This patch is just trial and
error on an affected setup. Note that on the same computer, renderdoc
was not able to capture the regression (the regression did not manifest
during capture).

Regression likely introduced by rB5f414234ddea
2020-08-22 01:42:15 +02:00
a204324966 DRW: Fix state not being locked
Regression introduced by rBe12c08e8d170b7ca40f204a5b0423c23a9fbc2c1
2020-08-22 01:42:15 +02:00
a1f54be042 Cleanup: Remove unused variables 2020-08-21 15:33:40 -04:00
53d1f89322 Fix T79987: Crash when joining objects
Mistake in b077de086e. I did the same fix for a few operators there,
but missed the object "Join" one.

The joining operator changes the layer content. So it must send a
notifier for that.
Before b077de086e that didn't cause a noticeable issue, because the
Outliner happened to listen to other notifiers (active/selection
changes) the operator sent and fully rebuilt its tree in response. Now
missing these notifiers can be more problematic, since we try to avoid
more rebuilds.

Added comments to the notifier types to avoid at least this pitfall.
2020-08-21 19:46:15 +02:00
70500121b4 Cleanup: rename iterators over sequences to be more clear about what they do.
No functional changes expected.
2020-08-21 18:55:27 +02:00
74ded456b3 Merge branch 'blender-v2.90-release' into master 2020-08-21 17:43:59 +02:00
ebf10b72b0 Fix critical bug in foreach ID looper of Scene data-block.
Since stone age of lib_query, the code would iterate over the current
list of active sequences (from a meta strip e.g.), and not over the
whole list of those.

This is a critical issue as it means in some cases (editing a meta strip
typically), some ID pointers would be missed/ignored by this foreach
looper, which is now at the center of most of our ID management code.

This caused a bug here at the studio, leading to loss of all sound IDs
used by sound strips when editing and undoing inside a meta strip, since
ID refcounting would not happen properly on strips using sounds outside
the meta-strip context during file reading of the undo steps.

To be backported to 2.83.

Differential Revision: https://developer.blender.org/D8671
2020-08-21 17:35:18 +02:00
0a6ef69509 Cleanup: move break statements into case body, or remove if follwing a return. 2020-08-21 10:16:37 -04:00
661ba642f2 Cleanup: spelling 2020-08-22 00:10:52 +10:00
eed43a89dd Cleanup: use doxy sections for fcurve.c 2020-08-22 00:10:52 +10:00
c00707c18d Cleanup: remove f-string use 2020-08-22 00:10:52 +10:00
4b13eb2788 Rename some classes at the suggestion of reviewers.
Mesh -> IMesh; MArena -> IMeshArena
Remove type abbreviations Vertp and Facep.
2020-08-21 10:02:58 -04:00
995725c681 Cleanup: remove duplicated code from previously unnoticed merge conflict
`BKE_animdata_blend_expand` is called in `expand_id` already.
2020-08-21 16:01:30 +02:00
0de48f8550 Refactor: move animdata code from blenloader to blenkernel 2020-08-21 15:58:28 +02:00
bed634c4f9 Refactor: move nla code from blenloader to blenkernel 2020-08-21 15:42:26 +02:00
71634d94ca Cleanup: remove LodLevel
This was part of the game engine and is not used anymore.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8666
2020-08-21 15:24:36 +02:00
79d678e677 Refactor: move fcurve/fmodifier code from blenloader to blenkernel
This is part of T76372.
2020-08-21 15:23:33 +02:00
76689e8517 Cleanup: use LISTBASE_FOREACH in readfile.c 2020-08-21 14:39:39 +02:00
2e630297af GPUShader: Fix linking working even if one shader compilation failed
Linking without valid shaders works on some drivers. Avoid this case by
forcing linking step to return false.
2020-08-21 14:25:58 +02:00
481927d4d6 Use an enum type for solver in boolean modifier.
This matches what was done in a previous commit for the tool.
It makes it easier to associate a tooltip with each choice.
For this branch, I have the default solver be the Exact one;
when we merge to master, we will have to decide the best default.
Make format caught a coouple other files, sorr for not doing those
earlier.
2020-08-21 08:23:18 -04:00
3a6e981bcd Cleanup: GPU: Update classes comments
This should avoid confusion about what is a class and what is an opaque
pointer.
2020-08-21 14:16:42 +02:00
220fbdf593 GPUShader: Make GPUShader* an opaque pointer to blender::gpu::Shader
This avoids the misleading inheritance.

Also cleanup by setting the blender::gpu::Shader as active shader to
avoid some casting.
2020-08-21 14:16:42 +02:00
1e95a7402c GPUShader: Fix NULL string used as shader name.
The shader name is required with the latest changes.
2020-08-21 14:16:42 +02:00
c4f122ac8f GPUUniformBuf: GL backend isolation
This is in preparation of vulkan backend. We move all opengl
functionnalities behind an abstract class.

This also cleansup the "dynamic" ubo create and rename it to
`GPU_uniformbuf_from_list()`

Contains, no functional change.

Part of T68990 Vulkan support.
2020-08-21 14:16:42 +02:00
7edd8a7738 GPUUniformBuf: Rename struct and change API a bit
This follows the GPU module naming of other buffers.
We pass name to distinguish each GPUUniformBuf in debug mode.
Also remove DRW_uniform_buffer interface.
2020-08-21 14:16:42 +02:00
4f0a749489 Cleanup: use LISTBASE_FOREACH in writefile.c 2020-08-21 13:14:41 +02:00
933f0caec6 Blenloader: move IDProperty read/write code to blenkernel
This is part of T76372.
2020-08-21 12:45:41 +02:00
27f0a19bdc Cleanup: remove exec() calls from custom property editor
Remove `exec()` and `eval()` calls from `WM_OT_properties_edit` where
possible. This not only results in simpler, cleaner code, but also
removes the necessity for `repr(value)` to evaluate to a Python
expression that in turn evaluates to `value` again.

No functional changes.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D8658
2020-08-21 12:34:41 +02:00
3bc09c1c1e Cleanup: split BKE_scene_get_depsgraph() into two functions
Split the depsgraph allocation into a separate function
`BKE_scene_ensure_depsgraph()`. Parameters are only passed to those
functions that actually need them. This removes the the "if that boolean
is `false` this pointer is allowed to be `NULL`" logic and more cleanly
decouples code.

No functional changes.
2020-08-21 12:23:13 +02:00
e7767ba6be Cleanup: Reduce nesting of scene_get_depsgraph_p()
Reduce nesting by flipping conditions and returning early. It's now much
clearer that it's actually a linear function (rather than a nested one).

No functional changes.
2020-08-21 12:18:48 +02:00
7aeaf5da0e Fix crash when accessing view_layer.depsgraph through BPY
For the sanity checks to work we don't actually need to check other
scenes. So this function can be simplified so that it does not require
a `Main *`.

Mistake in 5cc08510e0.
2020-08-21 11:31:15 +02:00
41d31e100d Cleanup: remove MeshBatchCache from MeshRenderData
Was noted as a hack, this can be passed as an argument instead.
2020-08-21 17:19:25 +10:00
6755464527 UI: Fix panel collapse all behavior inverted
Ctrl click on a panel should collapse all other panels but leave that panel
expanded. In a recent cleanup commit that was mistakenly reversed.
2020-08-20 23:41:10 -04:00
4ed8bd88d9 UI: Cleanup in interface_panel.c
- Use const in some places where applicable
- Use consistent variable names in some places
- Use "r_" prefix for return arguments
- Declare variables in smaller scope where they are used
2020-08-20 23:38:39 -04:00
de294bb3e2 Use custom layout for intersect tools, with expanded choices.
Makes "Exact" vs "Fast" a choice with tooltips for each.
Hides merge threshold when in Exact mode.
2020-08-20 21:23:21 -04:00
75aeb4b881 Cleanup: Use LISTBASE_FOREACH in editors/screen directory
Differential Revision: https://developer.blender.org/D8653
2020-08-20 20:47:44 -04:00
6903b3414a Renamed boolean to meah_boolean in BLI file names. 2020-08-20 19:46:57 -04:00
3b36e2b781 Merge branch 'master' into newboolean 2020-08-20 17:03:51 -04:00
ce0bcd5fbf Fix incorrect notifier value
Wouldn't actually cause an issue since the value was unused within the
subtype bits.
Own mistake in dc2df8307f.
2020-08-20 20:28:54 +02:00
b077de086e Outliner: Avoid rebuilding tree on selection/active changes
We can avoid the rather expensive outliner tree rebuilds and only redraw
if nothing but the selection or active item changes. This should give a
bit of speedup for heavy scenes.

For this to work I had to correct a few notifiers, some were only
sending selection/active change notifiers that actually did things like
adding objects. I also added a more precise notifier type for when the
active collection changes. At the notifier subtype/action level we're
not even close to running out of bits, so this should be fine.
Also had to correct a wrong notifier check (was using `&` rather than
`==`).
2020-08-20 20:22:47 +02:00
2e6d5e6c6b Cleanup: Clang Tidy: Resolve readability-delete-null-pointer error 2020-08-20 13:33:17 -04:00
e5fd2a3888 Merge branch 'blender-v2.90-release' into master 2020-08-20 17:59:05 +02:00
5a957c0299 GPUShaderInterface: Fix use after free crash 2020-08-20 17:57:05 +02:00
05e1ccf108 Fix T79931: Infinite loop in scene "Full Copy" in 2.90.
Code dealing with object copy of master collection was bugy in case one
of the new object copy would get a name lesser than the original object,
leading to new copy being inserted before original one in lists.

Maniphest Tasks: T79931

Differential Revision: https://developer.blender.org/D8656
2020-08-20 17:47:56 +02:00
Wayde Moss
89ee260ef2 Fix T63675: Keying outside NLA strip not possible
Allow adding keys outside of the NLA strip, when Sync Length is
activated. Before this, an animator would have to exit tweak mode,
adjust the strip length, then enter tweak mode again.

Now the animator can freely insert and modify keys outside of the strip
bounds. They will never have to touch the strip bounds directly.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D7533
2020-08-20 17:19:36 +02:00
7d79b06fa7 Cleanup: Mesh Filter invoke refactor
This moves the allocation for filter to separate functions, removes all
repeated calls to RNA_enum_get an fixes some other code quality issues.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8639
2020-08-20 17:03:15 +02:00
5f414234dd GPUState: Use state setters inside selection code
This fixes T79945 Gizmos don't work in Edit Mode
2020-08-20 17:02:39 +02:00
8228356f50 DRW: Fix remaining glDisable 2020-08-20 17:02:39 +02:00
e23ef8753a GPUState: Use explicit depth test enum 2020-08-20 17:02:39 +02:00
c85144934a Fix T79924: Update the view rotation origin after setting the sculpt pivot
This updates the view navigation origin after modifying the pivot
position.

Reviewed By: sergey

Maniphest Tasks: T79924

Differential Revision: https://developer.blender.org/D8632
2020-08-20 17:01:12 +02:00
d74c495838 Fix variable simulation steps with cloth deform brushes
Cloth deform brushes (both in cloth brush or other tools with cloth
simulation targets) should not have their spacing as a value relative
the brush radius to avoid affecting the simulation speed when changing
the brush radius.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8620
2020-08-20 17:00:12 +02:00
b3bd121dd4 Sculpt: Add orientation modes to the Cloth Filter
This adds the orientation modes to the Cloth Filter.
Similar to the mesh filter, they set the orientation of the axis when
limiting the forces.

When using the gravity mesh filter, the orientation also sets the gravity
direction. In world orientation, cloth will always fall towards the
ground plane. In view mode, cloth will always fall down relative to the
view.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8618
2020-08-20 16:58:26 +02:00
Wayde Moss
50919413fe NLA: Fix strip Sync Length moving animation data
Change the way Sync Length works so that it keeps keyframes at the same
key as before the sync. Now when the user exits tweak mode, the overall
NLA result is unchanged.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D7602
2020-08-20 16:44:38 +02:00
Red Mser
12dd08ef52 UI: Fix aligned popovers not always turning inactive
Popovers which are aligned with properties should turn themself
(and the panel they open) inactive when the corresponding property
toggle is turned off. A notable exception is the snap settings
popover, as snapping can still be used when the toggle is off.

Differential Revision: https://developer.blender.org/D8584
2020-08-20 10:34:55 -04:00
263148dbac Depsgraph: refactor tagging after time changes
This reverts {rB1693a5efe91999b60b3dc0bdff727473b3bd00bb}
and implements an alternative solution.

The old patch had the problem that the depsgraph would always
evaluate at the current frame of the original scene (even when
`DEG_evaluate_on_framechange` was used). Now it is possible
to evaluate the depsgraph at a specific frame without having to
change the original scene.

Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D8616
2020-08-20 16:29:34 +02:00
Sybren A. Stüvel
948e080fc5 Silence -Wmaybe-uninitialized warning on GCC/Linux
Add `-Wno-maybe-uninitialized` option to `CMAKE_CXX_FLAGS_RELEASE` and
`CMAKE_CXX_FLAGS_RELWITHDEBINFO` variables on GCC/Linux.

In Release builds GCC's `-Wmaybe-uninitialized` warning is unreliable,
and thus causes noise that can drown out other warnings. These warnings
are now silenced in release mode builds.a

Debug builds seem fine, so flags for debug builds are not touched by
this commit.

No functional changes.

Reviewed By: Sergey

Differential Revision: https://developer.blender.org/D8615
2020-08-20 16:12:28 +02:00
7fac0f9cd5 Selection: Fix lasso selection invisible 2020-08-20 16:11:14 +02:00
121d3181f9 GPU: Fix some more remaining GL enums scattered outside of GL module
This fixes an assert inside the lasso selection drawing.
2020-08-20 16:11:14 +02:00
19d72175ba GPUShaderInterface: GL backend isolation 2020-08-20 16:11:14 +02:00
14fcd46ca7 GPU: Use GPUShader setters for uniforms removing uses of ShaderInterface 2020-08-20 16:11:14 +02:00
5e65498e3d DRW: Remove some more direct gl state modification. 2020-08-20 16:11:14 +02:00
f364d181e3 UI: Fix collapsed panels not drawing header buttons
Error in rB940b239ad473 left a check for open panels after the
"vertical" check was removed.
2020-08-20 10:04:17 -04:00
f9697543e4 Revert "Cleanup: Use LISTBASE_FOREACH in editors screen directory"
This reverts commit 52f40bcff2.

Apologies for the noise. I caught a problem with this that I hadn't before. I will
commit later after thorough testing.
2020-08-20 09:34:09 -04:00
52f40bcff2 Cleanup: Use LISTBASE_FOREACH in editors screen directory
Differential Revision: https://developer.blender.org/D8653
2020-08-20 09:29:01 -04:00
a12d046910 Merge branch 'blender-v2.90-release' into master 2020-08-20 22:00:51 +10:00
c74b4caa72 Fix incorrect mask use with curves
Ref D8652
2020-08-20 21:51:35 +10:00
5e85c9878b Fix cloth collision clamp having no effect
And rename `cloth_selfcollision_impulse_vert` to `cloth_collision_impulse_vert`
2020-08-20 08:24:32 -03:00
f9b4fb7206 Cleanup: Outliner: LibOverride tools.
Remove useless extra-processing, comments, etc.
2020-08-20 12:41:14 +02:00
4aa04b6490 LibOverride: Add 'delete and use linked data' operation.
This will re-link all usages of a library override data-block
(including all of its override dependencies) to its reference linked
IDs, and delete those liboverrides.

As usual, it is available in the ID sub-menu of the outliner context
right-click menu.

Part of T76555.
2020-08-20 12:35:16 +02:00
59180ff153 Merge branch 'blender-v2.90-release' into master
Conflicts:
	source/blender/makesrna/intern/rna_scene.c
2020-08-20 11:54:46 +02:00
0fae682d61 Fix T79935: Inonsistent simplify behavior when linking collection with objects in sub-collection.
RNA update function would only update objects from 'main' instantiated
collection, not those from sub-collections.

This should be comitted to 2.90 (and backported to 2.83 too).

Maniphest Tasks: T79935

Differential Revision: https://developer.blender.org/D8654
2020-08-20 11:52:12 +02:00
341ff17326 Fix T79935: Inonsistent simplify behavior when linking collection with objects in sub-collection.
RNA update function would only update objects from 'main' instantiated
collection, not those from sub-collections.

This should be comitted to 2.90 (and backported to 2.83 too).

Maniphest Tasks: T79935

Differential Revision: https://developer.blender.org/D8654
2020-08-20 10:39:28 +02:00
efa7aaa97f Cleanup: use const variables where possible in the Python API 2020-08-20 16:10:13 +10:00
8877e3aa62 Cleanup: clang-format 2020-08-20 16:09:48 +10:00
07753fa825 Docs: Update BPY to manual mappings 2020-08-19 21:47:36 -04:00
48325306d9 Cleanup: Outliner active indicator repeated code
Refactor the code to draw the roundrect behind outliner icons for active
elements into a single function.

No functional changes.
2020-08-19 19:35:47 -06:00
57c3718447 Revert "Use std::abs instead of fabs in C++ code."
This reverts commit eac84bf527.

Using std::abs causes ambiguity problems when compiling on a Mac.
2020-08-19 20:29:09 -04:00
940b239ad4 Cleanup: Remove unused variables for horizontal panels
Continuing the work of eb9055a572, remove remaining unecessary
variables and arguments that were related tabbing and horizontal
alignment of panels. For example, "vertical" was always true, and
removing that exposed other unused variables.
2020-08-19 18:55:04 -04:00
eac84bf527 Use std::abs instead of fabs in C++ code. 2020-08-19 18:20:31 -04:00
50b435cbaa Cleanup: Remove unused variable 2020-08-19 18:05:03 -04:00
fa9a630b29 Use std::lower_bound instead of custom binary search. 2020-08-19 17:48:28 -04:00
f5c7a6d3b6 Fix memory leak in delaunay C interface code. 2020-08-19 17:29:04 -04:00
4f6051e8c4 BLI: fix memory leak in delaunay 2d
Differential Revision: https://developer.blender.org/D8633
2020-08-19 18:45:48 +02:00
48bd6e7102 Tests: use guarded allocator in tests
This helps finding memory leaks in tests.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8631
2020-08-19 18:18:20 +02:00
eb9055a572 UI: Remove panel X axis closing code
Horizontal panel alignment hasn't been used for years, and we have no
plans to use it in the future. It adds a fair amount of complexity to
the panel code which makes adding features take longer.

This code removes the X closing flag, and all of the logic / variables
unused without it.

This commit includes a file subversion bump.

Differential Revision: https://developer.blender.org/D8601
2020-08-19 11:37:21 -04:00
f61927d946 BLI: improve leak detection in tests
This actually found a bug in my previous commit.
2020-08-19 17:27:58 +02:00
1dafa87eb5 GPUState: Fix signed / bitfield conversion leading to wrong enum value
This was creating drawing issues on windows builds.
2020-08-19 17:13:53 +02:00
fccb38cf19 Fix warning from narrowing conversion 2020-08-19 16:56:36 +02:00
2aff45146f BLI: improve exception safety of Vector, Array and Stack
Using C++ exceptions in Blender is difficult, due to the large
number of C functions in the call stack. However, C++ data
structures in blenlib should at least try to be exception safe,
so that they can be used if someone wants to use exceptions
in some isolated area.

This patch improves the exception safety of the Vector, Array
and Stack data structure. This is mainly achieved by reordering
some lines and doing some explicit exception handling.
I don't expect performance of common operations to be affected
by this change.

The three containers are supposed to provide at least the
basic exception guarantee for most methods (except for e.g.
`*_unchecked` methods). So, resources should not leak when
the contained type throws an exception.

I also added new unit tests that test the exception handling
in various cases.
2020-08-19 16:44:59 +02:00
aeaf2b0dd4 LibOverride: Add initial version of 'resync' operation.
Available from the usual ID submenu in the Outliner context menu.

The goal of this operator is to re-create the override from the linked
data, while preserving existing defined overrides.

This allows to update local opverrides when relations between datablocks
are changed in source library linked data.

Part of T76555.
2020-08-19 16:27:49 +02:00
aa1e4baa22 Cycles : add a Volume Geometry Node
This splits the volume related data (properties for rendering and attributes) of the Mesh node
into a new `Volume` node type.

This `Volume` node derives from the `Mesh` class since we generate a mesh for the bounds of the
volume, as such we can safely work on `Volumes` as if they were `Meshes`, e.g. for BVH creation.
However such code should still check for the geometry type of the object to be `MESH` or `VOLUME`
which may be bug prone if this is forgotten.

This is part of T79131.

Reviewed By: brecht

Maniphest Tasks: T79131

Differential Revision: https://developer.blender.org/D8538
2020-08-19 15:47:09 +02:00
3e56dd8fd9 GPencil: Change default Onion Keyframe mode to ALL
Now by default the selection mode is All keyframes types.

Also removed the icon for All option and renamed from `All Types`to `All`.

UI review by @pablovazquez
2020-08-19 15:30:38 +02:00
db292912f4 Fix crash in Debug build for some cases of no intersects. 2020-08-19 07:35:57 -04:00
5cc08510e0 RNA: Validate scene/view-layer combination for statistics query
Users may input an invalid scene/view-layer combination via Python. We
can easily detect that and fail gracefully.

Besides checking input parameters in RNA, also assert the
scene/view-layer combination is valid in lower level Depsgraph lookup
function (called by statistics query).
2020-08-19 12:37:59 +02:00
8cbfc4c76e Fix T79816: Restore scene.statistics() BPY function
This RNA/BPY function was removed in c08d847488. For understandable
reasons really-- getting scene statistics from a string displayed in the
status bar is not exactly the best design. But we have committed to not
changing the RNA API too much for the 2.90 release, so we would like to
keep this functionality.

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

Reviewd by: Julian Eisel
2020-08-19 12:37:59 +02:00
5549ee2e08 Fix incorrect number of recent items displayed in splash
After recent code cleanup in rB349eebd7.
2020-08-19 12:26:49 +02:00
83c78529b9 Fix T79816: Restore scene.statistics() BPY function
This RNA/BPY function was removed in c08d847488. For understandable
reasons really-- getting scene statistics from a string displayed in the
status bar is not exactly the best design. But we have committed to not
changing the RNA API too much for the 2.90 release, so we would like to
keep this functionality.

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

Reviewd by: Julian Eisel
2020-08-19 12:14:03 +02:00
c5d33070fd Cleanup: compiler warnings 2020-08-19 12:11:48 +02:00
e9e493977c GPUShader: Fix apple clang warnings 2020-08-19 11:57:28 +02:00
d412a5e6fa DRW: Fix crash drawing gpencil 2020-08-19 11:54:05 +02:00
90ee622830 Turn experimental features ON for master
During alpha the user preferences > experimental featuers are available
to prevent merge issues and allow developers to seek feedback.

This needs to be manually turned off when we branch for beta, otherwise
the RNA of the incomplete features will be exposed.
2020-08-19 10:23:21 +02:00
ffb8fca751 Revert "Turn experimental features on for master (alpha)"
I turned on the wrong feature in cmake.
This reverts commit bdf43213b2.
2020-08-19 10:22:00 +02:00
97dc370c50 Fix compiler error in MSVSC
Introduced in: rB20a8edaa725ddbae16179d2f7cea88c097c61615

It broke building on windows, initializing a static may not be done with a function in C.
2020-08-19 08:58:29 +02:00
b1a53cc85b Merge branch 'master' into newboolean 2020-08-19 16:43:30 +10:00
638fa188b7 Merge branch 'blender-v2.90-release' into master 2020-08-19 14:45:21 +10:00
Hans Goudey
04ca28a6e0 Fix T77300: Some scientific notation evaluation has incorrect results
Ref D7922
2020-08-19 14:44:42 +10:00
d3bf4929de Cleanup: update mball.c comments
Some errors in comments, references to old function names.
2020-08-19 14:16:25 +10:00
7a602fb525 Cleanup: spelling 2020-08-19 14:04:36 +10:00
3f43f57731 Cleanup: warnings 2020-08-19 13:52:48 +10:00
33a4a6dd66 Merge branch 'blender-v2.90-release' into master 2020-08-19 13:51:14 +10:00
762e4cf221 BLI_listbase: add utility macro for looping over lists with an index
Add to the 2.90 branch to avoid problems if fixes from master use it.
2020-08-19 13:43:51 +10:00
108e6d4ef2 Better performance when there are clusters of coplanar triangles. 2020-08-18 21:51:35 -04:00
349eebd7d1 UI Code Quality: Use LISTBASE_FOREACH in interface directory
I only skipped a few loops in the monstrous ui_handle_menu_event
function. Also, I only changed variable names where necessary to
prevent redeclarations.

Differential Revision: https://developer.blender.org/D8586
2020-08-18 21:47:00 -04:00
ffa8e75799 BLI Listbase: Add iterator macro that increments an index 2020-08-18 21:38:18 -04:00
78d6c273b7 Merge branch 'blender-v2.90-release'
# Conflicts:
#	source/blender/editors/space_sequencer/sequencer_draw.c
2020-08-18 21:30:52 +02:00
33fde699e2 Cleanup: GPUState: Remove GPU_state_init() 2020-08-18 21:30:11 +02:00
e5796233c7 GPUState: Use GPU_viewport to set viewport state in GPU_framebuffer
also fix a small issue in GPU_texture_clear.
2020-08-18 21:30:11 +02:00
adca09b643 GPUState: Port default state to StateManager constructor 2020-08-18 21:30:11 +02:00
a9f2ebb215 Cleanup: DRW: Use GPUState instead of raw opengl calls
Should not break anything! Huh!
2020-08-18 21:30:10 +02:00
536c2e0ec9 GPUState: Only apply state before drawing 2020-08-18 21:30:10 +02:00
482a51aabf Cleanup: GPUState: Remove stack from the state manager and rename it 2020-08-18 21:30:10 +02:00
d10f000322 GPUState: Remove gpuPushAttr/gpuPopAttr
And use manual save/restore mechanism.

The stack method is not used so much to be considered useful.
2020-08-18 21:30:10 +02:00
f30df15edc GPUState: Make use of GPUStateStack class
This isolate most GL calls to the GL backend. Still a few remains.
2020-08-18 21:30:10 +02:00
298329554a Cleanup: GPUState: remove double GPU_blend calls 2020-08-18 21:30:10 +02:00
bf1b622dd9 GPUState: GPU_blend final API renaming
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
2020-08-18 21:30:10 +02:00
10558d6973 Cleanup: GPUState: remove use of GPU_blend_set_func 2020-08-18 21:30:10 +02:00
969bcf0793 Cleanup: GPUState: Replace blend func separate by enum 2020-08-18 21:30:10 +02:00
a1459b2f7a Cleanup: GPU: Move towards an explicit Blend state
This make use of the GLStateStack functions for:
- `GPU_blend()`
- `GPU_blend_set_func()`
- `GPU_blend_set_func_separate()`

The goal is to unify them using an explicit state setting.
This will remove the need to use obscure blend functions
2020-08-18 21:30:10 +02:00
2ae1c895a2 GPUState: Add GL backend and state tracking but do not use it
This is just the backend work. It is not plugged in yet because it
needs more external cleanup/refactor.
2020-08-18 21:30:10 +02:00
2eddfa85e0 Cleanup: GPU: Remove uneeded depth precision getter.
We always use 24bit framebuffers nowadays.
2020-08-18 21:30:10 +02:00
0f292dc072 Cleanup: GPUState: remove float variant of GPU_scissor_get 2020-08-18 21:30:10 +02:00
c78ea96528 GPUShader: Add debug labels
This allow better debugging inside renderdoc.
2020-08-18 21:30:10 +02:00
ba3c18f4b2 GPUShader: Add back vertformat_from_shader() 2020-08-18 21:30:10 +02:00
e8c48ce075 GPUShader: Improve auto name
Use macro to get calling function name. Helps debugging shaders.
2020-08-18 21:30:10 +02:00
e43e9caf1b GPUShader: Rewrite error printing
Now error printing only display the line related to the error.
We also put char marker if present.

Example:
```
-- Shader Compilation Errors : MAMaterial --

10414 |  node_fresnel(, facingnormal, viewposition, tmp34);
      |               ^
      | error: syntax error, unexpected ',', expecting ')'

----------------------------------
```
2020-08-18 21:30:10 +02:00
216d78687d GPUShader: GL backend isolation 2020-08-18 21:30:09 +02:00
df28d2c27e Cleanup: GPU: Replace Batch uniform by shader uniform using macro
This is a first step into removing uniforms from GPU_batch and Imm.
2020-08-18 21:30:09 +02:00
d5b5b228e4 UI: Fix protential stray GPU state preventing correct drawing
Fix potential issue with nodetree introduced in rB47c6f41b8926.
2020-08-18 21:29:47 +02:00
b8b56ee172 BLI_kdopbvh: Adjust epsilon according to the axis
This corrects the overlap detection for cloths since in this case kdop26
is used and epsilon represents the distance.
2020-08-18 14:08:58 -03:00
80face1be5 Depsgraph: simplify DEG_evaluate_* API
This mainly removes the bmain argument, which can be
retrieved from the graph itself.

Also, I removed some outdated/unnecessary comments.

Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D8614
2020-08-18 17:40:56 +02:00
c2f0522760 Sculpt: Enable Cloth Simulation Target for Pose and Boundary
This adds a new brush property called "Deformation Target" which
controls how the brush deformations is going to affect the mesh data. By
default is set to Geometry, which makes the brushes displace the
vertices. When set to Cloth Simulation, the deformation of the brush is
applied to the cloth solver constraints, so the simulation is
responsible to apply the final deformation. This allows to add cloth
simulation effects to other sculpt tools with minor modifications to their
code.

This patch enables Cloth Simulation deformation target for Pose and
Boundary brushes, which are tools that are already designed to work in
low poly counts and produce large deformations. This allows creating the
most common cloth effects, like bending and compressing folds, without
relying on collisions.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8578
2020-08-18 17:16:35 +02:00
bedd6f90ca Sculpt: Erase Displacement Mesh Filter
Same concept as the Multires Displacement Eraser Brush but implemented
as a mesh Filter. This allows to delete the displacement of an entire
area uniformly.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8608
2020-08-18 17:04:24 +02:00
0957189d4a Sculpt: Enhance Details Mesh Filter
Exact same operation as D8509, implemented as a Mesh Filter.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8510
2020-08-18 16:56:44 +02:00
55087b84b8 Cleanup: Node: Use checker shader for preview background
Removes many drawcalls which might have slowdown the UI.
2020-08-18 16:15:34 +02:00
3e5431fdf4 Sculpt: Invert Smooth to Enhance Details
This enables the invert mode in the smooth brush as Enhance Details.
The operation is similar to the Sharpen Filter intensify details parameter,
which consist in applying the laplacian smooth displacement in the opposite
direction calculated using the original coordinates.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8509
2020-08-18 16:14:10 +02:00
872efd8d73 Merge branch 'blender-v2.90-release'
# Conflicts:
#	source/blender/editors/space_node/node_draw.c
#	source/blender/editors/space_sequencer/sequencer_draw.c
2020-08-18 16:04:41 +02:00
b3b67a61b7 Fix compiler error in MSVSC
Introduced in: rB20a8edaa725ddbae16179d2f7cea88c097c61615

It broke building on windows, initializing a static may not be done with a function in C.
2020-08-18 15:59:03 +02:00
5195d346f4 Fix T79714: Projecting texture from camera fails
The evaluated mesh is now only recomputed when the required data layers
are missing. Previously the evaluated mesh was re-evaluated incorrectly,
which caused the stippled result and the failing assert.

Since now only the evaluated mesh is used, and never a temporary mesh,
there is also no more need to keep track of whether the mesh needs
freeing or not.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8574
2020-08-18 15:53:28 +02:00
6a4f5e6a8c Depsgraph: simplify build API
Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D8611
2020-08-18 15:51:32 +02:00
47c6f41b89 Fix T77564: VSE (and compositor background) lost stereoscopy preview
Issue introduced on fe045b2b77.

Since the stereoscopy compositing (anaglyph, ...) is only done for
viewports the VSE preview and compositor need to use viewports.

Reviewed by: dfelinto

Differential Revision: https://developer.blender.org/D8472
2020-08-18 15:50:49 +02:00
d9f7cbb8af Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframe
Reviewers: sergey

Differential Revision: https://developer.blender.org/D8613
2020-08-18 15:45:58 +02:00
f653a4f349 Cleanup: remove outdated comments 2020-08-18 15:41:26 +02:00
2922f9b83d Cleanup: remove TimeSourceNode->cfra which is never read 2020-08-18 15:40:29 +02:00
2e908156d0 Fix T77564: VSE (and compositor background) lost stereoscopy preview
Issue introduced on fe045b2b77.

Since the stereoscopy compositing (anaglyph, ...) is only done for
viewports the VSE preview and compositor need to use viewports.

Reviewed by: dfelinto

Differential Revision: https://developer.blender.org/D8472
2020-08-18 15:39:27 +02:00
63998d3522 Cleanup: remove unused TimeSourceNode->offset 2020-08-18 15:32:43 +02:00
89a374cd96 Sculpt: Sculpt Filter Orientation Options
Previously, the XYZ deform axis of the Mesh Filter were limited to
object space (which is the default for sculpt mode). Now it is possible
to limit the XYZ displacement in Local, Global or View space.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8582
2020-08-18 15:19:54 +02:00
017941057f Fix T79800: Split vertex size for grease pencil
Differential Revision: https://developer.blender.org/D8607
2020-08-18 15:13:53 +02:00
bdf43213b2 Turn experimental features on for master (alpha)
Remember to turn this off again when we branch out for the next beta (2.91)
2020-08-18 14:56:22 +02:00
8ab0d0e399 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-18 14:55:44 +02:00
83e3d25bca Remove (ifdef) RNA for simulation, point cloud and particles
For 2.90 release this should not be exposed in the RNA API.

In master this needs to be ON by default, that's all.

Differential Revision: https://developer.blender.org/D8589
2020-08-18 14:41:16 +02:00
c526a34fc2 Cleanup: Fix strict compiler warning 2020-08-18 14:38:07 +02:00
1da0685076 Cycles: add a Pass Node
The Pass struct is now a Node and the passes are moved from the Film
class to the Scene class.

The Pass Node only has `type` and `name` as sockets as those seem to be
the only properties settable by exporters (other properties are implicit
and depend on the pass type).

This is part of T79131.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8591
2020-08-18 14:28:59 +02:00
673b1930d8 Merge branch 'blender-v2.90-release' 2020-08-18 14:05:26 +02:00
20a8edaa72 No experimental feature (but debug ones) to work for blender beta/release
Final releases (including beta) should strictly show features that are
finalized to prevent loss of data, old API clanging around, and the
overall quality of the product (Blender) presented.

Note that rendering should never be affected by user preferences, so
this is only changing things in the UI level.

Development note: This is reset experimental UI on file load.
Also note: to hide RNA (needed for hair and particles) will be done as a
separate patch.

Differential Revision: https://developer.blender.org/D8606
2020-08-18 14:02:47 +02:00
aba46371a1 GPUTexture: Extend CUBE_MAP_ARRAY_ARB proxy workaround to all Apple gpus
Related to T79716
2020-08-18 14:01:14 +02:00
41235eed1d GPU: Avoid invalid GL API usage
Drawing with 0 sized buffer is prohibited.
2020-08-18 13:53:07 +02:00
fe1827df82 Fix T79782 GPU: Crash cause by shadow batch reference
After drawing, the batch could be reset and draw again using other
parameters.

Avoid having to track references by setting the batch pointer to NULL after
drawing.
2020-08-18 13:53:07 +02:00
4814836120 Sculpt: Option to limit the forces axis in the Cloth Filter
This uses the same concept of the Mesh Filter but for applying the cloth
filter forces, so now it can be limited to a specific axis.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8567
2020-08-18 13:28:37 +02:00
976f0113e0 Multires: Base Mesh Sculpting
This adds an option to the Multires modifier to sculpt directly on the
base mesh while previewing the displacement of a higher subdivisions
level. What this does it considering Multires as a regular modifier
without exposing the grid displacement to sculpt mode.

This allows to see the propagation happening in real time, which enables
to use complex tools like Cloth or Pose in much higher resolutions and
without surface noise and artifacts.

Reviewed By: sergey, Severin

Differential Revision: https://developer.blender.org/D8555
2020-08-18 13:11:23 +02:00
df495e758d Cleanup: use Span instead of separate pointer and length
Reviewers: sergey

Differential Revision: https://developer.blender.org/D8605
2020-08-18 13:06:31 +02:00
fc5eab3570 Mesh: merge mesh_create_eval_final_{view,render} functions
Functions `mesh_create_eval_final_view()` and
`mesh_create_eval_final_render()` were doing the exact same thing,
except for a hack introduced in d3eb9dddd6 (2012-10-08, Better fix for
T32846: dupligroup messes up particle instancing on rendering) that
appears to be no longer necessary. Besides that, these functions had
confusing names. Their functionality changed over time, and whether to
do for-render or for-viewport evaluation is now actually determined by
the depsgraph evaluation mode. This means that the `..._render` function
could evaluate a mesh with viewport settings, and vice versa.

The functions are now merged into `mesh_create_eval_final()`, and the
hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed
entirely (instead of keeping it around as deprecated flag), because it
was always only temporarily set on objects during mesh evaluation and
thus not saved to the blend file.

No expected functional changes as far as users are concerned.
2020-08-18 12:58:48 +02:00
e371378c8b Cleanup: rename bdata to boundary
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8556
2020-08-18 12:48:56 +02:00
701a026d95 Merge branch 'blender-v2.90-release' into master 2020-08-18 12:46:17 +02:00
6df4b00f5f Fix IDProps definition still being editable in liboverrides.
One should be able to edit overridable IDProps values, but never their
settings/definitions.

Note that being able to add new IDProps to overrides is still a TODO.

Reported by Josephbburg (@Josephbburg) over blenderchat, thanks.
2020-08-18 12:43:42 +02:00
5aecc4b57b Fix Cloth Brush Grab deform types not working with spacing
Even the Cloth Brush grab works like a regular grab brush, it makes
sense to support spacing just in this brush in order to prevent creating
more brush steps that update the simulation. This way, it is possible to
create grab brushes that update the simulation constantly while grabbing
(using the dots stroke mode) or brushes that only update the simulation
when the cursor moves (using spacing).

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8568
2020-08-18 12:36:48 +02:00
Pablo Dobarro
e3eb53a5b3 Cleanup: Remove unused code in the Paint Cursor
This code was left here after the refactor, it was doing nothing and it
was causing an assert.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8579
2020-08-18 12:35:37 +02:00
762daacbc7 Fix Face Set Visibility operator using wrong active Face Set
The Face Set visibility operator was using the last active Face Set
updated by the paint cursor, so when the paint cursor is not used (when
using a filter or a transform tool), the active Face Set was not updating
and it was hidding the wrong Face Set based on the last cursor position
with a brush tool active. Now the Face Set Visitility operator has an
invoke callback wich forces a active vertex and face set update
regardless of the active tool, so it should always work correctly.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8580
2020-08-18 12:33:54 +02:00
cfeadaa295 Fix Mesh Filter deformation axis UI layout
This uses a single row for the three axis instead of a row per axis.

Reviewed By: sergey, Severin

Differential Revision: https://developer.blender.org/D8581
2020-08-18 12:32:58 +02:00
6a6cb83eb3 Fix T79568 EEVEE: Film transparent not working
Since world shader use the same standard output and are considered opaque,
we need to set alpha as holdout.
2020-08-18 12:26:22 +02:00
ca7414c4cb Fix Mask Slice deleting the Face Sets
This was a TODO in the code. Previously the Face Set datalayer was
deleted and recreated with a constant ID of 0. Now the datalayer is
preserved and set to the SculptSession after slicing the mask and a new
ID is calculated for the new faces that the slicing operation produced,
so they can be easily isolated for further tweaking.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8583
2020-08-18 12:20:05 +02:00
db4e08dfdc Sculpt: Expose the functions to create and init a SculptClothSimulation
This will be used for new features like supporting cloth deformation in
other brushes and tools outside of the cloth brush code.
No functional changes.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8602
2020-08-18 12:17:14 +02:00
5cd49e46f4 Added a sphere/grid test to mesh intersect performance tests. 2020-08-18 06:12:47 -04:00
c82166ffcd Cycles: move some Scene related methods out of Session
This moves `Session::get_requested_device_features`,
`Session::load_kernels`, and `Session::update_scene` out of `Session`
and into `Scene`, as mentioned in D8544.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8590
2020-08-18 11:50:37 +02:00
286fc2233d Merge branch 'blender-v2.90-release' into master 2020-08-18 11:39:36 +02:00
0b49fdd0ee Fix/cleanup Constraint poll function in liboverride cases.
Some constraint-specific operators, like set/clear inverse matrix of
childof constraint, are also valid on original, linked/overridden
constraints.

Similar change to what was done to modifiers poll function a few days
ago.

Reported by Josephbburg (@Josephbburg) over IRC, thanks.
2020-08-18 11:36:34 +02:00
400ab19702 Build deps: Enable SSE optimization for FFmpeg
The description is self-explanatory: enable SSE optimizations in the
FFmpeg library. They were disabled from the very beginning of the
dependency builder, possibly due to portability concerns.

FFmpeg does perform runtime check for available CPU microarchitectures,
so the codecs will still run on older hardware, but they will run way
faster on newer hardware.

For example, re-encoding 3405 2560x1376 frames on Xeon E5-2699 V4 CPU
went down from 313sec to 210.

Differential Revision: https://developer.blender.org/D8594
2020-08-18 11:17:26 +02:00
be30023c68 Merge branch 'blender-v2.90-release' 2020-08-18 09:52:20 +02:00
567e333ea4 Fix T79580: Control Mesh Only Partially Drawn After Filling a Surface From a Cage of Surface Curves
Differential Revision: https://developer.blender.org/D8600
2020-08-18 09:51:36 +02:00
ff3ecf4aa9 Merge branch 'blender-v2.90-release' 2020-08-18 08:39:13 +02:00
f94e322ab7 Fix T79770: Crash opening 2.83 .blend with linked collection containing greasepencil object in 2.91
The scene was null and could not be patched.
2020-08-18 08:36:26 +02:00
a8a048915e Cleanup: use view-zoom enum type 2020-08-18 12:30:10 +10:00
3c690aa4bc Merge branch 'blender-v2.90-release' into master 2020-08-18 12:29:15 +10:00
d1057890c4 Fix incorrect pixelsize use where DPI scale was intended
Changing line-width shouldn't scale cursor motion. Related to T79787.

Use dpi_fac for scaling curve error threshold & number button drag
threshold calculation.
2020-08-18 12:09:30 +10:00
6978635622 Fix T79787: orbit/zoom sensitivity depends on line-width
Use 'dpi_fac' instead of 'pixelsize' to scale input sensitivity
based on the interface scale.
Also use dpi_fac for view zoom operator.

Thanks to @ISS for investigating.
2020-08-18 11:44:16 +10:00
9085fb8073 Cleanup: expand UserDef pixel-size & DPI documentation
Avoid misunderstandings with UI scaling.
2020-08-18 11:17:15 +10:00
c65c66320f Merge branch 'blender-v2.90-release' 2020-08-17 21:11:29 +02:00
e157573fab Fix T77683: Cycles baking crash with motion blur enabled and no camera
specified

Maniphest Tasks: T77683

Differential Revision: https://developer.blender.org/D8593
2020-08-17 21:04:55 +02:00
45da0d20e6 VSE: make transform effect multithreaded
Multithreaded implementation can provide significant performance gain
on CPU's that can handle more parallel tasks.

On my 8 core system I got about 3.5x faster processing speed.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8585
2020-08-17 20:52:59 +02:00
8556e801a7 Fix T79594: Define rounding for armature edit props
Define `RNA_def_property_ui_range` for head and tail transform properties.
Step of 10 should match original behavior when tweaking value.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D8513
2020-08-17 20:49:38 +02:00
Stefan Werner
1c892e6814 Cycles: Fix local intersections in Embree for non-instancd geometry.
Embree's occlusion filter was checking against the wrong object ID
and not exiting correctly in case of a mismatch.

Fixes T79723
2020-08-17 20:41:34 +02:00
118e78a844 Merge branch 'blender-v2.90-release' 2020-08-17 20:39:07 +02:00
4b69e55da3 Fix T79757: Crash on prefetch when renaming strips
Original sequence lookup failed, becase name changed in another thread.
Fix is same as 0471349c90 - stop prefetching before changing content
of seqbase.

I have covered more cases, and added assert so it is more obvious that
issue is in lookup, and it shouldn't fail.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8592
2020-08-17 20:19:11 +02:00
ac41215f07 Tests: fix Alembic export test on Windows
Convert all `subprocess.run()` arguments to string, to prevent breaking
"does this argument need quoting" checks on Windows.
2020-08-17 20:08:01 +02:00
c6a99e021a Clang tidy: Fix else after return 2020-08-17 14:00:42 -04:00
2b896fc481 Fix T79052: Cycles new sky texture fails with sun size zero
Clamp to a minimum angle to avoid precision issues.
2020-08-17 17:57:29 +02:00
108f3284a7 USD: Allow exporting of invisible objects
The fix for T75936 made it possible to export invisible objects to
Alembic. This commit applies the same approach to the USD exporter.

The USD and Alembic code is slightly different in terms of where in the
exported file the visibility attribute is stored. In USD the visibility
is used to prune the scene graph, and thus there are only two options:
"hidden" and "inherited". Setting the visiblity of a node in the scene
graph to "hidden" immediately hides all its children. To allow hidden
parents with visible children, the visibility is stored on the object
data (so the geometry/camera/lamp/etc) instead.
2020-08-17 17:56:05 +02:00
271361e31f IO: Add test for iterating over invisible objects
Add a test that checks invisible objects are iterated over by the
`IO::AbstractHierarchyIterator` class, when a suitable depsgraph is given.

No functional changes.
2020-08-17 17:56:05 +02:00
a95f863596 Fix T75936: Alembic, allow exporting of invisible objects
Add a new depsgraph builder class that includes invisible objects and
use that in the Alembic exporter.

Alembic supports three options for visibility, "visible", "inherited",
and "hidden". This means that parents can be hidden and still have
visible children (contrary to USD, where invisibility is used to prune
an entire scene graph subtree). Because of this, the visibility is
stored on the transform node, as that represents the Object in Blender
and thus keeps the Alembic file as close to Blender's own structure as
possible.

Reviewed By: Sergey

Differential Revision: https://developer.blender.org/D8595
2020-08-17 17:56:05 +02:00
fd3086833a Cleanup: IO, reduce code duplication in USD and Alembic exporters
Move the object visibility check from Alembic/USD-specific code into the
`io/common` module.

No functional changes.
2020-08-17 17:56:05 +02:00
04ae290024 Cleanup: Alembic, rename test in CMake for consistency
Rename test `alembic_tests` to `alembic_export_tests`, so that its name
is consistent with the Python file containing the tests,
`alembic_export_tests.py`.

No functional changes.
2020-08-17 17:56:05 +02:00
9c241eae48 Fix T79597: Crash with dyntopo after paint cursor refactor
The paint cursor now uses a single call to
SCULPT_cursor_geometry_info_update and the Sculpt API to update both the
radius and the SculptSession data, so random access needs to be
initialized for dyntopo before using API functions.

Reviewed By: sergey

Maniphest Tasks: T79597

Differential Revision: https://developer.blender.org/D8489
2020-08-17 17:34:08 +02:00
fd6725cbfb Merge branch 'blender-v2.90-release' into master 2020-08-17 16:45:30 +02:00
c7a7a38b65 Fix T79633: ovrride apply code broken with RNA-defined runtime IDProps in some cases.
When copying between a set RNA runtime property and an unset one, code
would not behave properly.

We have to also consider NULL 'override apply' callback pointer as a
valid 'use default override apply function' case.
2020-08-17 16:44:36 +02:00
Stefan Werner
d88721879b Cycles: Fix local intersections in Embree for non-instancd geometry.
Embree's occlusion filter was checking against the wrong object ID
and not exiting correctly in case of a mismatch.

Fixes T79723
2020-08-17 16:04:01 +02:00
449ccb7b30 Fix typo: missing f string prefix in Alembic export test 2020-08-17 15:16:20 +02:00
6b6de5beba Cleanup: Alembic tests, add note explaining how the export tests work
No functional changes.
2020-08-17 14:07:45 +02:00
ad459302ce Cleanup: rename alembic_tests.py to alembic_tests_export.py
Rename `alembic_tests.py` to `alembic_tests_export.py`, as this makes it
clearer what is being tested.

No functional changes.
2020-08-17 14:07:45 +02:00
4a2ff0fef8 Tests: Better error reporting in AbstractAlembicTest
Instead of checking for the length of a list, just handle the error that
occurs when the length is incorrect.

No functional changes to any actual test.
2020-08-17 14:07:45 +02:00
38752944f8 Fix formatting bug in AbstractAlembicTest class
Replace `formatstring, value` with the correct `formatstring % value`.

No functional changes to any actual tests.
2020-08-17 14:07:45 +02:00
e14de692fc UI: Only draw node menu search if categories exist
Currently, the search operator in the node add menu NODE_MT_add is drawn
even if no node categories exists. This patch only draws the operator if
at least one node category passes the poll.

This patch is needed because some add-ons use custom search operator and
do not register node categories. In this case, it is undesirable to have
a search operator drawn that do nothing and is not used. One such add-on
is Animation Nodes.

Reviewed By: Jacques Lucke

Differential Revision: https://developer.blender.org/D8576
2020-08-17 13:43:19 +02:00
8fda93a405 Cleanup: Change BLI_bitmap for BLI_edgeset for internal springs
The BLI_bitmap had the potential to eat a lot of memory as it was a
dense map between all the vertices in the mesh.

Now we instead use BLI_edgeset so that we only store data when needed
(creating a spare map instead of a dense).
2020-08-17 12:39:40 +02:00
b2d9020aa5 Fix T77340: nested nodes alpha issues
Reviewers: Severin

Differential Revision: https://developer.blender.org/D8573
2020-08-17 12:34:49 +02:00
68651534c2 Fix T77267: Render EEVEE AO pass when AO disabled.
In EEVEE the AO renderpass influenced other render passes. Until now the
pass wasn't selectable when AO was disabled in the scene to remove these
render artifacts.

This patch allows rendering EEVEE AO pass without enabling it in the
scene. It does this by binding a fallback texture that is used by the
surface shaders.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7956
2020-08-17 11:10:32 +02:00
3d47da9e4c Fix error in recent bpy_interface.c split (missed moving define)
Error in 7341ceb674, this missed moving a local-define when splitting.
2020-08-17 18:53:21 +10:00
6b5582c7f7 Fix: Workbench Depth Of Field Crash
Depth of field compilation failed due to recent refactoring. This only
happened in blender 2.91. This change uses the shader lib to find
dependencies.
2020-08-17 10:50:22 +02:00
0967935b42 Cleanup: split BPY_run_string_ex into two functions
Using a boolean to select between eval/exec behavior wasn't very
readable.
2020-08-17 18:32:20 +10:00
7341ceb674 Cleanup: move Python script execution into BPY_extern_run.h
This commit renames 'execute' to 'run' because:

- This follows Python's "PyRun" which these functions wrap.
- Execution functions can use either exec/eval modes,
  making naming awkward (for future API refactoring).
2020-08-17 18:32:20 +10:00
397cec6a4d Cleanup: Pass 'FILE *' instead of 'void *' for BPY_python_backtrace
This was committed as a temporary workaround in 82150f5641
as release builds were failing (only debug builds worked).

This adds `stdio.h` to the header which is now split into a file that
contains more specialized functionality.

Also move function body inside BPY_python_backtrace,
removing PyC_StackPrint as we have PyC_StackSpit() for
similar functionality that can be called from a debugger.
2020-08-17 18:31:04 +10:00
f8c0d63cdb Cleanup: split BPY_extern_python into it's own header
Currently BPY_extern.h includes too much mixed functionality.
2020-08-17 17:20:12 +10:00
0b4a365183 Cleanup: sort CMake path lists 2020-08-17 12:40:03 +10:00
9a4c019255 Cleanup: header order, trailing space 2020-08-17 12:39:08 +10:00
bee4a2f97c Cleanup: use 'use_' prefix for RNA booleans 2020-08-17 12:35:26 +10:00
9762c3892e Cleanup: spelling 2020-08-17 12:34:05 +10:00
cafe5cd9b0 Cleanup: explain why checking the enabled state twice is needed
Address concern raised with the commit that added this extra check.
2020-08-17 12:33:07 +10:00
f65a50d794 Tweaked the performance debugging gathering. 2020-08-16 19:01:52 -04:00
cce4bafc53 Add support for non-closed-volume arguments.
Use a "generalized winding number" calculation to get an inside/outside
test that works reasonably well when meshes aren't closed.
This change allows one to use a plane as the cutter in a difference
operator and get the expected results.
2020-08-16 11:05:58 -04:00
5c78c16b14 UI: Simplify cloth filter type description
Remove extra words in the message and avoid repeating
the name in the description.
2020-08-16 08:57:46 -04:00
4f57e1aaea Merge branch 'blender-v2.90-release' 2020-08-16 08:54:27 -04:00
8010cbe620 Fix T79823: Typo in cloth filter type description 2020-08-16 08:54:07 -04:00
b0b0d9f2cf Merge branch 'blender-v2.90-release' into master 2020-08-16 21:21:20 +10:00
59bc71d69b Fix popups opening in the wrong direction over headers
Checks for header alignment didn't account for tool-header & header
having different alignment.

There is no reason to use a lookup function on the area
(ED_area_header_alignment) as we already have region.

Check the regions alignment directly, remove access functions.
2020-08-16 21:14:26 +10:00
d5d83b71f7 Merge branch 'blender-v2.90-release' into master 2020-08-16 14:21:04 +10:00
73fb445b8d Fix T78426: Header flips when changing editors
The existing header flip detection didn't account for mixed
tool-header and header flipping & visibility between space-types.

Now alignment syncing handles any combination of header,
tool-header & footer flipped state, in a way that can be extended
to other region types in the future.
2020-08-16 14:18:40 +10:00
93304b483a Cleanup: Quiet GCC maybe uninitialized warning
There was a false positive here. Thankfully, marking the button's type
as constant can quiet the warning.
2020-08-15 22:20:40 -04:00
06696ab0bd Let Boolean be seen in edit mode, if enabled.
Since the beginning of time, Boolean has not supported this.
While it might be too slow for some uses, it seems that the user
should be able to decide whether to use it or not.
2020-08-15 13:21:36 -04:00
2c61c3d733 deps_builder: Fix boost::python linking release python library
By default boost::python in debug configuration links the release
python libraries. Which leads to loading issues with the produced
modules in a debug blender (which does use the debug python libs)

Bjam has an option to switch this to the debug libraries but when
you switch that on it changes the library names for *all* boost
libraries, even ones that don't have anything to do with python
and even the release libraries.

therefore an alternative way has been chosen and we're dealing
with this by adding a define rather than asking bjam to do it.
2020-08-15 11:06:16 -06:00
eba77a95fc Fixed a bug in dissolving triangulation edges.
If an original face was divided into triangles with different
orientations, the program would crash. Fixed now.
2020-08-15 13:03:13 -04:00
abd7b1c20e Merge branch 'master' into newboolean 2020-08-15 08:24:19 -04:00
4d9d12a48f Added more debugging help. 2020-08-15 07:22:25 -04:00
199e308670 Fix T79790: GPencil sculpt strength icon changed in recent cleanup
This commit restores the vertex colors which were lost in the cleanup.
2020-08-14 16:53:14 -04:00
80982941bd Merge branch 'blender-v2.90-release' 2020-08-14 16:39:35 -04:00
c300fc56c3 UI: Fix type in multires modifier subpanel
Thanks to @zanqdo for reporting "Subdivions"

Also remove the empty space I left for the "Delete Lower" operator that
never made it into 2.90.
2020-08-14 16:34:48 -04:00
36e4d4af5b Fix T79772: Gpencil. Additive drawing doesn't work when creating fills
This option was not supported in Fill tool
2020-08-14 19:05:05 +02:00
f491442eb0 Merge branch 'blender-v2.90-release' 2020-08-14 13:01:05 -04:00
9ab3b8f7f4 UI: Remove cutoff text in popovers for 2.90 release
Many of these popovers could use a design pass in 2.91, but for 2.90 we
don't want to change any UI strings at this point, so the best way to
solve the cutoff text is to widen the popovers. Sadly this won't affect
popovers when other languages besides English have longer strings, but
solving that is a much larger task.

Another benefit is that tweaking sculpt / paint brush options feels much
less cramped with slightly wider popovers.

I only know of one string that is still slightly cutoff by default with
this patch, the "Max Element Distance" property of the pose brush in the
sculpt mode brush settings popover. But I didn't think it was worth
widening that popover more to deal with that one case.

Differential Revision: https://developer.blender.org/D8575
2020-08-14 12:58:24 -04:00
e037c7230d Merge branch 'blender-v2.90-release' 2020-08-14 17:58:05 +02:00
04f703fca6 Fix warning when compiling on Linux with WITH_XR_OPENXR enabled 2020-08-14 17:57:24 +02:00
e8dfe91767 Merge branch 'blender-v2.90-release' 2020-08-14 17:18:09 +02:00
b3c08a3a0a Fix constant lighting change in VR view when rotating head
We have to explicitly enable fixed world space lighting. This was in
fact already done, but overridden by the code to sync the 3D View
shading settings to the VR view.
2020-08-14 17:03:10 +02:00
c074943dfd Fix undefined behavior with --debug-xr
Mistake in cb578ca104. Before that, the extension vector was static,
to make sure the extension name strings wouldn't get destructed when
leaving the function. I didn't think that was an issue and couldn't
recreate one, because until the previous commit we wouldn't actually
add any extensions to the vector on Windows (the system I tested
with).

Use C++17's `std::string_view` now, which avoids the string copies
`std::string` creates for itself and thus its destruction when leaving
the local scope.
2020-08-14 17:03:10 +02:00
77e4905b17 Fix --debug-xr not outputting OpenXR debug prints on Windows
The OpenXR debug extension was disabled on Windows as a workaround. This
was an old leftover from when there was only the Windows Mixed Reality
runtime on Windows. The debug extension didn't work for it and we didn't
have a way to disable it just for Windows Mixed Reality.
Now it seems to work though, so we remove the workaround. If specific
runtimes still have trouble with the extension, we can disable it
specifically for these runtimes now.
2020-08-14 17:03:10 +02:00
d958ab62e7 Fix NULL pointer access in render engine reported by address sanitizer
This may not have caused an actual bug.
2020-08-14 16:49:22 +02:00
690d76c624 Fix T79769, T79768: crash tweaking volume settings with Cycles viewport render
Refitting the BVH does not work in this case, it needs to be fully rebuilt.
2020-08-14 16:49:08 +02:00
d117520aa2 Merge branch 'blender-v2.90-release' 2020-08-14 16:00:54 +02:00
cb578ca104 Fix/workaround graphics issues breaking SteamVR use with Blender
Windows only workaround. I'll have to investigate Linux separately.

Steam's OpenGL compatibility is still new and doesn't work for us yet
(neither does it for standard OpenXR examples from what I've heard and
seen myself). We can work around that by falling back to our DirectX
compatibility layer.
Note that this DirectX compatibility still doesn't work for some
systems, see T76082.

Implementation note: Since the graphics binding extensions have to be
enabled before we can find out which runtime is in use (e.g. SteamVR vs.
Oculus, etc), we can now enable multiple graphics binding extensions but
settle for a single one to use later.

Once the SteamVR OpenGL backend works, we can remove this workaround
again.

Fixes T78267.
2020-08-14 16:00:03 +02:00
6a561367d0 Merge branch 'blender-v2.90-release' 2020-08-14 13:29:03 +02:00
ab3a651515 Fix offset applied on top of VR landmark with no positional tracking
On VR session start with positional tracking disabled, the pose would
have an offset applied but it was supposed to start exactly at the
landmark position.

Issue is that we applied the offset to cancel out the position offset
reported by the OpenXR runtime incorrectly. We only want to do that if
positional tracking is enabled, because if not we don't even apply the
runtime's position offset. So we'd cancel something out that wasn't
there.
2020-08-14 13:27:09 +02:00
cc6c52768a BLI: add reverse iterators, iterator constructor and Vector.insert/prepend
The new reverse iterators behave as the reverse iterators for contains from
the standard library. Have a look at the tests to see how to use them.
Using them will hopefully become easier with ranges in C++20.

A Vector can now be constructed from two iterators, which is very common
in the standard library.

New Vector.insert methods allow adding elements in the middle of a vector.
These methods should not be used often in practice, because they has a linear running time.

New Vector.prepend methods allow adding elements to the beginning of a vector.
These methods are O(n) as well.
2020-08-14 13:16:44 +02:00
2d65336408 Cleanup: C++ code style for Ghost-XR
* Avoid deep copy of vectors (technically more than a cleanup).
* Use `std::make_unique` for allocating unique pointers, rather than
  manual `new`.
* Use `std::optional` for optional by-value return values, rather than
  C-style `bool` to indicate success + return-argument.
* Use references rather than pointers for non-optional arguments.
* Avoid manual `new`/`delete`. Use `std::unique_ptr` for local scope
  bound lifetime.
* Use C++ `nullptr` rather than C's `NULL`.
* Remove unnecessary friend declaration.

These changes are generally considered good practise and move us more to
a "modern C++" style. We can still go much further of course.
See https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.
2020-08-14 12:37:53 +02:00
1ff1b7fcea Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-14 11:38:54 +02:00
4c625df759 Fix: Increase Viewport Sculpt Options panel width
The "Delay Viewport Update" label was showing only:
"Delay Viewport U..."
2020-08-14 11:36:40 +02:00
24f7f33c25 Merge branch 'blender-v2.90-release' 2020-08-14 10:40:57 +02:00
a5cf71fa5d Fix (unreported) sculpt vertex color panel visible for all object types
Since DATA_PT_sculpt_vertex_colors has its own poll() we need to call
the poll() of MeshButtonsPanel as well

Differential Revision: https://developer.blender.org/D8563
2020-08-14 10:35:30 +02:00
d0c0a2e392 UI: Correct grammar in property name and description 2020-08-13 22:13:43 -04:00
cd179b5048 UI Code Quality: Use derived struct for color ramp buttons
The same changes as rB570044e9f412 and rB0ab21bf06ae0.
2020-08-13 22:00:50 -04:00
0ab21bf06a UI Code Quality: Use derived struct for curve mapping buttons
The same changes as in rB570044e9f412.
2020-08-13 21:33:47 -04:00
570044e9f4 UI Code Quality: Use derived struct for curve profile buttons
Continuing the work from rB49f088e2d093.

Differential Revision: https://developer.blender.org/D8561
2020-08-13 21:00:54 -04:00
275f1039d2 GPencil: Fix keymap error for Fill Boundary strokes
The key to enable it is `Alt`
2020-08-13 20:18:30 +02:00
ebf5ff8afb GPencil: Display Fill Boundary strokes with stroke color
This feature was removed during the refactor, but it's needed for this type of strokes to display the line using the stroke color without checking if the stroke is enabled or not in the material.

This color is used only for these special strokes.
2020-08-13 20:18:29 +02:00
e691a3a9b7 Deps_builder: Update openvdb to a dynamic library
This patch changes openvdb from a static to a dynamic library.
this is in preparation for enabling pyopenvdb at some point
in the future.

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

Reviewed by: brecht
2020-08-13 11:42:05 -06:00
aabbb515d6 UI: Use consistent geometry icon color
The grease pencil weight sculpt icon was using a slightly different
shade of blue than the other icons.
2020-08-13 12:13:21 -04:00
0664194497 UI: Simplify more geometry icons
Again, no visual changes, just removed internal vertices where they
were unecessary.
2020-08-13 12:09:20 -04:00
c5519d4b6f Fix T78065: OSL shader compilation fails on macOS 2020-08-13 17:53:48 +02:00
4ff414d40d Merge branch 'blender-v2.90-release' into master 2020-08-13 17:48:41 +02:00
9813778a2d Fix T79591: Liboverride: do not update overrides on missing linked data.
It makes no sense to generate/update overrides from missing (broken
linked) reference data, just keep existing ones unchanged then.
2020-08-13 17:41:33 +02:00
53683dec7d UI: Simplify geometry icons
Many of the icons had lots of interior geometry left over from
subdivision. In these cases we should remove the interior geometry
and leave the object with the modifier for the future.
2020-08-13 10:30:08 -04:00
52e7d0bebe Merge branch 'blender-v2.90-release' 2020-08-13 10:05:20 -04:00
4e103101f7 UI: Add sculpt cloth filter tool icon
This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision: https://developer.blender.org/D8467
2020-08-13 10:04:48 -04:00
f66fc94da6 UI: Add sculpt cloth filter tool icon
This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision: https://developer.blender.org/D8467
2020-08-13 10:03:44 -04:00
6fe609d4c3 Sequencer: Implement zoom-to-fit view mode
In this mode the preview image is always using the most of the preview
area space: it is scaled to fit, preserving aspect ratio. This makes it
possible to always have maximum of the preview region even after resize
of other areas.

This mode is enabled by default, is available in the View -> Zoom to Fit
menu. It is enabled when View All (Home key) is used, and is disabled
when manual navigation ([panning, zooming) is performed.

There is no versioning code, which means existing files will open as-is,
but new projects will have this option enabled.

Ref T78987

Maniphest Tasks: T78987

Differential Revision: https://developer.blender.org/D8549
2020-08-13 15:24:21 +02:00
0df28e8c20 View2D: Inform region type on current view changes
Allows to hook per-space code which is to be run on view navigation.
This is required to have zoom-to-fit implemented in the sequencer.

There might be more cases where the clalback is to be called from,
but it could be easier to address those on the case-by-case basis
when its needed.
2020-08-13 15:24:21 +02:00
c27123632b View2D: Centralize handling of changes to v2d->cur
Currently there are no functional changes, preparing code to add more
functionality which is to be run from navigation/zoom operators.
2020-08-13 15:24:21 +02:00
4f209fab2c Fix T79082: Softbody self-collision does not work on lattices
Reviewers: zeddb

Differential Revision: https://developer.blender.org/D8562
2020-08-13 14:41:44 +02:00
b89521de21 UVEdit: Fix drawing after recent refactor 2020-08-13 14:27:16 +02:00
a6447ca72d GPU: Fix MSVC warning 2020-08-13 14:20:24 +02:00
d52f28380b GPU: Fix issue with MDI and recent refactor 2020-08-13 14:20:24 +02:00
f349ea5508 GPUDrawList: Fix gl error with drawing without the correct VAO bound 2020-08-13 14:20:24 +02:00
985070b1ce GPUShader: Add more uniform functions 2020-08-13 14:20:24 +02:00
ac60a67b3f Cleanup: GPU: Remove Batch vao cache reset
This is done at drawtime automatically.
2020-08-13 14:20:24 +02:00
efc97b3919 GPUBatch: GL backend isolation
This changes the drawing paradigm a bit. The VAO configuration is done
JIT-style and depends on context active shader.

This is to allow more flexibility for implementations to do optimization
at lower level.

The vao cache is now its own class to isolate the concept. It is this
class that is reference by the GLContext for ownership of the containing
VAO ids.
2020-08-13 14:20:24 +02:00
47bfb0f7ad GPUBatch: Move allocator to backend 2020-08-13 14:20:24 +02:00
9443da6166 GPUBatch: Merge phase and ownership flags and cleanup there usage
Also add new flags to communicate specific behavior to future backend.
2020-08-13 14:20:24 +02:00
e0f5f95e66 DRW: InstanceData: Remove hacks of batch freeing callback
We instead use a handle reference counter on the GPUVertBufs used by
the instancing batches. This make sure that if an update happens on the
GPUVertBuf used to contruct the batch, they will never have the same
memory address than the previously allocated ones (since they are still
pending deletion thanks to the refcounter).

This avoid the linear search to update the GPUBatch in the case a
batch is deleted (which was even a bad option since they could be only
cleared)
2020-08-13 14:20:24 +02:00
157f2a20e6 GPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc 2020-08-13 14:20:23 +02:00
00a3c297d2 GPUVertBuf: Add handle refcount
A handle refcount is here to avoid freeing of the GPUVertBuf datablock
if it is still referenced somewhere else.

This does not prevent deleting the actual data. This is to avoid too
much zombie data usage.

This is in order to avoid most hacks inside `draw_instance_data.c`.
2020-08-13 14:20:23 +02:00
93165cbf47 GPUBatch: Remove most use of GPU_batch_draw_advanced()
This is in order to better encapsulate / isolate the drawing code.
2020-08-13 14:20:23 +02:00
de4eb115ac Cleanup: GPUBatch: Remove GL functions from uniform assignment 2020-08-13 14:20:23 +02:00
b0f30bd684 Cleanup: GPUBatch: Move gpu_batch_private.h to CPP header 2020-08-13 14:20:23 +02:00
16b28ff974 Cleanup: GPUShader: Remove unused code 2020-08-13 14:20:23 +02:00
854c999d82 GPUShader: Change shader state tracking to be part of the GPUContext
This remove the use of batch->program and replace it with batch->shader.

This will allow GL abstraction latter.
2020-08-13 14:20:23 +02:00
186abf7d3b GPUBatch: Remove usage of gl_prim_type outside of GPU module 2020-08-13 14:20:23 +02:00
38ef35b1ed GPUDrawList: GL backend isolation 2020-08-13 14:20:23 +02:00
cb2565195e Fix T65148: Drivers can't access shape keys
It was impossible for drivers to use shape key properties, modifiers
generate a new mesh. After mesh evaluation the shape keys are no longer
necessary, and because of this the `key` pointer was not copied. As
drivers work on evaluated data, however, they do need this `key`
pointer.

This commit makes the `key` pointer available in evaluated meshes, but
this is somewhat dangerous. There was an explicit reason why the key on
result was kept at null pointer: to have the evaluated mesh in a
consistent state. Assigning this pointer makes it potentially
inconsistent, as the evaluated mesh and the original shape key may have
different topologies.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7785
2020-08-13 13:56:41 +02:00
46aa302400 Merge branch 'blender-v2.90-release' 2020-08-13 11:50:07 +02:00
ada98869df Preferences: correct property description for keyitem restore
Spotted while checking T79657.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8517
2020-08-13 11:44:57 +02:00
0843d5b024 Fix T79743: baking still uses cage object after removal 2020-08-13 11:30:56 +02:00
28c1300115 Fix T79653: Change soft min frame start of cache from 1 to 0
It was always possible to set it to zero by typing in the value.
This new soft limit is more consistent with the fluid cache
and the Scene.frame_start property.
2020-08-13 11:03:05 +02:00
7c380119a7 GPencil: Remove unused parameter and fix warning 2020-08-13 08:39:46 +02:00
29c28ac022 Cleanup: incorrect comment wrapping
Missed this comment when updating fix for T77409.
2020-08-13 16:38:01 +10:00
e84ffae7ba Cleanup: warnings 2020-08-13 16:23:43 +10:00
357547b010 Cleanup: spelling 2020-08-13 16:21:10 +10:00
608ec79bc3 Cleanup: clang-format 2020-08-13 16:01:38 +10:00
38b5f56dad Merge branch 'blender-v2.90-release' into master 2020-08-13 15:46:55 +10:00
f875d3e504 Merge branch 'blender-v2.90-release' into master 2020-08-13 15:46:46 +10:00
ad05e1100f Fix T77409: Crash showing vertex/face duplicators in edit-mode
This was a regression in deaff945d0 which skips copying a mesh.
Dupli-verts/faces were not updated to account for this.

This supports iterating over edit-mesh vertices & faces,
since falling back to a full copy (as we do in some places)
will be slow while transforming geometry.

This commit looks as if it would change behavior with orcos,
since any edit-mesh deformation causes them to be assigned.
However in practice there is no functional change, details in comments.
2020-08-13 15:41:57 +10:00
9bf8b6799d Cleanup: remove two sided face check
Two sided faces aren't supported and would cause many issues elsewhere.
2020-08-13 15:41:57 +10:00
ee909783de Cleanup: use 'inst_ob' variable name for consistency
Dupli verts/faces named these arguments differently.
2020-08-13 15:41:57 +10:00
494560f19d Cleanup: remove unused struct members from dupli-face/vert
Replace the evaluated mesh with VertexDupliData.mvert since only
vertices are used. This makes dupli-vert similar to how dupli-face
was already working.
2020-08-13 15:41:57 +10:00
a45f2fd1fb Cleanup: move mesh access for dupli vert/face into shared function
De-duplicate mesh access & comments.
2020-08-13 15:41:57 +10:00
12c24ecf6e Cleanup: pass normal as a float to dupli-vert function
Needed for supporting edit-mode dupli-verts.

Currently the un-scaled short values are used to avoid
changing behavior (noted in comments).
2020-08-13 15:41:57 +10:00
51a461dcab Cleanup: spelling, use full sentences for object_dupli.c 2020-08-13 15:41:52 +10:00
f0285e347e Cleanup: use const for dupli vert/face, 'r_' prefix for return value
Make it obvious which values are used read-only, which are written to.
2020-08-13 14:03:46 +10:00
536b6b6376 Merge branch 'blender-v2.90-release' 2020-08-12 21:04:19 -04:00
pembem22
bb2908472c UI: Fix curve widget fill artifacts
Disable antialiasing which caused artifacts.

Differential Revision: https://developer.blender.org/D8497
2020-08-12 21:02:05 -04:00
579cb774da Fix hair collision error introduced in recent commit 2020-08-12 18:40:48 -03:00
5319eb36a5 Cleanup: Silence some arithmetic overflow warnings 2020-08-12 18:25:45 -03:00
c5e469a3e4 Cleanup: Move definitions of some variables closer to their use 2020-08-12 18:25:45 -03:00
7d16db417b Cleanup: move assignment out of loop 2020-08-12 18:25:45 -03:00
6d9358d453 Cleanup: Rename variable 'cloth1' to 'cloth' 2020-08-12 18:25:45 -03:00
ca827e36ac Fix Boundary Brush symmetry with no constant falloff
When using constant falloff symmetry was working fine because the same
deformation is applied twice on the same vertices. When using no
constant falloffs, the deformation is different between symmetry passes,
so vertices need to be separated by symmetry areas to get the right
deformation from its symmetry pass without being overwriten by the next
one.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8541
2020-08-12 23:07:52 +02:00
1260baf16b GPencil: Remove unused variable and fix memory leak
This was missing in previous commit
2020-08-12 23:07:27 +02:00
c77bf95221 Sculpt: Boundary Brush Falloff Types and Offset
This adds the boundary_falloff_type and boundary_offset to control how the
falloff of the Boundary Brush is applied.

Boundary Origin Offset is the same concept as the Pose Origin offset in
the Pose Brush. It is a multiplier that adds extra length to the brush
radius to locate the deformation pivot further from the boundary without
affecting the falloff.

The Falloff type includes Constant (previous default), brush radius, loop
and loop and invert. Loop and Loop and Invert can be used to create
deformation patterns in a mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8526
2020-08-12 23:06:42 +02:00
db7cfd03b0 GPencil: Remove unused parameter in convert curve
The only_stroke parameter is not used
2020-08-12 22:48:19 +02:00
e188a798c6 GPencil: Clean material list when convert a curve
Now the list of materials is cleanup and any duplicated material is removed.
2020-08-12 22:48:14 +02:00
cd49c7b5ea GPencil: Move merge similar materials code to BKE
This is required in other places and need to be shared.
2020-08-12 22:48:10 +02:00
01636ed159 GPencil: Fix unreported problem in merge similar materials
When two similar colors were adjacent, the colors were not merged.
2020-08-12 22:48:06 +02:00
b126e38f6b GPencil: Fix unreported error in merge similar materials
When the color was black, the original value was not initialized and get a NaN value with unexpected results.

Also cleanup code.
2020-08-12 22:48:00 +02:00
3d247abb78 GPencil: Remove unused lines 2020-08-12 22:47:56 +02:00
145445c6b4 GPencil: Recode all material management when convert SVG 2020-08-12 22:47:51 +02:00
504c257dae GPencil: Add Sample parameter to Convert curve
This allows to resample the stroke to avoid too dense geometry.
2020-08-12 22:47:47 +02:00
9abdafe840 GPencil: Add parameters to scale thickness when convert Curves
This parameter allows to scale the thickness.
2020-08-12 22:47:43 +02:00
19cef4073d GPencil: Interpolate thickness when convert Curve to GPencil
The curve was using only the last point radius of the segment. Now, the value is interpolated between start and end points.
2020-08-12 22:47:38 +02:00
54b3168c4a Fix T77424 Overlay: Editmode: Issue with multi edit and in-front option
This is a nice addition to the refactor. Now any combination of in-front
/ not in-front will work in non x-ray edit mode.
2020-08-12 19:57:23 +02:00
f21cdf0d12 Clenaup: Deduplicate cloth collision code
And do the clamp by vertex instead of triangle.
2020-08-12 14:49:59 -03:00
633b0d6d25 Merge branch 'blender-v2.90-release' 2020-08-12 19:26:31 +02:00
ba2d1c8898 Fix T79738: Double Click does not opening folders in File Browser
If the File Browser was used in regular editor mode (e.g. not through an
operation like File > Open), the operator that usually opens files and
directories wouldn't execute. We need to keep two operators for
double-click in the keymap so selecting and opening works in all cases.

Caused by c606044157.
2020-08-12 19:26:04 +02:00
eee88f7cec Merge branch 'blender-v2.90-release' into master 2020-08-12 19:03:32 +02:00
b3165fb8b5 Fix (unreported) glitch when making liboverride of object from IDtemplate.
We need to ensure new override is instantiated in the scene...

Reported by @Severin, thanks.
2020-08-12 19:03:03 +02:00
337b6d0758 Cleanup: Use const for context 2020-08-12 12:59:19 -04:00
1da053956a UI: Category support for instanced panels
This adds support for panel categories to the instanced panel system
used for modifiers and others. The change is pulled from D7997 where
it is needed for FCurve modifiers, but it is unused now.

The change is simple and basically amounts to checking the panel
category where it was overlooked before.
2020-08-12 12:56:10 -04:00
6238eabcd4 Merge branch 'blender-v2.90-release' 2020-08-12 18:50:40 +02:00
54c2c14921 CMake: clarify that the modules are licensed BSD 3-Clause
Many of these are derived from similar modules in the CMake project, which
have this license.

Fixes T79715
2020-08-12 18:49:16 +02:00
655091297f Fix T79736: install_deps.sh failing to download OpenImageIO due to wrong version 2020-08-12 18:38:29 +02:00
478ea4c898 Sculpt: Multires Displacement Eraser Brush
This brush deletes displacement information of the Multires Modifier,
resetting the mesh to the subdivision limit surface.
This can be use to easily delete parts of the sculpt or to fix
reprojection artifacts after applying a shrinkwrap.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8543
2020-08-12 18:26:56 +02:00
6a95f05d65 deps_builder: Optionally build boost::python
This this adds the option of building boost::python
in the libs builder, in preparation for future
dependencies that require it (ie pyopenvdb)

disabled by default, can be enabled with the
`WITH_BOOST_PYTHON` cmake option.

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

Reviewed by: brecht
2020-08-12 10:17:38 -06:00
240ac779d5 Merge branch 'blender-v2.90-release'
# Conflicts:
#	source/blender/draw/engines/eevee/eevee_motion_blur.c
2020-08-12 18:16:47 +02:00
58a457da3d Fix T79680, T79680: confusing viewport denoise start sample behavior 2020-08-12 18:10:50 +02:00
6f502136c7 Fix T79718: Eevee OpenVDB render error when frames miss part of the grids 2020-08-12 18:10:50 +02:00
77e40708c2 Sculpt: Expose Edit Face Set as a tool
Previously the way to use this operations was using the shortcut Ctrl +
W and Ctrl + Alt + W, which was not very discoverable and it was
limiting the amount of options that can be added to the operator.Now the
same functionality of the operator is available as a tool, which will
make easier to add other editing operations and options without adding
more entries to the keymap.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8545
2020-08-12 18:09:27 +02:00
bff91b32aa Fix T79706: Delta Transform Animation not working
The object "delta_" rna variables were not added to the depsgraph search
and thus it would not trigger updates of the object during animation
playback.
2020-08-12 18:09:00 +02:00
051f067fb8 Fix T79706: Delta Transform Animation not working
The object "delta_" rna variables were not added to the depsgraph search
and thus it would not trigger updates of the object during animation
playback.
2020-08-12 18:07:29 +02:00
2218b61e8e Fix T79637 Motion blur gives artifacts when changing the camera
DRW_render_set_time is calling RE_engine_frame_set will in turn calls
BKE_scene_camera_switch_update.

To workaround this, we get the original camera object at render init and
get the evaluated version from it after each time change.
2020-08-12 18:06:36 +02:00
879ed5a165 EEVEE: Motion Blur: Fix issue with batch overflowing with VBOs 2020-08-12 18:06:36 +02:00
bea79e0c7b EEVEE: Fix dupli recursion constant 2020-08-12 18:06:36 +02:00
1eab858dbc EEVEE: Rework deformation motion blur
This change how motion data are indexed inside the ghash.
We follow cycles closely now and use evaluated ID pointers.

By removing the hack, it fixes T78561 (No Motion Blur on linked objects)
2020-08-12 18:06:36 +02:00
2b042d885a EEVEE: Motion Blur: Use evaluated object as key to motion data
This fix issues with instanced geometry and modifiers. Since the
depsgraph will duplicate the objects when they have different modifiers,
the evaluated object are garanteed to be unique.
2020-08-12 18:06:36 +02:00
ff4b5d00e4 Cleanup: Remove explicit float casts in sculpt code
Differential Revision: https://developer.blender.org/D8553
2020-08-12 18:04:06 +02:00
010911d722 Clenaup: Rename random_access_init to random_access_ensure
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8529
2020-08-12 18:02:47 +02:00
9f288490d5 Subdiv CCG: Cleanup, remove redundant casts
If one of the operands of a binary operator a float, integer
operand gets promoted to float as well.

Differential Revision: https://developer.blender.org/D8552
2020-08-12 17:51:15 +02:00
697c449578 Cleanup: Use clamp_f instead of CLAMP in sculpt code
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8528
2020-08-12 17:49:55 +02:00
2476b31c71 Fix Sculpt Filters operator naming
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8523
2020-08-12 17:43:14 +02:00
1813a99447 UI: Fix typo "subdivion" -> subdivision
In the Multires panel, use singular Subdivision instead of Subdivisions.
2020-08-12 17:23:56 +02:00
841d779322 Increase hard limit for Remesher octree depth
Adding more precision to help making watertight objects to be printed.

Differential Revision: https://developer.blender.org/D8551
2020-08-12 17:05:04 +02:00
df12e6778a deps_builder: Fix python build on windows
Issue introduced in the boost.cmake cleanup in
rB5c563cd903ddceebfffbb1e86af2b406bbb2c457
2020-08-12 08:40:24 -06:00
b0dc413f4d deps_builder: Cleanup options.cmake for windows
We no longer build the thumbnail dll in the builder
and these variables are no longer used.
2020-08-12 08:26:42 -06:00
84076260da Merge branch 'blender-v2.90-release' into master 2020-08-12 16:25:18 +02:00
5c563cd903 deps_builder: Cleanup boost.cmake on windows
There were some remnants from previous boost::python support
and support for building 32 bit libs on windows, neither are
needed currently.
2020-08-12 08:21:37 -06:00
cfbea0e09d LibOverride and modifiers: Add copying of linked modifiers.
It also enables copying of linked modifiers (generating new local ones).
2020-08-12 16:16:37 +02:00
707c81cd11 Merge branch 'blender-v2.90-release' 2020-08-12 16:05:23 +02:00
21118fb610 Fix T79622: Mesh Filter on a locked Shape crashes
For a locked shapekey, a SculptSession's orig_cos / deform_cos /
deform_imats are not initialized (they only are when
deform_modifiers_active is true -- this in turn is only true for
shapekeys if they are //not// locked [and for deforming modifiers of
course])

We can just update that keyblock with sculpt_update_keyblock() in case
of a locked shapekey

Maniphest Tasks: T79622

Differential Revision: https://developer.blender.org/D8499
2020-08-12 15:53:22 +02:00
6ef58099d4 Merge branch 'blender-v2.90-release' 2020-08-12 15:34:18 +02:00
08286ef8ba Fix T79712: Color Changes do not record in Auto-Key Mode
Caused by rBfffba2b6530.

In above commit, the buttons rnaindex [-1 for entire arrays like colors]
was not used anymore for the entire function body of
`ED_autokeyframe_property` (previously in `ui_but_anim_autokey`).
Replacing the index with 0 (in the array case) is indeed necessary for
`BKE_fcurve_find_by_rna_context_ui`, prior to rBfffba2b6530 this was
taken care of by using `ui_but_get_fcurve` instead [which did this
internally].

But using an index of 0 (instead of -1) for the entire function body of
`ED_autokeyframe_property` fails for the array part later, namely
`insert_keyframe` needs -1 here.
Now just replace the index for //finding the FCurve//, but use the
original for //inserting the keyframe//.

Could be backported to 2.83 LTS.

Reviewers: campbellbarton, sybren

Subscribers:
2020-08-12 15:28:12 +02:00
d75c86429f Checking for PWN.
The current code is only supposed to work if the input meshes
are "piecewise constant winding number" (PWN). Added a check
to see if this is true about the inputs.
2020-08-12 07:35:48 -04:00
d6570fcaed Cleanup: compiler warnings 2020-08-12 12:15:01 +02:00
1f8cb90828 Merge branch 'blender-v2.90-release' 2020-08-12 12:12:12 +02:00
Kévin Dietrich
9280fb19e4 Fixes T77882: artifacts rendering OpenVDB volumes with multiple grids in Cycles
The previous algorithm was not using all of the requested grids to build a mesh
around the volume due to limitations regarding the use of a dense buffer to
gather information about the volume's topology. This resulted in artefacts during
rendering.

The mesh generation is now done by merging all of the input grids and using the
resulting grid's topology to create the mesh. The generation of the mesh
is still done in index space as before, and the vertices are converted to object
space by using the merged topology grid indexToWorld transform.

To be able to merge the grids together we have to make sure that their transformation
matrices and their index spaces match, thus, if they do not match we simply resample
the grids. This behaviour should tackle one other limitation of the current algorithm,
which is that only one transformation matrix was used to generate the final mesh.

If we do not have an OpenVDB grid for the requested volume data, we generate
a temporary OpenVDB grid for it.

Differential Revision: https://developer.blender.org/D8401
2020-08-12 11:52:12 +02:00
da95fa8344 Fix UV unwrap not working with only one pinned vertex
Now the one vertex defines the position of the UV chart, while rotation and
shape is still determined automatically.

Initial patch by Willis (wlssirius).

Differential Revision: https://developer.blender.org/D8484
2020-08-12 11:52:09 +02:00
a1a81e3b88 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-12 11:47:59 +02:00
cbb1bb90fd Bump the minimum required version for 2.90
This is particular important because 2.90 will coexist with 2.83 LTS, so
we should warn the users of potential loss of data when going from 2.90
to 2.83 and back.

Differential Revision: https://developer.blender.org/D8488
2020-08-12 11:43:29 +02:00
05cb4cf26e Merge branch 'blender-v2.90-release' into master 2020-08-12 11:13:10 +02:00
d070d33aa3 Cleanup: Use proper bool type and literals for operators poll functions. 2020-08-12 11:11:48 +02:00
4e31b5b173 Fix (unreported) broken Poll function of GPencile mods and ShaderFX operators in liboverride case.
Those where assuming we always get a valid modifier data from context,
which is not always true...

Also  fix similar issue with shortcuts as reported in T79635.
2020-08-12 11:11:48 +02:00
b3702f5918 Fix part of T79635: Disable by default operation on unknown mod from liboverride object.
It is unfortunate that we cannot get active modifier from context when
operator is called from a shortcut, but we'd need an event for this to
work... So for now forbid any modifier operation of liboverride objects
in that case.
2020-08-12 11:11:48 +02:00
00a7113e61 Merge branch 'blender-v2.90-release' 2020-08-12 10:45:42 +02:00
9b58a41a92 Fix T79708: ShapeKey value greyed out
Mistake in rB0e9999a93edd.

Maniphest Tasks: T79708

Differential Revision: https://developer.blender.org/D8539
2020-08-12 10:35:06 +02:00
ec5f392087 Merge branch 'blender-v2.90-release' 2020-08-11 22:18:39 +02:00
2c7394acce Cleanup: Reduce indentation level
Check the simpler case first and return early.
2020-08-11 16:17:11 -04:00
90b8df8a99 Cleanup: Remove unecessary variables 2020-08-11 16:14:26 -04:00
dbf5bb7af2 Fix T79640: "Assign Shortcut" doesn't work for "View 2D Zoom"
'VIEW2D_OT' operators were not respected in WM_keymap_guess_opname().
This was seemingly done on purpose (see comment "Op types purposely
skipped  for now"), but dont really see the reason for doing so.

Since the "View2D" keymap is not bound to a specific spacetype, we can
still find it using WM_keymap_find_all() [and passing 0 as spacetype].

Reviewers: Severin

Subscribers:
2020-08-11 22:06:15 +02:00
18b1d1af95 Cleanup: Use sizeof first in allocations 2020-08-11 15:58:04 -04:00
185ed9980c Merge branch 'blender-v2.90-release' 2020-08-11 21:52:54 +02:00
3eebdf8a2d Cleanup: Reduce indentation level
Exit early if the bevel width is zero instead of putting
the main function in an if statement.
2020-08-11 15:51:24 -04:00
2fc2a0a56b Fix T79700: skin modifier: prevent error for vert-only mesh
Vert-only mesh is valid input for the skin modifier (displays isolated
cubes), prevent error message about missing root vertex in that case.

Maniphest Tasks: T79700

Differential Revision: https://developer.blender.org/D8533
2020-08-11 21:41:52 +02:00
29852cf320 Merge branch 'blender-v2.90-release' 2020-08-11 21:25:18 +02:00
aec0cfaf08 Fix T79676: Video Sequencer image sequence strip source path breaks when
saving with 'Remap Relative' option

Caused by rBf7386b97571e.

Logic in BKE_bpath_traverse_main calls the callback multiple times [as
often as there are images in the strip].

Prior to above commit, the callback was
'bpath_relative_convert_visit_cb' [this one did not have this problem -
since it returned early if the path was already made relative once]

After rBf7386b97571e though, the 'bpath_relative_rebase_visit_cb' is
used [this one should not be entered multiple times, it would modifiy the
directy again and again].

Luckily, we have a flag (BKE_BPATH_TRAVERSE_SKIP_MULTIFILE) that can be
used to prevent this (this will take care of only calling the callback
once in BKE_bpath_traverse_main for the VSE case)

Could be backported to 2.83 I think.

Maniphest Tasks: T79676

Differential Revision: https://developer.blender.org/D8536
2020-08-11 21:21:40 +02:00
7e9f47c06c Cleanup: Reduce scope of variable declarations in bmesh_bevel.c
This commit generally moves variable declarations to the smallest scope
the variables are used in. This makes the code more readable by
making it clearer when variables are used and by removing the block
of variable declarations at the top of each function.
2020-08-11 15:08:04 -04:00
b0485d47ef Cleanup: Resolve clang tidy warning / error 2020-08-11 14:58:01 -04:00
2b6d4325ac Merge branch 'blender-v2.90-release' 2020-08-11 20:07:20 +02:00
74556a5a17 Fix T79703 EEVEE: Crash on Macos due to lightcache baking 2020-08-11 20:07:03 +02:00
7219abc5bd Fix T79672 EEVEE: Motion blur steps value broken after recent change
Was just an issue of `taa_render_sample` being reset to 1 when it shouldn't.
2020-08-11 20:07:03 +02:00
cae4041878 Fix T79683: Dim GPencil points created by modifiers
This change makes the generated points a light dimmer than selectable points.

Before:

{F8765593}

After:
{F8765585}

Maniphest Tasks: T79683

Differential Revision: https://developer.blender.org/D8515
2020-08-11 19:13:15 +02:00
48c0a82f7a Sculpt: Option to not modify hidden Face Sets in Face Sets Edit
This options allows to perform Face Sets operations while preserving the
mesh visibility. Edit hidden face sets is enabled by default in order to
expand the visible area of the mesh with the grow/shrink operator, but
this can be changed in the keymap per edit operation as more operations
are supported.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8029
2020-08-11 19:04:37 +02:00
b95aa48156 Merge branch 'blender-v2.90-release' into master 2020-08-11 18:49:17 +02:00
d2c150772a Fix T79692: Full copy of scene makes Blender freeze if there is content directly in the master collection.
Old and new collections are the same data in Master collection case
here, so we cannot consider the `gobject` listbase of `collection_old`
as always immutable.
2020-08-11 18:46:47 +02:00
20ca7122f0 install_deps: update some libs, and various improvements/fixes.
This commits:
- Updates some libraries to latest officially supported versions:
** Numpy: 1.17.5
** OCIO: 1.1.1
** OIIO: 2.1.15
** OSL: 1.10.10
** OIDN: 1.2.1

- Re-enables some distro packages (like OSL, OIIO, OCIO...).

- Add missing 'CMake cleanup commands' for generated CMake update
  command, for Embree, OIDN and OpenXR.

- Generalizes using min/max versions of accepted libraries, if no
  package can be found in specified range then it is built from sources.

The later point should help keeping things a bit in better conditions,
although current maximal accepted versions are somewhat arbitrary guess
currently.
2020-08-11 18:11:45 +02:00
72b9d0de51 Cleanup some building errors with ClangTidy. 2020-08-11 18:11:45 +02:00
11509c14c3 Fix T75588: Missing loop cuts preview for edges without quads
The preview of points was only done when the edge is wire.

Now the preview of points is done when the edge is not connected to any
quad.

Also to avoid edge slide in this case, all new vertices created in this
specific case are not selected.

Differential Revision: https://developer.blender.org/D7457
2020-08-11 13:02:37 -03:00
304f0f56c5 Merge branch 'blender-v2.90-release' into master 2020-08-11 17:52:12 +02:00
c300a994b1 Merge branch 'blender-v2.90-release' 2020-08-11 17:00:50 +02:00
eca062b9cb Fix T79563: Compositor's Stabilize 2D in invert mode does not work correctly
Is not only the values of translation/scale/rotation which are to be inverted,
but also the order of operations.

Differential Revision: https://developer.blender.org/D8518
2020-08-11 17:00:30 +02:00
e84e6e12ed Fix T79616: Sort by column in filebrowser is broken
After changes in rBc606044157a3, mouse press events would be blocked by
the selection operator. This only worked by chance before.
2020-08-11 16:55:35 +02:00
a3af59f8e3 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-11 16:14:15 +02:00
1c294fb1fd Revert "Fix T77409: Crash showing vertex/face duplicators in edit-mode"
This reverts commit 9adedb2605. It changes
how duplis work, and by that altered how Alembic and USD files are
written. This was signalled by a failing Alembic unit test.
2020-08-11 16:12:44 +02:00
90baead979 GPencil: Split Primitive operators and add number of points to Topbar
Now the operators are split to define different default values. This is also required for the future Bezier primitive tools.

This allows to show in the Topbar the number of subdivisions. Before this value was totally hidden and it was number of Edges. The wheelmouse can be used to override the value while running, but does not change the default value.

{F8766270}

All operators share same code.

Also, fixed some bad practices done with Toolbar in python.

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D8506
2020-08-11 15:27:07 +02:00
344a6a4b80 Cleanup: rename variables 'gizmo_snap' to 'snap_gizmo'
And a minor fix when there is no `USE_SNAP_DETECT_FROM_KEYMAP_HACK`.
2020-08-11 10:08:43 -03:00
24c2c488e7 Merge branch 'blender-v2.90-release' into master 2020-08-11 21:48:51 +10:00
023151868f Merge branch 'blender-v2.90-release' into master 2020-08-11 21:48:46 +10:00
18c9f7ef72 Fix T79517: Data Transfer modifier fails in edit-mode 2020-08-11 21:48:02 +10:00
6b573d9877 Fix mesh data-transfer tracking if a change was made 2020-08-11 21:48:02 +10:00
d8d4c8b6cc Fix compile error after recent cleanup 2020-08-11 13:36:14 +02:00
e738d0ec6c Merge branch 'blender-v2.90-release' into master 2020-08-11 13:32:41 +02:00
e11aa3eddd Python: don't remove existing context overrides when calling an operator
Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D8532
2020-08-11 13:32:07 +02:00
6d888133da Timers: set first window as context in timer
This avoids some crashes when running Python code in timers.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8531
2020-08-11 13:24:52 +02:00
1b8778e314 Cleanup: Strict compiler flags
Mainly caused by moving tests to source folder, which brings
new compiler flags.

Also, no need to extend include directories (to the non-existing paths,
btw) since this is done by the CmakeList.txt which is in the blenlib folder.
2020-08-11 12:48:33 +02:00
aa4fb22cac Depsgraph: Use UUID to match modifiers
Solves possible pointer-based comparison fiasco.

Another nice outcome of this is that topology cache will now be
preserved throughout the undo system. For example, undo of object
transform will not require topology cache to be re-created.

Differential Revision: https://developer.blender.org/D8493
2020-08-11 12:17:22 +02:00
6f99dfc0c6 Modifier: Maintain per-modifier session UUID
Allows to keep track of modifiers, which is required, for example,
for runtime data preservation in depsgraph.
2020-08-11 12:17:13 +02:00
ca2c4907fb Fix path regression test build failure on Windows
The file was including BKE. It was a required fix for another
compilation error a while back. It is a bad level include, and
seems is not needed anymore.
2020-08-11 10:36:21 +02:00
15abd58b15 Merge branch 'blender-v2.90-release' into master 2020-08-11 17:11:22 +10:00
bb5cc3bccf Fix memory leak setting error text in the data-transfer modifier 2020-08-11 17:10:36 +10:00
90c6a38cbb Merge branch 'blender-v2.90-release' into master 2020-08-11 16:36:05 +10:00
77c4ed1d04 Merge branch 'blender-v2.90-release' into master 2020-08-11 16:34:50 +10:00
fb049a7976 Merge branch 'blender-v2.90-release' into master 2020-08-11 16:34:39 +10:00
9adedb2605 Fix T77409: Crash showing vertex/face duplicators in edit-mode
Support duplicators in edit-mode without creating a mesh copy.
2020-08-11 16:21:19 +10:00
23a6b5d91e BMesh: add UV calculate center call
Move uv_poly_center to BM_face_uv_calc_center_median as
it was only defined in uvedit_intern.h
2020-08-11 15:11:31 +10:00
fc5ff99770 Cleanup: use doxy sections for object_dupli.c 2020-08-11 14:57:20 +10:00
7f15120e9c Cleanup: GCC warning in guardedalloc_overflow_test 2020-08-11 13:22:59 +10:00
0c0f972e86 Cleanup: spelling 2020-08-11 13:19:09 +10:00
acd4687063 Merge branch 'blender-v2.90-release' 2020-08-10 23:16:25 +02:00
bc5d144855 Fix T77298: Can't bake texture with multiple objects
The problem here is that the baking code uses tiles to exchange pixel data with
the renderer since a recent-ish refactor, but the code that sent data to the
renderer did not initialize the bake result pixels.

Therefore, when the baking process for the second object started, Cycles
received empty tiles and sent them back as-is if the second object did not
cover them.

By initializing the tiles with the result of the previous bakes, we avoid this
problem.
2020-08-10 22:54:01 +02:00
784adccf47 Merge branch 'blender-v2.90-release' 2020-08-10 18:30:53 +02:00
8ef05d3180 Fix T79636: Inserting special characters with Ctrl+Alt broken on Windows
We can't exactly follow what we do for macOS here. On Windows special
characters can be inserted with Ctrl+Alt. So make sure we expect UTF-8
characters when Alt is held.

Mistake in 87062d4d67.
2020-08-10 18:29:02 +02:00
3b08cb3236 Cleanup: follow code style regarding braces 2020-08-10 18:18:59 +02:00
c521b69ffb BLI: improve StringRef for C++17
Since C++17 there is also std::string_view, which is similar to StringRef.
This commit does a couple of things:
* New implicit conversions between StringRef and std::string_view.
* Support std::string_view in blender::DefaultHash.
* Support most of the methods that std::string_view has.
* Add StringRef::not_found which can be used instead of -1 in some places.
* Improve/fix the description at the top of BLI_string_ref.hh.
2020-08-10 18:17:07 +02:00
53d203dea8 Tests: move remaining gtests into their own module folders
And make them part of the blender_test runner. The one exception is blenlib
performance tests, which we don't want to run by default. They remain in their
own executable.

Differential Revision: https://developer.blender.org/D8498
2020-08-10 18:14:00 +02:00
af77bf1f0f Sculpt: Option to mask front faces only using Lasso and Box Mask
This adds a property that checks the normals of each vertex against the
view direction to decide if they should be masked (similar to the
"Front Faces Only" option works for brushes.

Reviewed By: sergey

Maniphest Tasks: T77637

Differential Revision: https://developer.blender.org/D8448
2020-08-10 18:10:45 +02:00
ed9c0464ba Sculpt: Boundary Brush
This brush includes a set of deformation modes designed to deform and
control the shape of the mesh boundaries, which are really hard to do
with regular sculpt brushes (and even in edit mode). This is useful
for creating cloth assets and hard surface base meshes.

The brush detects the mesh boundary closest to the active vertex and
propagates the deformation using the brush falloff into the mesh.
It includes bend, expand, inflate, grab and twist deform modes.

The main use cases of this brush are the Bend and Expand deformation
modes, which depend on a grid topology to create the best results.
In order to do further adjustments and tweaks to the result of these
deformation modes, the brush also includes the Inflate, Grab and
Twist deformation modes, which do not depend that much on the topology.

Grab and Inflate are the same operation that is implemented in the
Grab and Inflate tools, they are also available in the boundary brush
as producing deformations with regular brushes in these areas is very
hard to control.

Even if this brush can produce deformations in triangle meshes and
meshes with a non-regular quad grid, the more regular and clean the
topology is, the better. Most of the assets this brush is intended to
deform are always created from a cylindrical or plane quad grid, so it
should be fine. Also, its algorithms can be improved in future versions
to handle more corner cases and topology patterns.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8356
2020-08-10 18:04:00 +02:00
71639cc862 Merge branch 'blender-v2.90-release' 2020-08-10 17:40:42 +02:00
9c093a5d9a Fix T79324: Crash when changing View Layer while VR session runs
Proper handling of View Layers for the VR session was never implemented.
Now the View Layer of the VR session follows the window the session was
started in.
Note that if this window is closed, we fallback to another window. This
is done to avoid the overhead it would take to maintain a separate
depsgraph for the VR view. Instead we always share some already visible
View Layer (and hence the depsgraph).
2020-08-10 17:39:36 +02:00
01537f7a9d Merge branch 'blender-v2.90-release' 2020-08-10 12:06:33 -03:00
c0340ec893 Fix T78113: Random explosions of cloth with self collision
The problem is caused by a lack of prediction in the `isect_line_segment_tri_v3`
that incorrectly confirms some intersections of coplanar segments to the triangle.

The solution is to use another algorithm to detect intersections.

This also resulted in a slight improvement in the performance:
- 1min 17sec to 1min 6sec in my test file

Differential Revision: https://developer.blender.org/D8500
2020-08-10 12:05:37 -03:00
1baba83bb0 GPencil: Fix warning text 2020-08-10 16:41:15 +02:00
4ada290956 GPencil: Invert Filled area pressing Ctrl key
This feature was suggested in https://blender.community/c/rightclickselect/rggbbc/

When press `Ctrl+LMB`, the filled area is inverted.

{F8749306}

{F8749307}

Filling several areas:

{F8759399}

Differential Revision: https://developer.blender.org/D8477
2020-08-10 16:34:26 +02:00
3fe2fceb4e GPencil: Change default Stroke thickness when convert curves
The thickness by default was using the old Draw Engine values and it was too thick in new engine.
2020-08-10 15:33:16 +02:00
3a3dc45e7b GPencil: Remove color conversion when convert curve
In previous versions, grease pencil used sRGB and a color conversion was needed, but now all is Linear and the conversion changes the color wrongly.
2020-08-10 15:33:09 +02:00
cfba3cb121 Merge branch 'blender-v2.90-release' into master 2020-08-10 14:35:22 +02:00
ab2dbafd8b Fix T77847: "Add plane > align" causes crash when certain rigs are in the scene (2.83, fixed in 2.90).
Root of the issue was not fixed in 2.90, only hidden by the fact that we
now re-read much less data during undo's that we used to, when some new
datablock gets added or removed.

This is not an ideal solution (as usual when dealing with data pointers
shared across data-blocks), but it's decent enough. thanks a lot to
@brecht for it!

To be backported to 2.83 too.
2020-08-10 14:34:55 +02:00
659f7f1981 Merge branch 'blender-v2.90-release' 2020-08-10 13:52:39 +02:00
2e5c877056 Fix pose offset on VR session start for some OpenXR runtimes
We want the session to start exactly at the landmark position, with
no additional offset. Some runtimes (e.g. Windows Mixed Reality) may
give an initial non-[0,0,0] position at session start though.

Also add a comment explaining the purpose of the eye offset variable.
2020-08-10 13:52:13 +02:00
f1cb3dfbaa Fix broken behavior on active VR Landmark change
There would always be an unintended offset applied. Per design there
should not be any offset when changing VR Landmarks, the view should
just jump exactly to the Landmark.

Due to the recent changes, we don't have to add, but substract the eye
offset we apply to get the wanted behavior.

Mistake in 607d745a79.
2020-08-10 13:51:43 +02:00
9c1f140a47 Fix pose offset on VR session start for some OpenXR runtimes
We want the session to start exactly at the landmark position, with
no additional offset. Some runtimes (e.g. Windows Mixed Reality) may
give an initial non-[0,0,0] position at session start though.

Also add a comment explaining the purpose of the eye offset variable.
2020-08-10 13:49:34 +02:00
727a744e3c Fix broken behavior on active VR Landmark change
There would always be an unintended offset applied. Per design there
should not be any offset when changing VR Landmarks, the view should
just jump exactly to the Landmark.

Due to the recent changes, we don't have to add, but substract the eye
offset we apply to get the wanted behavior.

Mistake in 607d745a79.
2020-08-10 13:40:11 +02:00
342a6b5f93 Fix T77685: object transforms from rigid body simulation are ignored by modifiers
This does not fix all the cases in the bug report, because there are multiple
different issues. Only the first two are fixed. The third is probably a known
issue for now.

Before this patch, the rigid body simulation was always done after modifiers
are evaluated, because to perform the simulation, the final geometry of the
object was required. However, the geometry is not required in all cases,
depending on the selected collisions shape.

This patch changes it so that when the simulation does not need the
evaluated geometry, the simulation will be done before the modifiers
are evaluated. This gives the modifiers access to the simulated positions.
When the rigid body simulation does depend on the evaluated geometry,
it will still be performed after modifiers are evaluated.

The simulation will be performed after modifiers are evaluated, iff
the collision shape is "Convex Hull" or "Mesh" and the source is set
to "Deform" or "Final".

Reviewers: sergey

Differential Revision: https://developer.blender.org/D8487
2020-08-10 10:54:28 +02:00
52a57af3d5 Cleanup: use doxy sections for object_dupli.c 2020-08-10 18:30:47 +10:00
f15d33d585 Fix T79619: Sequencer window not updating whilst playing animation
Reverted Playhead optimizations for VSE. Needs more investigation to
detect which settings in the VSE would require a redraw of the area.
2020-08-10 09:28:18 +02:00
e2d5e8d584 Merge branch 'blender-v2.90-release' 2020-08-10 09:09:49 +02:00
6640ed92c0 Fix T79346: VSE custom proxy file is broken
In last set of refactoring patches, code implementing this feature
has been accidentally removed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8449
2020-08-10 08:11:09 +02:00
Eitan
4fd73e7465 Remove Video Proxy Resolution limitation
Height and width of video proxies was limited to multiples of 8 with
comment "JPEG requires this".

I could not find any resource that would confirm this to be the case
with FFMPEG and MJPEG codec.

I have looked in:
https://ffmpeg.org/ffmpeg-all.html
https://ffmpeg.org/ffmpeg-formats.html
https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html

Reviewed By: ISS, sergey, sybren

Differential Revision: https://developer.blender.org/D6507
2020-08-10 07:54:51 +02:00
2b6bd6f76d Fix the nearest point containing cell when nearest is inside a tri. 2020-08-09 16:16:07 -04:00
7f5a4053f5 Remove degenerate triangles before intersecting. 2020-08-09 13:38:37 -04:00
00162e6b7b Fix T79246 GPUShader: compile error on AWS Elastic Graphics 2020-08-09 14:07:00 +02:00
18c6d7b066 Use #pragma in newboolean branch. 2020-08-09 07:32:33 -04:00
e66c59129c Merge branch 'master' into newboolean 2020-08-09 07:24:50 -04:00
56b547aa9d Cleanup: stop some warnings. 2020-08-09 07:14:09 -04:00
b522e834ec msvc: Fix build error with msvc 2017
`using blender;` Was required to get the Vector type.
2020-08-08 18:04:46 -06:00
8da4842fd5 Fixed bug in understanding of nesting of connected components. 2020-08-08 17:23:11 -04:00
a1d57e3f05 Cleanup: replace sizeof division with ARRAY_SIZE macro 2020-08-08 14:08:37 +10:00
171e77c3c2 Cleanup: use array syntax for sizeof with fixed values
Also order sizeof(..) first to promote other values to size_t.
2020-08-08 13:38:00 +10:00
4bf3ca2016 Cleanup: replace elem_strcmp with elem_streq
This is used for equality and didn't have the same behavior as strcmp.
2020-08-08 13:38:00 +10:00
61a045b7d3 Clenup: use STREQ macro 2020-08-08 13:38:00 +10:00
586a308467 Cleanup: remove redundant return parenthesis 2020-08-08 13:37:55 +10:00
f1b1a0745f Cleanup: GPU: Change gpu_context_private.h to C++ only header 2020-08-08 03:05:39 +02:00
f742a7ac79 DRW: Fix runtime error: shifting signed 32bits int 2020-08-08 01:46:51 +02:00
cb7ea2ccfb GPUBackend: Add new GPUBackend object to manage GL object allocations
This just set a global object responsible for allocating new objects
in a thread safe way without needing any GPUContext bound to this
thread.

This also introduce the GLContext which will contain all the GL related
functions for the current context.

# Conflicts:
#	source/blender/gpu/intern/gpu_context.cc
2020-08-08 01:30:33 +02:00
1dd7377596 GPUBackend: Add new GPUBackend object to manage GL object allocations
This just set a global object responsible for allocating new objects
in a thread safe way without needing any GPUContext bound to this
thread.

This also introduce the GLContext which will contain all the GL related
functions for the current context.
2020-08-08 01:16:40 +02:00
0ccf3f89d2 GPU: Move ghost default framebuffer getter to context creation 2020-08-08 01:15:28 +02:00
0255f1e022 GPUBatch: Use custom allocator
This is needed for the new GPU abstraction.
2020-08-08 01:15:27 +02:00
0063d1befc DRW: Instance Data: Replace GPUBatch bulk allocation by separate alloc
This is suboptimal but needed for the new GPU abstraction.

Maybe a better solution will be needed if performance is impacted.
2020-08-08 01:15:27 +02:00
994ab8985b Cleanup: Fix reported clang-tidy code-style issues.
This resolves `error: statement should be inside braces` in some
windows specific code that previously was unchecked by clang-tidy.
2020-08-07 14:53:42 -06:00
915cc956ba Cleanup: Rename soops to space_outliner
No functional changes. Rename soops, soutliner, and so to
space_outliner.
2020-08-07 11:49:58 -06:00
2597c12b0c Cleanup: Remove outliner statement with no effect
No functional changes. The memory dupalloc will already carry over the
flags.
2020-08-07 11:49:57 -06:00
dc5c616cca Cleanup: use _fn for outliner callback functions
No functional changes.
2020-08-07 11:49:57 -06:00
e3f369e13f Cleanup: fix some clang tidy warnings 2020-08-07 19:19:38 +02:00
c50e5fcc34 Cleanup: use C++ style casts in various places 2020-08-07 18:42:21 +02:00
28b1022434 Fix compile error with WITH_INPUT_NDOF after last own commit
Caused by dcff28e1e7.
2020-08-07 18:41:15 +02:00
ad6e63cb96 Cleanup: enable Clang-Tidy bugprone-parent-virtual-call rule
I added a single `NOLINT` exception with explanation.

No functional changes.
2020-08-07 17:59:26 +02:00
dcff28e1e7 UI Code Quality: Use derived struct for HSV Cube buttons
For the main rationale behind this design, see 49f088e2d0. Further,
this removes users of uiBut.a1, which is a very ugly design
choice (hard to reason about).

Part of T74432.
2020-08-07 17:46:58 +02:00
60b42ef117 Cleanup: enabled Clang-Tidy bugprone-suspicious-missing-comma rule
No functional changes because no code changed.
2020-08-07 17:46:32 +02:00
ca85da075b Cleanup: enabled Clang-Tidy bugprone-not-null-terminated-result rule
No functional changes because no code changed.
2020-08-07 17:38:45 +02:00
a9c91ce331 Cleanup: fixed Clang-Tidy bugprone-suspicious-string-compare warnings
No functional changes.
2020-08-07 17:16:49 +02:00
7309ee4df7 Merge branch 'blender-v2.90-release' 2020-08-07 17:12:00 +02:00
a93be410c9 Fix previous commit, we first need to be sure we actually get a mesh... 2020-08-07 17:11:21 +02:00
c4b1ef45a0 Merge branch 'blender-v2.90-release' 2020-08-07 17:08:44 +02:00
8fa42f0bd4 Fix T79604: Switching to edit mode on boolean object runs out of memory.
Note that this is a dummy safe fix for now, far from optimal.
2020-08-07 17:07:30 +02:00
be83b8f456 Cleanup: CMake warnings related to "find package" modules
Fix package name missmatch in a few module files. IE "ALEMBIC" was
defined in the file but the find_package commands used "Alembic"

Some modules state that they set and use the _LIBRARY variable but the
do in fact not do this. Removed these comments from those files.
2020-08-07 16:56:38 +02:00
4c2ce816aa Cleanup: enabled Clang-Tidy rule bugprone-infinite-loop
Enabling it and doing a full rebuild didn't cause any warnings, so nothing
else to do here.

No functional changes.
2020-08-07 16:46:26 +02:00
7aeab6f6aa Cleanup: added explanation of why incircleadapt is allowed to be long
This is a followup of d4bd0789ab, as it was
lacking a bit of an explanation.

No functional changes.
2020-08-07 16:38:28 +02:00
6414da0381 Cleanup: enable and silence Clang-Tidy readability-function-size
Enable Clang-Tidy's `readability-function-size` rule and add a few
`NOLINT` markers to explicitly silence warnings for three functions.
These functions are huge and would IMO benefit from splitting up, but
are hard to without intimate knowledge of the code.

At least by enabling the rule, we can start tweaking the values and
refactoring other functions that bubble up as being too long/complex.

No functional changes.
2020-08-07 16:23:17 +02:00
2a0bc4d23e Cleanup: Nodes, silence Clang-Tidy readability-function-size
Add a `NOLINT` marker to explicitly silence a warning from Clang-Tidy's
`readability-function-size` rule for the `node_type_base()` function.
This function is indeed huge, but that is because a lot of macros are
expanded. Before expansion things are still not small, but still
understandable & expandable.

No functional changes.
2020-08-07 16:23:02 +02:00
4ce298b3c0 Cleanup: Clang-Tidy. readability-non-const-parameter in pixel drawing 2020-08-07 16:13:11 +02:00
17dbdcc552 Fix T79571: "Assign Shortcut" doesn't work for "Clear Keyframes"
In the 3D View, the "Animation" keymap is not used, but the mode
specific ones. So the shortcut editing code should use these too, just
like the default keymap does.
2020-08-07 16:11:30 +02:00
d4bd0789ab Cleanup: Delaunay 2D, silence Clang-Tidy readability-function-size
This adds a `NOLINT` marker to explicitly silence a warning from
Clang-Tidy's `readability-function-size` rule for the `incircleadapt()`
function in `delaunay_2d.c`.

No functional changes.
2020-08-07 15:54:28 +02:00
b27a953798 Cleanup: Versioning: silence Clang-Tidy readability-function-size
This adds `NOLINT` markers to explicitly silence warnings from Clang-Tidy's
`readability-function-size` rule for versioning functions. Technically
these could be refactored and split up into smaller bits, but generally
they are hardly ever looked at once they're a few releases old.

No functional changes.
2020-08-07 15:54:28 +02:00
3090b52f8c Cleanup: PyBGL, Clang-Tidy readability-function-size fixes
This addresses warnings from Clang-Tidy's `readability-function-size`
rule in the `source/blender/python` module.

It's just `BPyInit_bgl()` that's been split up into one or two smaller
functions per OpenGL version.

No functional changes.
2020-08-07 15:54:28 +02:00
24d8ab1556 Merge branch 'blender-v2.90-release' 2020-08-07 15:50:42 +02:00
c2691c93d5 Fix T79201: Mantaflow: Fluid guides don't affect simulation.
This broke during the OpenVDB update for 2.90. Just making sure that guiding velocity files are being read correctly.
2020-08-07 15:33:51 +02:00
81410044bc Add debugging to face merge. 2020-08-07 09:25:36 -04:00
076a93b855 UI Code Quality: Use derived struct for progessbar buttons
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`, which is a very ugly design
choice (hard to reason about).

Part of T74432.
2020-08-07 15:17:52 +02:00
9f475db6c9 Fix failing assert when entering Texture Paint mode
Was unbinding the shader twice.
2020-08-07 15:17:52 +02:00
68c00e6f8f UI Code Quality: Use derived struct for color buttons
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`/`uiBut.a2`, which is a very ugly design
choice (hard to reason about).

Part of Part of T74432.
2020-08-07 15:17:52 +02:00
49f088e2d0 UI Code Quality: Use derived structs for search buttons and decorators
The current on-size-fits-all `uiBut` creates quite a mess, where it's
hard to reason about which members are free for use, under which
conditions they are used and how.
`uiBut` also has members that aren't used at times, violating the "don't
pay for what you don't use" principle.

To address this, we want to move to typed buttons, where `uiBut` is just
a base struct and each type extends it as needed. That structures data
better and type specific data is only available if it's actually used by
a button type.

Two trade-offs:
* Many casts to the derived type have to be done.
* Sometimes we change the button type after it's created. So I had to
  add logic to reallocate the button for use with the new, possibly
  derived struct. Ideally that wouldn't be needed, but for now that's
  what we have.

Part of T74432.

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

Reviewed by: Brecht Van Lommel, Campbell Barton
2020-08-07 15:17:52 +02:00
48e089375e Cleanup: pass arrays const where possible 2020-08-07 22:56:13 +10:00
b134434224 Cleanup: declare arrays arrays where possible 2020-08-07 22:37:39 +10:00
3db67fd670 Revert "Cleanup: Cycles, applied Clang-Format"
This reverts commit 88cc3f167f. It was
caused by running Clang-Format version 10, instead of 9 from the
precompiled libs directory.
2020-08-07 13:38:07 +02:00
c04088fed1 Cleanup: Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule. This should be the final commit of the series of commits that
addresses this particular rule.

No functional changes.
2020-08-07 13:38:07 +02:00
3d48d99647 Cleanup: Python, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/python` module.

No functional changes.
2020-08-07 13:38:07 +02:00
44b7354742 Cleanup: Nodes, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/nodes` module.

No functional changes.
2020-08-07 13:38:06 +02:00
47f8c444a4 Cleanup: Modifiers, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/modifiers` module.

No functional changes.
2020-08-07 13:38:06 +02:00
dee359e26e Cleanup: IO, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/io` module.

No functional changes.
2020-08-07 13:38:06 +02:00
dbf4f52fe0 Cleanup: ImBuf, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/imbuf` module.

No functional changes.
2020-08-07 13:38:06 +02:00
c889d93c80 Cleanup: GPU, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/gpu` module.

No functional changes.
2020-08-07 13:38:06 +02:00
326e137a8c Cleanup: Freestyle, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/freestyle` module.

No functional changes.
2020-08-07 13:38:06 +02:00
94eaaf097c Cleanup: Depsgraph, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/depsgraph` module.

No functional changes.
2020-08-07 13:38:06 +02:00
f453ee7d3a Cleanup: Compositor, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/compositor` module.

No functional changes.
2020-08-07 13:38:06 +02:00
fb18e48a84 Cleanup: Blenloader, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenloader` module.

No functional changes.
2020-08-07 13:38:06 +02:00
1b272a649b Cleanup: Blenkernel, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.

No functional changes.
2020-08-07 13:38:06 +02:00
cfc6f9eb18 Clang-Tidy: Address readability-redundant-string-init 2020-08-07 12:18:15 +02:00
156448ba4b Cleanup: Draw, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/draw` module. Not all warnings are addressed
in this commit.

No functional changes.
2020-08-07 12:01:40 +02:00
88cc3f167f Cleanup: Cycles, applied Clang-Format
No functional changes.
2020-08-07 12:01:40 +02:00
4ba9d7d71e Fix fast clicks on File Browser sort columns not changing sorting
Clicking on the column header is supposed to enable sorting by this
column, or switch the sort order if already enabled.
The double-click event would be blocked by the `file.execute()`
operator, which is not supposed to act if the user clicked outside the
file list.
2020-08-07 11:39:04 +02:00
5809dc6b5b Fix T79616: Sort by column in filebrowser is broken
After changes in rBc606044157a3, mouse press events would be blocked by
the selection operator. This only worked by chance before.
2020-08-07 11:39:04 +02:00
a29686eeb3 Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.

No functional changes.
2020-08-07 11:23:02 +02:00
e0c51b466f Merge branch 'blender-v2.90-release' into master 2020-08-07 10:23:33 +02:00
1b1129f82a Code Style: use "#pragma once" in intern/ghost
More information can be found in D8466.
2020-08-07 10:18:01 +02:00
8198dbb888 Code Style: use "#pragma once" in some newer headers
Those were missing from the previous commit, because these headers
only exist in the `master` and not in the `blender-v2.90-release` branch.
2020-08-07 10:10:37 +02:00
af88cc0701 Cleanup: make format 2020-08-07 10:07:36 +02:00
7283e6fb73 Merge branch 'blender-v2.90-release' into master 2020-08-07 10:04:57 +02:00
91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
21fec95139 Merge branch 'blender-v2.90-release' 2020-08-07 01:23:20 +02:00
58909abc68 EEVEE: Render: Fix regression caused by previous Motion blur fix
Caused by rB4f59e4bddcb0c06e441adf68a5f252a4e5b4b260
2020-08-07 00:59:14 +02:00
6e226275fd Merge branch 'blender-v2.90-release' 2020-08-06 23:06:33 +02:00
4f59e4bddc Fix T78452 EEVEE: Motion Blur: Crash when using camera switching
This was caused by the ViewLayer being freed with all its
engine data.
2020-08-06 23:06:18 +02:00
3dcaca93a0 Fix T78160 EEVEE: Motion Blur: Bug with Follow Path animation
Follow path seems to not be catched by `BKE_object_moves_in_time`.
For this reason, we cache all transforms for all object and check
ourselves if an animation occurs. This is almost what cycles does.

We also fix the rigid body case if the rigid body use deformation.
2020-08-06 23:06:18 +02:00
9a1ff4445b Merge branch 'blender-v2.90-release' 2020-08-06 19:52:49 +02:00
3d35012a05 GPencil: Fix unreported wrong Polyline bottom tooltip
It was mising the Wheelmouse option and the name of the tool was wrong.
2020-08-06 19:52:30 +02:00
6f87a7ad9f GPencil: Fix unreported wrong Polyline bottom tooltip
It was mising the Wheelmouse option and the name of the tool was wrong.
2020-08-06 19:44:41 +02:00
8123b12006 Fix T79586: "rendering paused" not shown when viewport render starts paused 2020-08-06 19:19:22 +02:00
Vincent Blankfield
8fbfc150a0 Fix T77885: crash rendering grease pencil from compositor with multiple scenes 2020-08-06 19:19:22 +02:00
8719ac990f Merge branch 'blender-v2.90-release' 2020-08-06 19:15:35 +02:00
cc3cb52b23 Fix Pose Brush FK mode detecting wrong rotation origin
The Pose FK mode assings the rotation origin to the boundary of the last
visited face set in the floodfill operation. In some cases, the topology
of the model may make the flood fill operation to visit a face set as the
first one (assinging it to target) and visit it again as the last one
(assinging it to origin). This will make the pose brush to default the
origin and target to the brush location and not to the face sets as it
considers that there is only one possible boundary.
This adds a GSet to ensure that a particular face set is not visited
twice in the flood fill, fixing these cases.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7984
2020-08-06 19:14:39 +02:00
d693d77fed Sculpt: Cloth Brush simulation area property
This makes possible to choose between a local and a global simulation
when the cloth brush is used. Local simulation is the current default.
When global simulation is enabled, the cloth brush simulates the entire
mesh without taking any simulation limits into account.

This was possible before by setting the simulation limits to 10 (the
current maximum value allowed) so the entire mesh was inside the limits,
but this was a hack as the limits scale with the radius and there should
not be any limitation on how big the simulated area can be to be able to
simulate an entire object. This also allows to make a more clear
distinction between cloth brush presets that are intended to be used in
local areas to add details or globally to generate the base shape of the
mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8481
2020-08-06 18:03:56 +02:00
97c56b7628 Merge branch 'blender-v2.90-release' 2020-08-06 17:29:28 +02:00
96e460ed9b GPencil: Patch old files after the change in how the first frame is used
This patching duplicates the first frame of the layer if the first frame number is not equals to the scene first frame number.

Related to T79567

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

Some minor cleanup in the patch.
2020-08-06 17:28:59 +02:00
5f51438185 Cleanup: Paint Cursor Refactor
The paint_draw_cursor function was handling the cursor drawing for 2D
and 3D views of all paint modes, calculating the brush radius, updating
the SculptSession data and updating and drawing all sculpt cursor
overlays for different tools. It was almost impossible to understand when
and what was being drawn and in which state the GPU matrix was.

Now everyting is organized into different functions, with clear
separation between modes, sculpt tool overlays and different drawing
setups. Update and drawing functions are also separated (this allows to
skip one PBVH query on each cursor drawing).

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8206
2020-08-06 17:27:57 +02:00
56af04d31f Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-06 16:44:21 +02:00
bc8168f4a2 Cleanup: Remove bad level calls from space image
Groundwork for upcoming fix (D8472)
2020-08-06 16:44:03 +02:00
45e6ca3661 Cleanup: Stop accessing gpu_batch_presets_reset()
The current code is accessing this from outside the gpu "namespace". As
such it should be accessing GPU_ functions, not gpu_ functions.

This is also a place to centralize the XXX message that will be
addressed upon refactor. So we can reuse this call in other places that
need the same temporary workaround.

Groundwork for upcoming fix (D8472)
2020-08-06 16:44:03 +02:00
5e6119ddca Cycles: load OpenVDB file earlier in Blender export
In an upcoming bugfix we'll use OpenVDB data structures directly to build mesh
for sparse OpenVDB volumes, loading them OpenVDB grids earlier and removing any
references to Blender data structures makes that easier.

This also makes changes to Blender volumes to support this, so Cycles can take
ownership of a grid without Blender having to keep its own reference to it.
This should also be useful in a future Python API.

Ref D8401
2020-08-06 15:13:05 +02:00
9696239762 Merge branch 'blender-v2.90-release' 2020-08-06 15:05:00 +02:00
77d71cc113 Move CDData debug print helper from DM to CustomData 'namespace'/files. 2020-08-06 15:03:49 +02:00
86f586636d Merge branch 'blender-v2.90-release' into master 2020-08-06 22:58:48 +10:00
30d3d4fbc1 Merge branch 'blender-v2.90-release' into master 2020-08-06 22:58:44 +10:00
Yevgeny Makarov
91be94d465 UI: Fixes and small improvements to some labels and UI messages
Small tweaks to make labels and texts more correct, consistent and
polished.

Reviewed by: Aaron Carlisle, Julian Eisel

Differential Revision: https://developer.blender.org/D8346
2020-08-06 14:50:45 +02:00
e4f400f0d6 Cleanup: undeclared warnings 2020-08-06 22:50:38 +10:00
ba20da7214 Cleanup: avoid debug-only includes for BLI_assert.h
Having includes in debug builds makes it possible to accidentally
break release builds.

Avoid this by moving calls to other modules out of BLI_assert.h
into BLI_assert.c
2020-08-06 22:49:28 +10:00
cb1096163a Merge branch 'blender-v2.90-release' 2020-08-06 14:15:19 +02:00
73a43c9d8a Fix buffer-overflow when drawing Curve Guide objects
Was passing an array of length 3 to `where_on_path()` that expected
length 4.
2020-08-06 14:14:55 +02:00
cb294c3a01 Fix buffer-overflow when drawing Curve Guide objects
Was passing an array of length 3 to `where_on_path()` that expected
length 4.
2020-08-06 14:12:23 +02:00
Matias Herrero
8f34bf5ebb UI: Name force fields using the type of force by default
When adding multiple force fields of different types they are all called
"Field", making it difficult to tell them apart.
Lights were already named based on their type. This follows the light
code.

New names:
  - Force
  - Vortex
  - Magnet
  - Wind
  - Guide
  - TextureField
  - Harmonic
  - Charge
  - Lennard-Jones
  - Boid
  - Turbulence
  - Drag
  - Fluid
  - Field

Reviewed by: Julian Eisel

Differential Revision: https://developer.blender.org/D8420
2020-08-06 14:09:10 +02:00
690d61cf78 Merge branch 'blender-v2.90-release' 2020-08-06 13:39:09 +02:00
574bd866c8 Fix T78520 EEVEE: No viewport update when changing material nodetree
This was comming from rBd82c3d86155ea3c7831c7b5ef5d07bc8e2d99394
2020-08-06 13:37:41 +02:00
c4e606e386 Merge branch 'blender-v2.90-release' 2020-08-06 13:35:06 +02:00
Red Mser
b313710c10 Fix padding when multi-editing aligned widgets
Similar to T58668, labels were not aligned when multi-editing widgets
that are not center-aligned.

Reviewed by: Hans Goudey, Julian Eisel

Differential Revision: https://developer.blender.org/D8441
2020-08-06 13:34:40 +02:00
2d95a23aa6 Merge branch 'blender-v2.90-release' into master 2020-08-06 12:55:49 +02:00
769ec7ffe6 Fix T79408: ungroup operation update animation data incorrectly
Reviewers: sybren, sergey

Differential Revision: https://developer.blender.org/D8464
2020-08-06 12:50:08 +02:00
95fb3dc5ca Depsgraph: refactor dot exporter to use utility library from blenlib
Reviewers: sybren, sergey

Differential Revision: https://developer.blender.org/D8473
2020-08-06 12:40:37 +02:00
Yevgeny Makarov
b2e0c8f902 UI: Reduce item padding in the edit mesh context menus
Align items in the edit mesh context menus (reducing padding), for
consistency with other menus.
The root layout of menus doesn't add the padding, for sub-layouts
`align` has to be enabled.

{F8749633}

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D8480
2020-08-06 12:33:28 +02:00
d71cb229d0 Fix T79484: Crash when viewing Movie Clip as a Background Image in a Camera
This seems to be caused by a change to the logic of movieclip_get_gputexture_ptr in rB97b597c.

Differential Revision: https://developer.blender.org/D8469
2020-08-06 11:52:59 +02:00
3439cbcc69 Merge branch 'blender-v2.90-release' into master 2020-08-06 19:20:32 +10:00
82150f5641 Workaround release builds failing
Issue caused by e9c4325515.
2020-08-06 19:19:25 +10:00
8a8c3e0972 Merge branch 'blender-v2.90-release' into master 2020-08-06 19:01:07 +10:00
c872e87bd4 Fix T79309: Safe Areas are not visible 2020-08-06 18:59:20 +10:00
6158f56f52 Merge branch 'blender-v2.90-release' into master 2020-08-06 17:19:01 +10:00
d4804f00fb Fix T79575: Crash loading nested set-scenes 2020-08-06 17:15:20 +10:00
14dc1aecf0 Merge branch 'blender-v2.90-release' into master 2020-08-06 15:48:42 +10:00
Daniel Bailey
e9c4325515 Python: include Python stack trace in the crash log
This helps Python developers troubleshoot errors when
Python causes a crash.
2020-08-06 15:44:00 +10:00
c86fed79d5 Cleanup: use doxy sections for py_capi_utils.c 2020-08-06 13:51:28 +10:00
85ddba475b Cleanup: no need for plural for term 'collision' 2020-08-06 09:38:25 +10:00
c581c4ae44 Fix crash when point finding encounters a coplanar stack. 2020-08-05 19:19:48 -04:00
675700d948 Sculpt: Cloth Brush/Filter Collisions
This implements collisions in the solver of the cloth brush/filter. It
uses the scene colliders as a regular physics simulation.

There are still some parameters (friction, distance to the surface...)
that can be exposed as properties in later patches.

Thanks to Sebastian Parborg for helping me with the implementation.

Reviewed By: sergey, zeddb

Differential Revision: https://developer.blender.org/D8019
2020-08-06 00:29:22 +02:00
8c98684e22 Merge branch 'blender-v2.90-release' 2020-08-05 17:38:48 -04:00
c5b6b3d82f Fix T78698: Move cursor stuck after removing modifier
The panels are rebuilt when a modifier is removed so the button handlers need
to properly finish. By adding a context argument to the panel_delete function
this will happen properly.
2020-08-05 17:36:16 -04:00
3570173d0f Sculpt: Sharpen Mesh Filter curvature smoothing and intensify details
This adds a curvature smoothing and intensify details properties to control
the result of the Sharpen Mesh Filter.

Curvature smoothing removes high frequency details from the precalculated
sharpen data, so the filter result has much smoother surfaces and cleaner
sharpen lines;

Intensify details displaces the vertices of creases and valleys in the direction
opposite to its neighbors average, so it intensifies high frequency details
in those areas, producing more noisy and sharp shapes:

Both this properties can be used in combination to achieve a good balance of
high and low frequency details depending on the shape and the desired result.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8447
2020-08-05 23:16:42 +02:00
ad3838e1e0 Fix Squash and Stretch naming in the Pose Brush deform mode
Previusly it was using the / character, which implies that there is one
deformation mode and and invert deformation mode like in the other two
deformation, but squash and stretch is only one deformation mode and
does not have an invert mode.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8463
2020-08-05 23:00:38 +02:00
9ea77f5232 Sculpt: Option to lock the rotation in the Pose Brush scale deform mode
The scale deform mode includes rotation by default, so when when scaling
down a part of the models it becomes harder to control as the effect of
the rotation less predictable (similar to using trackball rotation in a
very small radius). This locks the rotation of the segment, so parts of
the model can be scaled down in a more predictable way.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8465
2020-08-05 22:59:27 +02:00
3474b0968a Merge branch 'blender-v2.90-release' 2020-08-05 22:29:40 +02:00
59861db763 Fix T77517 EEVEE: Collection Holdout doesn't work in 2.90
The default material was missing its init code.
2020-08-05 22:29:21 +02:00
29ef7142dd EEVEE: Fix previous commit
Small mistake in rB5249a813f22f

Now for fix it real!
2020-08-05 22:18:26 +02:00
2b7d39c3f1 Merge branch 'blender-v2.90-release' 2020-08-05 22:13:15 +02:00
5249a813f2 Fix T78954 EEVEE: Motion Blur: Bug with hair particles on linked objects
The cache key for particle system was the original Object data. But this
is incorrect for particle systems as modifiers are not shared.
2020-08-05 22:12:53 +02:00
492235903d Merge branch 'blender-v2.90-release' 2020-08-05 21:58:03 +02:00
315ae005c3 Fix file name sometimes not visible immediately after renaming
Steps to reproduce were:
* Open File Browser
* Create a new directory
* Cancel renaming with Esc

File selection flags were modified during drawing when the rename button
got removed, but the file name label drawing wasn't checking the
modified state.
2020-08-05 21:57:51 +02:00
843aead88e Disable the boolean and modifier python tests.
These tests rely on the behavoir of the old boolean, down the the
exact values of coordinates and ordering of the output vertices.
Because I want the default behavior of boolean to be new boolean
in this branch, this is inconvenient. I will make these tests work
again if/when we merge with master. Probably by adding the flag
that invokes the old behavior to the tests.
New bevel is mostly tested by unit tests now, so disabling the
regression test for it is not a big deal.
2020-08-05 15:52:48 -04:00
f41eb8b2a9 Merge branch 'blender-v2.90-release' 2020-08-05 21:34:15 +02:00
c606044157 Fix double-click not opening directories on some touch-pads
The file.execute() operator is the one that actually opened directories
and files, not file.select() with the "open" option, as it was assumed
when changing the keymap to double-click for opening. It only acts on
the current selection though, so we have to ensure the selection is set
on the first click.
Now, some touch-pads have a delay until they register a click event, so
the double-click would be registered instead, before the selection is
set. Always select on mouse-down now and remove the unnecessary select
operator call on double-click.
2020-08-05 21:34:00 +02:00
0023d30590 Merge branch 'master' into newboolean 2020-08-05 15:13:57 -04:00
4539f345e8 Fixed bug where normals were sometimes wrong after a difference op.
Needed to check for correct orientation of a face before reusing an
original face.
Also added another test case.
2020-08-05 15:02:21 -04:00
82343037f5 Merge branch 'blender-v2.90-release' 2020-08-05 15:48:29 -03:00
Deep Majumder
c323f3e90a Fix T77548: Crash when using Add Object Tool with Normal Orientation and zero objects in scene
The crash is caused by the fact that a NULL Object pointer is passed to
calculate the transform orientation, which has been set to normal.

A check has been include to detect the same.

Differential Revision: https://developer.blender.org/D7951
2020-08-05 15:45:46 -03:00
7aec56204b Merge branch 'blender-v2.90-release' 2020-08-05 20:33:40 +02:00
f3e724b93d Fix T79370 EEVEE: Texture paint does not update during stroke
Was caused by rBd82c3d86155e
2020-08-05 20:33:24 +02:00
854f73b4a2 Fix T78592: Shear operator fails to affect curve control point handles
Use `td->iloc` as the coordinates of the transformed element.

It is more accurate and other transformation modes, such as scale, also
operate on `td->iloc`.
2020-08-05 15:06:23 -03:00
d9b72a96b3 Merge branch 'blender-v2.90-release' 2020-08-05 19:41:04 +02:00
1b593edf1d Fix T78907: Renaming file doesn't work while mouse is over file icon
The icons are label buttons. Usually these are not editable and can not
become active. These are draggable ones though (so dragging files can be
dragged by dragging the icon) which creates an exception to this rule.
So hovering the icon would activate its label and when executing the
rename operator via shortcut it wouldn't get exited properly. This broke
the invariant of only allowing a single active button at a time.
Added an assert to check that invariant now.

Letting the code to activate the text button ensure any currently active
button is exited seems sensible.
2020-08-05 19:40:40 +02:00
38e9a349de Workbench: Fix broken id pass 2020-08-05 19:37:41 +02:00
cf3431e0e8 Fix T79509 Workbench: Object color mode broken if more than 4096 objects
This was due to the new DRWShadingGroup not being saved and reused for
the next objects.
2020-08-05 19:37:41 +02:00
93f4f96818 Merge branch 'blender-v2.90-release' 2020-08-05 20:21:08 +03:00
a316d3b6c6 Eevee: do not rely on the SOCK_HIDE_VALUE flag for node group sockets.
When disconnecting links for defaulted node group inputs, recurse
into the nested node group nodes, instead of checking the socket
flag. Otherwise the behavior is confusing and differs from Cycles.

Differential Revision: https://developer.blender.org/D8455
2020-08-05 20:20:48 +03:00
9118df1ecd Merge branch 'blender-v2.90-release' into master 2020-08-05 10:46:12 -06:00
d84dce85f3 Fix T72297: disabled buttons toggling on drag
Disabled buttons would incorrectly toggle state when a drag toggle
passed over them. This adds a check to prevent a drag toggle on disabled
buttons.

Differential Revision: https://developer.blender.org/D8476
2020-08-05 10:42:43 -06:00
9e644b98a6 GPencil: Reorganize Advanced Brush panel
The Ignore Transparent Strokes and the Factor are related, so it's better disable factor if the checkbox is disabled.
2020-08-05 18:25:58 +02:00
e03d53874d Fix T79127: crash on scene.ray_cast() with non-viewport view layer
The `rna_Scene_ray_cast()` function tried to find the current depsgraph. To
this end, it required the scene, the view layer, and bmain. Scene has a cache
of per-view-layer depsgraphs, to speed up switching between view layers. This
cache does not contain render depsgraphs, and evaluated view layers also don't
have a depsgraph here.

When a suitable depsgraph cannot be found, a new depsgraph is created. However,
this depsgraph is not evaluated, and has an unexpanded scene pointer with a
`NULL` `view_layer`. Using this then crashes Blender. Also, there was no way
for the code to get the render depsgraph.

The solution is to pass the depsgraph to the `ray_cast()` function, instead of
the view layer. This avoids the depsgraph lookup, and also works correctly when
rendering.

Some add-ons also need updating, which I'll do in the `addons`
repository soon.

Reviewed By: Sergey

Differential Revision: https://developer.blender.org/D8475
2020-08-05 18:14:06 +02:00
fff12be945 GPencil: Rename Default Fill Boundary option to All 2020-08-05 18:00:34 +02:00
927b1e9fa2 Merge branch 'blender-v2.90-release' 2020-08-05 17:51:41 +02:00
531a3f6c4e Sculpt: Use vertices instead of faces to limit the grids in each PBVH node
This uses the vertices per grid instead of quads to set the limit of
grids per PBVH Node. This should create more leaf nodes in lower
subdivisions levels where the duplicates count is high, producing more
uniform performance across different levels.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8454
2020-08-05 17:50:28 +02:00
8fc7c3539a GPencil: Add Fill option to determine the layers used for boundary strokes
This is a patch suggested in https://blender.community/c/rightclickselect/qggbbc/

The valid values are:

* Visible Layers.
* Active Layer.
* Layer Above active.
* Layer Below active.
* All layers Above active.
* All layers Below active.

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

Some minor UI changes done in the original patch.
2020-08-05 17:46:34 +02:00
f3acfc97d9 Functions: fix multi function test
There were two issues. First, I made a mistake when I switched from unsigned
to signed integers. Second, two classes with the same name were defined in
separate files. Those classes are in an anonymus namespace now, so that they
don't leak into other files.
2020-08-05 17:19:02 +02:00
b3d35d2039 Fix Cycles + grease pencil render failing after recent GPU refactoring
GPU_texture_update_sub now requires the texture to be bound already.
2020-08-05 17:17:21 +02:00
055af3a489 Merge branch 'blender-v2.90-release' 2020-08-05 16:56:59 +02:00
adfde60831 Fix T79524: Button alignment broken in some cases
ad4928a171 disabled alignment for too many cases. Still try to avoid
aligning many items, to avoid thousands of redundant alignment
calculations. But now we're much more picky adding an sub-row with
alignment.
2020-08-05 16:56:24 +02:00
ca109986a6 Add some more boolean unit tests. 2020-08-05 10:03:06 -04:00
2ca006f6c1 Merge branch 'blender-v2.90-release' 2020-08-05 15:59:04 +02:00
87062d4d67 Fix T78412: Ctrl+Spacebar does not maximize Python console on Windows
On windows, spacebar would be passed as UTF-8 text input, despite the
control key being pressed. On macOS, there already was an explicit
exception for this (command key in this case), on Linux XInput already
handled this case for us.
Note that Alt should still allow text input, for special character
sequences.

Issue also happened in the Text Editor if a text data-block was set.
2020-08-05 15:50:58 +02:00
ee351cb74d Fix T78869: denoising performance regression on Windows
Optimization was disabled in this function to work around a bug in MSVC, use
a different solution that does not come with such a big performance regression.
2020-08-05 15:46:44 +02:00
Jeroen Bakker
f7d38e2e64 Fix T77346: GPU Workaround Always Render Using Main Context
In Blender 2.90 EEVEE materials were refactored that introduced crashes on Intel
GPUs on Windows. The crash happened in the `local_context_workaround` that temporary
stored compiled materials in a binary form to reload it in the main GL context.

It has been tested that the workaround isn't needed anymore for HD6xx GPUs, but it
is still needed for HD4000.

After several unsuccesfull fixes we came to the conclusion that we could not support
the local context workaround and needed to come with a different workaround. The idea
of this patch is that in these cases there is only a single context that is used for
rendering. Threads that uses these contextes are guarded by a mutex and will block.

Impact on User Level:
* Due to main mutex lock the UI freezes when rendering or baking or feel less snappy

Reviewed By: Clément Foucault, Brecht van Lommel

Differential Revision: https://developer.blender.org/D8410
2020-08-05 15:45:42 +02:00
43d41675a4 Merge branch 'blender-v2.90-release' 2020-08-05 15:39:08 +02:00
56d7e39b92 Fix T79520: Data Transfer modifier: crash/assert going into editmode on a source object. 2020-08-05 15:36:24 +02:00
40ad989059 BLI: improve dot exporter interface 2020-08-05 15:30:22 +02:00
10109fd1b2 Fix union of two disjoint meshes.
Also added unit test for that.
2020-08-05 09:25:25 -04:00
754a663f68 Cleanup: remove some private fields that are currently unused 2020-08-05 14:59:06 +02:00
c961bf8975 GPUTexture: Fix missing break 2020-08-05 14:17:34 +02:00
42f4233871 Merge branch 'blender-v2.90-release' 2020-08-05 14:10:08 +02:00
229fe01a15 PyDoc: use glClearColor before glClear in gpu docs
ref T79491

Maniphest Tasks: T79491

Differential Revision: https://developer.blender.org/D8471
2020-08-05 14:09:00 +02:00
1cf5c5085e Merge branch 'blender-v2.90-release' into master 2020-08-05 14:04:11 +02:00
f9aba4f6e1 Fix T79374: Render audio produces random clipping
Port of the bugfix from audaspace upstream.
2020-08-05 14:02:59 +02:00
396abbbfe7 Audaspace: port documentation bugfix from upstream. 2020-08-05 14:02:59 +02:00
a6b0a2356a Merge branch 'blender-v2.90-release' 2020-08-05 13:06:11 +02:00
f96afde3bd Fix T79544: No sound in video sequencer preview.
Directly caused by rB2bb73787791a, but actual issue was a pre-exiting
typo that never caused problems so far apparently...
2020-08-05 13:05:51 +02:00
2c5c39d53c Merge branch 'blender-v2.90-release' 2020-08-05 13:00:15 +02:00
02ccc37144 Correct recent fix for Cycles motion blur test
Need to only compare directory name, not the whole path.
2020-08-05 12:59:28 +02:00
85e11ca7fb Fix possible fall-through after recent change 2020-08-05 12:25:12 +02:00
e4a4dc5309 BLI: add dot::Edge.set_label method
This method sets the label of an edge in a dot graph.
2020-08-05 12:22:45 +02:00
fc9f7e3e51 Merge branch 'blender-v2.90-release' 2020-08-05 12:19:28 +02:00
c3113724ed Fix T78630: Custom icons not grayed out in inactive layouts
For regular icons this worked because they used the text color, which
was already grayed out by the caller.
2020-08-05 12:19:14 +02:00
ec9ab00fcb Fix failing USD test on macOS after becoming part of blender test runner 2020-08-05 12:15:17 +02:00
de53178b26 Fix T78777: Cycles motion blur test differences between AVX/AVX2
This appears to be slight precision differences in the Embree implementation,
simply increase the diff threshold a little for these motion blur tests.
2020-08-05 11:45:31 +02:00
7088422283 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:28 +10:00
3562978c35 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:25 +10:00
79cb0105cd Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:23 +10:00
8e5a4e3645 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:20 +10:00
db907ea888 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:17 +10:00
baf015be31 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:14 +10:00
05fbbfec0b Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:03 +10:00
4a289081a5 Keymap: add back Shift-K to cut-through selected faces
Resolves T78540
2020-08-05 16:24:26 +10:00
ef7b804e26 Cleanup: missing 'initialize' -> 'init' from previous cleanup 2020-08-05 11:56:14 +10:00
006698167b Cleanup: spelling 2020-08-05 11:49:31 +10:00
7198e9d10e Fix unreported crash in gpu_free_unused_buffers
As far as I can see, this problem was introduced with the gpu_free_unused_buffers() changes in rB97b597c.

The code checks the returned pointer to stop looping, but the last iteration will return the last GPUTexture and set the queue to NULL, meaning that the next pop() will crash.

Differential Revision: https://developer.blender.org/D8468
2020-08-05 02:35:23 +02:00
fce71a255c EEVEE: LightCache: Add warning if the cache cannot be saved 2020-08-05 02:26:44 +02:00
6390b530d0 Fix T78529: Blend file corrupted during save caused by high Cubemap Size
This just avoid the corruption. A better fix still need to be finished.

See P1564
2020-08-05 02:26:44 +02:00
6be8b6af40 EEVEE: LightCache: Prevent crash when using a lightcache too big
Some implementation have different maximum texture size.
This patch avoid crash when texture allocation fails when:
- trying to bake a lightcache too big for the OpenGL imeplementaion.
- loading a cache from file that is too big for the OpenGL imeplementation.
2020-08-05 02:26:44 +02:00
d1b3da697d GPUTexture: Check PROXY textures for cubemap types
It can happen than some textures are not supported on some implementation
even if they fix the `GPU_max_texture_size` and `GPU_max_texture_layers`.
2020-08-05 02:26:44 +02:00
de947c5c50 GPUTexture: Improve debug print 2020-08-05 02:26:44 +02:00
3a522f7a7f Fix T79213 EEVEE: rendering with motion blur can change current frame
It seems to be expected that the render engine reset to the right CFRA
if it modifies it.
2020-08-05 02:26:44 +02:00
1ccb997c6d Fix T79497: Crash when removing strips with prefetching
This was already fixed by 0471349c90 but accidentally removed in refactor.
2020-08-05 01:40:02 +02:00
deb76548c1 Merge branch 'blender-v2.90-release' 2020-08-04 23:34:55 +02:00
3ebe97c06b Fix T78665: Face Set visibility reverted when chaning Multires Levels
Face Sets where only set and updated on the PBVH after starting a sculpt
tool. In order to preserve the visibility they store when changing
levels, they need to be updated and sync also on PBVH creation

Reviewed By: sergey

Maniphest Tasks: T78665

Differential Revision: https://developer.blender.org/D8225
2020-08-04 23:33:51 +02:00
50e6d56e4e Fix missing duplicates in the subdiv_ccg neighbors function
Duplicates of a grid corner adjacent to an edge which are on the
adjacent grid of the same face were not added when requested.

Needed for D8356 to work, it may also fix some other bug in Multires.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8385
2020-08-04 23:21:12 +02:00
bf65820782 Sculpt: Cloth brush Pin Simulation Boundary property
The cloth brush has a defined simulated area with a falloff. In the falloff
area (the area between the dashed white circle and the exterior white
circle), simulation properties change in order to fade out the
simulation deformation effects towards the boundary.
With some brushes and stroke types (like anchored strokes with pinching
or grabbing with full strength), it is possible to apply more force than
what the boundary falloff can compensate, so the simulation breaks when
this happens.
This option pins the falloff area with softbody constraints, This
produces a much better deformation falloff and it is no longer possible
to move the vertices near the simulation boundary, so the simulation
won't break no matter the strength of the forces applied inside the
simulated areas.
This is an option as it is particularly useful for some brushes to add
localized details, but for brushes that are supposed to deform the
entire mesh (like the grab brush in D8424), this can add unwanted
softbody constraints that affect the simulation result.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8435
2020-08-04 23:06:14 +02:00
6faa765af8 Sculpt: Split Box Mask into its own operator
Box mask is not a selection, so it should not be part of the select
operator. This allows to add more sculpt mode specific functionality and
properties and to share more code with the lasso mask operator in a
later refactor.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8456
2020-08-04 22:52:20 +02:00
37d326a052 Merge branch 'master' into newboolean 2020-08-04 15:35:50 -04:00
1ae25d48dd Resetting some stuff that got messed up with previous commit. 2020-08-04 15:20:50 -04:00
1ae9960a15 Merge branch 'blender-v2.90-release' into master 2020-08-04 12:15:14 -06:00
304767dcd3 Fix T78688: Crash changing workspace with specific fullscreen setup
When switching workspaces we need to have an unused screen layout that
we can activate. The other window now showed the only available screen
layout in fullscreen though.
Usually when there's no unused screen layout we duplicate an existing
one, but that code didn't respect the fullscreen case properly.

This also tries to clean up the logic a bit, but things are still rather
complicated to follow.

Changes in this code are always risky. Of course things worked fine in
my tests, but I wouldn't be surprised if something breaks.
2020-08-04 20:12:07 +02:00
97be726f93 Fix T74796: Outliner child objects hidden when collections are filtered
Filtering Collections when also filtering object children would only
display the parent object. Add a check for the NO_CHILDREN filter before
creating the object-parent hierarchy.
2020-08-04 12:05:05 -06:00
f2bee8e5e6 Fixed several filtering bugs.
Several bugs with the acceleration filters cauased crashes and
incorrect results. Redid the error analysis and found some mistakes.
There was also a bug in the code for checking non-trivial intersections.
Now you can boolean a standard cube and cylinder and scale the cylinder
without crashing.
Also rewrote the tri-tri intersection code to make it more understandable
and also prepare the way for more floating filters.
2020-08-04 13:48:30 -04:00
e4370eccdf Fix T71488: Flipping Custom Split Normal Data leads to artifacts
The winding order of the faces changes when flipping the faces.
This lead to the loop indices changing as well.

Now we take this into account when restoring and flipping the custom
normals. Before the normals would be swapped.
2020-08-04 19:43:34 +02:00
0d3b5a5068 Fix T71488: Flipping Custom Split Normal Data leads to artifacts
The winding order of the faces changes when flipping the faces.
This lead to the loop indices changing as well.

Now we take this into account when restoring and flipping the custom
normals. Before the normals would be swapped.
2020-08-04 19:32:24 +02:00
205cf0500d Fluid: Minor cleanup in addition to fix for TT72192
Make curly brackets consistent.
2020-08-04 18:20:49 +02:00
df28a68e70 Fix T72192: Mantaflow does not render flame when flow source is hidden from Renders
The problem in this case was that the flag for active fire was not set. With hidden flow sources the flag was not updated in update_flowsflags().

The solution for this is to take the active field from the config cache file.
2020-08-04 18:09:17 +02:00
f2ac432467 Cleanup: Bevel: Split two case for loop into separate function
Previously a for loop with two iterations was used to calculate the
3D segment locations for the input number and the higher power of 2.
Splitting off the inside of the for loop to a separate function makes
the code more readable.

This commit also includes a simple timer for bevel, enabled with a
define. Interestingly, the cleanup in this commit happended to give
a 3% speedup on a Ryzen 3700x for a bevel calculation with 64
segments.
2020-08-04 11:43:42 -04:00
e818f1274b Fix T78932: fix linking reroute nodes of different type
Reviewers: mano-wii

Differential Revision: https://developer.blender.org/D8460
2020-08-04 17:36:50 +02:00
93d8373edb Merge branch 'blender-v2.90-release' 2020-08-04 17:14:06 +02:00
a4a814a180 Fix buildbot macOS packaging error after recent changes 2020-08-04 17:13:09 +02:00
f130cd1169 Point Clouds: basic support for instancing objects on points
Same exact system as instancing on vertices for a mesh. More powerful ways
of instancing will be added at some later point, but this makes the basics
works and is consistent with other geometry types.
2020-08-04 17:11:00 +02:00
89baafc8e2 Merge branch 'blender-v2.90-release' 2020-08-04 16:57:50 +02:00
9538e38704 Fix buildbot packaging error after recent changes 2020-08-04 16:54:18 +02:00
21c31885ed Merge branch 'blender-v2.90-release' 2020-08-04 16:39:03 +02:00
b1976d131c Fix broken Alembic tests following motion blur commit
The tests were broken because of an extra call to
RNA_def_struct_name_property which set the name of the velocity
attribute to be the string used to identify CacheFiles in
bpy.data.cachefiles.
2020-08-04 16:10:51 +02:00
7bad5e0d18 Cleanup: clang-format after recent cleanup commit
Remember to run `make format` after any massive cleanup please.

This "issue" introduced on 901ee66ea1.
2020-08-04 16:01:26 +02:00
16c7b6a7fe Buildbot: make code signing of packages optional with --codesign parameter
This is in preparation of doing builds per commit that will not be code signed.

Ref D8438

Differential Revision: https://developer.blender.org/D8451
2020-08-04 15:44:41 +02:00
0e87a35f8e Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-04 15:37:49 +02:00
e8483f9bd7 Fix T78758 Alembic export: crash when file is in use by another application
In cases when the output file cannot be opened, an exception is thrown that
was not caught.
2020-08-04 15:23:43 +02:00
f5919a7ad1 Merge branch 'blender-v2.90-release' 2020-08-04 15:05:39 +02:00
e1a10b5e53 Fix T79234: Material preview does not update
When changing the material while the properties editor temporarily isn't
visible (e.g. because another editor is in full-screen or a different
workspace is active), the preview wouldn't be updated on changes.

Always trigger a material preview update on screen layout or editor type
changes.
2020-08-04 15:05:24 +02:00
5270462953 Fix T79234: Material preview does not update
When changing the material while the properties editor temporarily isn't
visible (e.g. because another editor is in full-screen or a different
workspace is active), the preview wouldn't be updated on changes.

Always trigger a material preview update on screen layout or editor type
changes.
2020-08-04 14:55:55 +02:00
675fa2ee13 Refactor: rename SpaceType->new to SpaceType->create
The data member `new` was conflicting with the `new` keyword
when `BKE_screen.h` was included in C++ files.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D8459
2020-08-04 14:40:15 +02:00
7fbbe71922 Depsgraph: Fix wrong forward declarations 2020-08-04 14:25:13 +02:00
5f621a12c6 Merge branch 'blender-v2.90-release'
Conflicts:
	source/blender/editors/gpencil/gpencil_primitive.c
2020-08-04 13:36:58 +02:00
ca606bf551 Merge branch 'blender-v2.90-release' into master 2020-08-04 21:28:21 +10:00
701a9d3917 Cleanup: typos & co in UI messages (and some other places). 2020-08-04 13:26:58 +02:00
0dff6b2b4b Cleanup: unused main argument 2020-08-04 21:25:28 +10:00
164f40c50a Fix T79503: Selecting edit-bones while holding Ctrl crashes 2020-08-04 21:23:53 +10:00
d6762bedee Merge branch 'blender-v2.90-release' 2020-08-04 12:59:20 +02:00
f921ae4665 Fix T79453: Motion Tracking: marker does not remember 'enabled' state
Caused by rB63ee3db96107.

While above commit corrected the clip offset, it also removed logic to
ensure a marker on a particular frame. This is needed though, otherwise
changes on a particular frame are applied to the marker being returned
by 'BKE_tracking_marker_get' which can be a completely different marker
if none exist for that frame yet.

This patch partly reverts rB63ee3db96107 and reintroduces the framenr
for the MarkerUpdateCb and uses that to ensure a marker on that frame.

Candidate for backporting to 2.83 LTS?

Reviewers: sergey, jacqueslucke

Subscribers:
2020-08-04 12:52:40 +02:00
a9e0aeaf65 Fix crash switching render slots when there is only one slot 2020-08-04 20:11:57 +10:00
778f0aca52 Merge branch 'blender-v2.90-release' 2020-08-04 12:08:09 +02:00
03c2439d96 Fluid: Do not show fluid if frame is out of cache range
Before: If the current frame is out of the cache start/end range, the viewport will show the fluid as it was on the last frame that was still in the cache frame range.

Now: If the current frame is out of the cache start/end range, the viewport will show no fluid at all (even if there are cache files present for this frame).

This fix is related / in response to T79423.
2020-08-04 11:45:05 +02:00
8d3b8bc835 Depsgraph: Use UUID to identify pose channels
Fixes possible fiasco caused by re-allocation re-using pointers between
pose channels.

Differential Revision: https://developer.blender.org/D8453
2020-08-04 11:40:09 +02:00
52c2f296bc Pose channel: Add session UUID
Allows to identify pose channels more reliably than by the pointer.
2020-08-04 11:40:09 +02:00
51af20b856 Cycles: Fix nan in decomposed transform for degenerated input
The decomposed transform would have consists of nan values if the input
transform had zero scale.

Now the decomposition will check for zero scale, and if it is detected
then the result will be ensured to be finite. Additionally, rotation
value will be copied from previous/next time step to help avoiding
obscure interpolation.

The latter step can become more comprehensive than the current simple
implementation.

Differential Revision: https://developer.blender.org/D8450
2020-08-04 11:40:09 +02:00
7f6530e5bd Cycles: Add finite checks for float4 and transforms
Currently unused, preparing for an upcoming development.
2020-08-04 11:40:09 +02:00
b38c04aebe Cleanup: fixed unused parameter warning
No functional changes.
2020-08-04 11:36:28 +02:00
3642cbb1d2 Cleanup: converted Depsgraph Building Pipeline to object-oriented code
This will make it easier & cleaner to make custom-built depsgraph (for
example for exporting invisible objects to USD or Alembic, see T75936).

No functional changes.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D8423
2020-08-04 11:36:24 +02:00
15ad4f6f1f Merge branch 'blender-v2.90-release' 2020-08-04 11:57:09 +03:00
9306037ed3 Node Groups: expose the SOCK_HIDE_VALUE flag for node group inputs.
This flag specifies that even when the socket is not connected,
the node should not display the input field for the constant input
value. This is useful for inputs like Normal, which have special
handling for the missing input case and don't use a constant value.
Currently there is no way to change this flag from Python, and
through UI it can only be done by re-creating the socket.

This patch exposes the flag through RNA and UI, makes sure it
is properly updated when changed, and adds special handling to
ensure that it is correctly set when creating a node group from
a node set that includes reroute nodes.

Differential Revision: https://developer.blender.org/D8395
2020-08-04 11:29:16 +03:00
b016e7f258 Node Groups: fix placement of the Output node when creating a group.
Instead of assuming the node width, compute the actual right bound.
Otherwise BSDF nodes tend to be too wide, and intersect Output.

Differential Revision: https://developer.blender.org/D8395
2020-08-04 11:29:01 +03:00
f5eae90277 Fix T79493: EEVEE LightProbe Display
Introduced by recent EEVEE GLSL refactoring {da741013a1e1}
2020-08-04 10:09:31 +02:00
105ed22b95 Merge branch 'blender-v2.90-release' into master 2020-08-04 15:35:03 +10:00
c1386795a9 Modifier: bypass mesh conversion for hooks in edit-mode
Avoid the conversion for the hook modifier as riggers
may need to enable this modifier in edit-mode.

The speedup of the modifier alone is significant since the hook
operation is simple compared to conversion that took over 99.9%
of the time in my tests, however the overall speedup was around to 1.6x.
2020-08-04 15:34:04 +10:00
6791b88d28 Merge branch 'blender-v2.90-release' 2020-08-03 18:28:59 -04:00
9de5adc6a1 Fix: Remove debug print added mistakenly
This print whenever units are evaluated in number input was added in
45dbc38a8b mistakenly.
2020-08-03 18:28:39 -04:00
4b99df20d5 Merge branch 'blender-v2.90-release' 2020-08-03 18:18:02 -04:00
fbc3c1b24d Fix (unreported): Bevel tool custom profile uses wrong segments number
The bevel code initialized the CurveProfile with the "higher power of 2"
segments after the normal number of segments, leaving the widget in an
incorrect state after the calculation. A simple fix is to re-order the
initializations, doing the input number second.
2020-08-03 18:12:24 -04:00
862d79fffc Cleanup: Reduce indentation in function 2020-08-03 17:40:07 -04:00
452b896f2d Ocean Modifier: Fix render resolution only used for baking
The modifier needs to check that the cached ocean has the correct
resolution.
2020-08-03 15:33:32 -04:00
b5c737469d Cleanup: Avoid double operator name lookup 2020-08-03 14:00:14 -04:00
Adrian Newton
8356012068 UI: Change Header Position Label 'Default' to 'Keep Existing'
'Default' actually means 'Keep Existing' and it makes more sense to
display the more descriptive label.

Differential Revision: https://developer.blender.org/D7614
2020-08-03 12:37:48 -04:00
10590b0500 Fix missing shortcut indicators and crash on shortcut change
Fixes T78346.

The shortcut display and change code is context sensitive. To make it
work correctly the context needs to be set properly.
When executing operators from the dropdowns, the active region is the
header, but the shortcut handlers are set for the main region. So make
sure that is used instead.

This also sets the main region active for context menu operators, where
this issue shouldn't be present. Doing it anyway shouldn't hurt though
and fixes this issue in case somebody displays the context menu in the
header as dropdown too.
2020-08-03 18:26:06 +02:00
e9bcf09819 Cleanup: Typos in comments. 2020-08-03 17:42:45 +02:00
3593dff147 Fix T79374: Render audio produces random clipping
Port of the bugfix from audaspace upstream.
2020-08-03 17:42:36 +02:00
d66009f179 Fluid: Adjustments to force component reset
Instead of clearing forces at the end of the simulation step, they will now be cleared before writing to them, i.e. at the beginning of a step.

Also cleaned up minor areas that I looked at while making this change.
2020-08-03 17:39:56 +02:00
f24920790d Merge branch 'blender-v2.90-release' 2020-08-03 16:24:34 +02:00
473d9507fa Fix T78536: Crash calling object.modifier_apply on an empty
Caused by rB6add0cc88a0d.

Maniphest Tasks: T78536

Differential Revision: https://developer.blender.org/D8440
2020-08-03 16:20:46 +02:00
Phil Stopford
a44299ccd1 Ocean Modifier: Add viewport resolution
Following work done in 2.83, the resolution control is now a real
level-of-detail parameter. It is now useful to be able to set the
resolution for display independently from render. This is true for
both mesh generation and mesh deformation modes.

For compatibility with old scenes, resolution is retained and is the
render resolution. Old modifiers loaded have the value of resolution
also applied to viewport resolution. This allows newer modifiers to
be used in older versions without trouble

Differential Revision: https://developer.blender.org/D8336
2020-08-03 10:08:31 -04:00
30b52b6a4a Merge branch 'blender-v2.90-release' 2020-08-03 15:15:54 +02:00
2bb7378779 Fix T79222: Assert due to multiple building of same scene sequencer in depsgraph.
Just check and skip building if it has already been done before.

Thanks to @sergey for the help.
2020-08-03 15:11:05 +02:00
92f6f6d30e Audaspace: port documentation bugfix from upstream. 2020-08-03 14:21:54 +02:00
61eec61adb Merge branch 'blender-v2.90-release' into master 2020-08-03 21:14:49 +10:00
3f94f47113 Fix T79482: Triangulate quads with 'Beauty' can make zero area faces 2020-08-03 21:12:46 +10:00
1c4a695d70 Merge branch 'blender-v2.90-release' 2020-08-03 13:01:21 +02:00
14b77b37cb Fix T78428: Checkbox labels don't highlight on mouse-over in popovers
The text colors set by the general widget state function
(`widget_state()`) would always be overriden by the menu-back text
colors to avoid contrast issues. This would only respect the selected
state, not other states.

Address this now by changing the input theme colors to use the menu-back
ones, rather than overriding after the fact (calling `widget_state()`).
2020-08-03 13:00:53 +02:00
3c9cb62d82 Merge branch 'blender-v2.90-release' 2020-08-03 12:40:06 +02:00
33e6562a8a Fix T78266: Mantaflow: changing flow type (fire -> fire + smoke) resets Surface Emission
Changing the surface distance through the flow type is inappropriate here. It had been added to ensure that liquids / smoke use a different emission value.

Now the value will only be changed when changing from a gas to a liquid emitter or, vice-versa, when changing from a liquid to a gas emitter.
2020-08-03 12:38:07 +02:00
db5915d863 Merge branch 'blender-v2.90-release' 2020-08-03 12:36:52 +02:00
nutti
b5e3451540 Fix parameters in bpy.props.StringProperty Python API docs
There is a parameter typo in Python API document about bpy.props.StringProperty.
This patch fixes this.

Also this patch should apply to 2.90 branch as well.

Reviewed By: Grische, mont29

Differential Revision: https://developer.blender.org/D8430
2020-08-03 12:35:54 +02:00
633e9cef8c Merge branch 'blender-v2.90-release' 2020-08-03 12:11:52 +02:00
057f3f2f3d Fix T78575: Assert when using UILayout.prop_tabs_enum
Code required the tabs to be placed in an aligned region. Code should
work fine even for unaligned regions though, so I don't see a reason to
forbid this.
2020-08-03 11:57:20 +02:00
e17befe368 Install_deps: add libgmp as default dependency.
This is a common system library, no need for fancy building this time...

Part of D8384.
2020-08-03 10:44:07 +02:00
977f89ef2d Merge branch 'blender-v2.90-release' 2020-08-03 10:30:59 +02:00
fe70605a2a Building: Add ceres to Ninja's heavy jobs pool.
Some files in this library require more than 1.5Gb to build, so they
also belong to the 'heavy' pool.
2020-08-03 10:30:33 +02:00
040d7872e8 Merge branch 'blender-v2.90-release' into master 2020-08-03 18:03:49 +10:00
8f22feefbc Fix T79440: Deform modifiers fail in edit-mode when not first
Lattice, armature & curve only worked when an edit-mesh was passed in,
the mesh argument was being ignored.

Regression in 9f5833798c
2020-08-03 18:01:34 +10:00
144f780c71 Cleanup: remove unused code, update comments 2020-08-03 15:14:08 +10:00
83d6290800 Cleanup: remove trailing space, newlines at eof 2020-08-03 15:14:02 +10:00
21f150cc90 Merge branch 'blender-v2.90-release' into master 2020-08-03 15:13:52 +10:00
d406edf1ee Mesh: correct negative material indices when validating
Fixes corrupt mesh from T79451.
2020-08-03 14:48:16 +10:00
b5dcf74636 Cycles: add support for rendering deformation motion blur from Alembic caches.
This patch adds the ability to render motion blur from Alembic caches.
The motion blur data is derived from a velocity attribute whose name has
to be defined by the user through the MeshSequenceCache modifier, with a
default value of ".velocities", which is the standard name in Alembic
for the velocity property, although other software may ignore it and
write velocity with their own naming convention (e.g. "v" in Houdini).

Furthermore, a property was added to define how the velocity vectors
are interpreted with regard to time : frame or second. "Frame"
means that the velocity is already scaled by the time step and we do not
need to modify it for it to look proper. "Second" means that the unit
the velocity was measured in is in seconds and so has to be scaled by
some time step computed here as being the time between two frames (1 /
FPS, which would be typical for a simulation). This appears to be
common, and is the default behavior.

Another property was added to control the scale of the velocity to
further modify the look of the motion blur.

Reviewed By: brecht, sybren

Differential Revision: https://developer.blender.org/D2388
2020-08-03 03:44:40 +02:00
3e30fd75ab Fix bugs re triangle sorting.
Several somewhat self-compensating bugs in the routine that sorts
triangles around an edge let to a bug visible with a unit cube
subtracting a unit cylinder with 4 sides. Fixed.
2020-08-02 17:13:54 -04:00
396d0b5cd0 Particles: new Age Reached Event, Kill Particle and Random Float node
The hardcoded age limit is now gone. The behavior can be implemented
with an Age Reached Event and Kill Particle node. Other utility nodes
to handle age limits of particles can be added later. Adding an
Age Limit attribute to particles on birth will be useful for some effects,
e.g. when you want to control the color or size of a particle over its
life time.

The Random Float node takes a seed currently. Different nodes will
produce different values even with the same seed. However, the same
node will generate the same random number for the same seed every
time. The "Hash" of a particle can be used as seed. Later, we'd want
to have more modes in the node to make it more user friendly.
Modes could be: Per Particle, Per Time, Per Particle Per Time,
Per Node Instance, ...
Also a Random Vector node will be useful, as it currently has to be
build using three Random Float nodes.
2020-08-02 22:10:47 +02:00
d1063575b5 Merge branch 'blender-v2.90-release' 2020-08-02 21:00:09 +02:00
0264f53e30 Fix T67181: Only the first added movie strip will have audio below
Find free slot first for sound strips then for movie strips.
This patch also fixes issue where all strips were added to channel 2 by default.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8339
2020-08-02 20:54:37 +02:00
189eb2550d Fix T66805: No cache invalidation with remove gaps operator
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8379
2020-08-02 20:53:55 +02:00
e65ddfa5fd Fix building WITH_GMP in case of boolean modifier.
Left out a define.
Also, added more debugging in boolean.cc.
2020-08-02 10:30:35 -04:00
b9845566b4 Merge branch 'master' into newboolean.
Also, make it possible to build when WITH_GMP is disabled.
2020-08-02 09:35:20 -04:00
771da552bb Warning removal: Remove unused argument; make a private function static. 2020-08-02 06:44:42 -04:00
4f27e94146 Merge branch 'blender-v2.90-release' into master 2020-08-02 18:13:15 +10:00
422954b708 Merge branch 'blender-v2.90-release' into master 2020-08-02 18:13:11 +10:00
ed6bec8d1a Merge branch 'blender-v2.90-release' into master 2020-08-02 18:13:05 +10:00
89167dd304 Merge branch 'blender-v2.90-release' into master 2020-08-02 18:12:58 +10:00
nutti
cc0d8ab036 Docs: add translation keyword argument default for msgctxt 2020-08-02 18:12:31 +10:00
nutti
c442ff0017 Fix RST syntax for freestyle documentation 2020-08-02 18:12:22 +10:00
f349a53c08 Fix T78691: Fly/Walk navigation ignores object channel locks 2020-08-02 18:10:07 +10:00
70d7805fa9 Cleanup: pass const matrices
Also order return matrices last.
2020-08-02 18:02:20 +10:00
a3a6b71a9d Cleanup: pass const matrices
Also order return matrices last.
2020-08-02 17:17:31 +10:00
0e308b07a0 Merge branch 'blender-v2.90-release' into master 2020-08-02 16:20:51 +10:00
ba6ed01058 Fix UV face dot refresh when toggling sync-select 2020-08-02 16:11:07 +10:00
8305dd9499 Cleanup: localize creator.c definitions
As creator.c is used for the 'main' function,
avoid obscure declarations being placed so prominently.

- Move Blender as a Python module declarations into it's own section.
- Move USD declaration to an 'extern' just before it's called.
2020-08-02 13:11:30 +10:00
6a444830a3 GPU: Convert gpu_matrix.c to C++ 2020-08-02 02:10:22 +02:00
6941e27f4a GPU: Convert gpu_shader_interface.c to C++ 2020-08-02 02:10:22 +02:00
de097b28cc Cleanup: OCIO: Remove extern "C" around blender headers 2020-08-02 02:10:22 +02:00
eb0231f20f Handle cases of nested meshes.
This fixes some "implement me" crashes and also case where one
moves a cutter completely inside the cut mesh.
Also fixed a bug in the implementation of mpq3::distance_squared.
2020-08-01 18:24:16 -04:00
7cd2c1fd2e Particles: support custom particle events in solver
Previously, there were only particle-birth and time-step events.
Now the solver can handle custom events. On the user level
this does not change anything yet. This feature of the solver
will be used by an upcoming Age Reached Event node and
possibly others. When this node exists, I can finally remove
the hardcoded maximum particle age.
2020-08-01 21:56:05 +02:00
6141549fee Fix error in recent rename
This function is defined outside of Blender.
2020-08-01 20:04:22 +10:00
6119f3cad1 Cleanup: spelling (initialized) 2020-08-01 13:57:27 +10:00
901ee66ea1 Cleanup: use term init instead of initialize/initialise
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
2020-08-01 13:51:05 +10:00
006e850a84 Cleanup: spelling 2020-08-01 12:52:11 +10:00
03afffc96a Merge branch 'blender-v2.90-release' into master 2020-08-01 12:18:29 +10:00
06f3312b04 Merge branch 'blender-v2.90-release' into master 2020-08-01 12:18:24 +10:00
72b422c1e1 UV: support select linked with sync-select in vert/edge modes 2020-08-01 12:15:05 +10:00
732434cb1f Fix T46568: UV select-linked failure to de-select
Shift-L was de-selecting all instead of the linked UV's.
2020-08-01 12:14:42 +10:00
106e7654e8 Fluid: Another adjustment for Python pointers
Yet another update to ensure that pointer variables are always up to date, i.e. those referencing the memory allocated by Mantaflow. Outdated pointers usually show up through flickering in viewport.
2020-07-31 23:27:51 +02:00
251ae108e7 Merge branch 'blender-v2.90-release' 2020-07-31 18:20:51 +02:00
71683be4bb Fix T78884: GPencil weight paint crash when painting over modifier generated points
The weight must be added only to the real points, not to the autogenerated points by modifiers. This affects, not only to subdivide, but to any modifier that generate points.
2020-07-31 18:20:39 +02:00
7e64f6cee4 Fluid: Fix for Python pointer update (flickering in smoke/fire issue)
In f2b04302cd the pointer update was refactored. It was sufficient to update pointers just in replay mode at the end of a step since the 'ensure()' functions from manta_fluid_API.cpp had their own pointer update call. These were removed in 51f4bee5a5, however, and so in order to still have some sort of update, the given update call needs to be available to all cache types.
2020-07-31 17:42:08 +02:00
83f8223543 Deps builder: Add support for building GMP
Required for the new boolean code, disabled by default
until all platforms have landed the libs and the boolean
code actually lands in master.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8384
2020-07-31 09:34:26 -06:00
a2c6c51647 Merge branch 'blender-v2.90-release' 2020-07-31 16:46:35 +02:00
cab9673bed Fix T79111: Cycles: Image Sequence not rendering
Caused by c7aa0f9d74.

Since above commit, BKE_image_user_frame_calc requires an image (not
just the iuser) to get the framenumber.

Cycles used to call this with NULL image (in `image_user_file_path` and
`image_user_frame_number`), now pass the image as well.

Maniphest Tasks: T79111

Differential Revision: https://developer.blender.org/D8439
2020-07-31 16:39:22 +02:00
2a0a2c1054 Fluid: Cleanup and improved readability
A collection of multiple changes that had been living in my stash:

- Use nullptr instead of NULL in C++ files
- Removed unused/deprecated functions from headers
- Cleared animatable flag in cache UI
- Comment cleanups
2020-07-31 16:32:02 +02:00
51f4bee5a5 Fluid: Refactored Python fluid initialization functions
Initialization functions now have a return type which will be asserted during fluid object creation.
2020-07-31 16:32:02 +02:00
f2b04302cd Fluid: Refactored Python pointer update function
Use static_cast() where possible and refresh pointers for every frame when in replay mode. The latter is particularly important as this seems to have caused the issue where smoke in the viewport was flickering when loading data from pointers after loading them from disk for the frame before (e.g. when resuming a bake job).
2020-07-31 16:32:02 +02:00
227e20f370 Merge branch 'blender-v2.90-release' 2020-07-31 11:25:56 -03:00
1ff1a2be9c Fix T78600: Crash when transforming doubles with mirroring on
`EDBM_verts_mirror_cache_begin_ex` could do a better work avoiding these
duplicates, but this is a separate problem.
2020-07-31 11:24:34 -03:00
201b4051ba Fluid: Fix missing WITH_FLUID in draw code
The new draw code from 486c7b87fb  was just missing a WITH_FLUID flag.
2020-07-31 15:19:29 +02:00
04ba7e05e8 Merge branch 'master' into newboolean 2020-07-31 08:49:42 -04:00
81caec8c60 Fix blender_test runner build on the buildbot on Linux and macOS
Add our own copy of the gtest discovery scripts from CMake a few reasons:
* Use the very latest version which supports PRE_TEST for Windows
* Fix usage of [] symbols in file paths that fail with the zsh shell
* Disable asan leak checker when discovering tests

This means Windows also no longer requires the very latest CMake 3.18.
2020-07-31 14:41:13 +02:00
5628aaeee1 Fix build of blender_test runner on macOS 2020-07-31 14:15:42 +02:00
3785dc59d1 Merge branch 'blender-v2.90-release' 2020-07-31 13:47:46 +02:00
feaed44ef6 GPencil: Fix unreported missing last point in NURBS conversion
The last point of the curve was missing.
2020-07-31 13:47:12 +02:00
c565f16afb Fix T79397: blurry icons at some UI scales, after recent refactor
Solution found by Yevgeny Makarov.
2020-07-31 12:39:58 +02:00
ded4b72002 Merge branch 'blender-v2.90-release' 2020-07-31 12:20:27 +02:00
627b294317 Fix build error with clang 2020-07-31 12:03:11 +02:00
db24e289b2 Merge branch 'blender-v2.90-release' 2020-07-31 11:53:22 +02:00
de68880e79 Cleanup: Remove unused original pointer in Sequence 2020-07-31 11:45:40 +02:00
1e7afea2bb Fix T78835: Ghosting audio after using undo
The root of the issue comes to the fact that sub-data pointers were
used to match strips before/after copy-on-write. The undo system might
re-use sub-data pointers after re-allocating them, making it so that,
for example, pointer used by sound strip is later re-used by video
strip.

This fix takes an advantage of recently introduced per-sequence UUID
and uses it to match sequences before/after copy-on-write.
2020-07-31 11:45:40 +02:00
9ea6228b07 Sequencer: Ensure UUIDs are updated when needed
Document cases where it seems that they need to be updated, but where
the proper behavior is to not update the UUID.
2020-07-31 11:45:40 +02:00
eb8cbb6d7c Depsgraph: Add command line argument to debug UUIDs
Will trigger code paths which makes sure UUIDs are generated and
are unique.

Enabled with --debug-depsgraph-uuid (which is also implied by
--debug-depsgraph).
2020-07-31 11:45:00 +02:00
cc63897c22 Sequencer: Add session UUID check function
Is aimed for use during development and debug, to help
verifying that operations do not leave sequences with
invalid UUIDs.
2020-07-31 11:44:59 +02:00
3305a94fa1 Sequencer: Add session UUID management to Sequence
This is the first step for having sequences covered with session UUID
with the goal to remove code which uses original sequence pointer to
match sequences.

Currently this UUID is maintained on file load, allocation and leaf
duplication function.There are more cases to cover and ensure UUID
is re-generated or re-used when needed. It will be done as follow-up
development.
2020-07-31 11:44:59 +02:00
44b32e0e4a Sequencer: Add session UUID field to the Sequence DNA 2020-07-31 11:29:55 +02:00
de21ddf821 BLI: Initial implementation of generic session UUID API
Covers basics like generation of new UUID.

Also contains code needed to use the SessionUUID as a key in the Map.
2020-07-31 11:24:03 +02:00
cd579c4996 Add generic session UUID structures to DNA
Allows to use pre-defined structure for session UUIDs in all data
structures which needs it: pose channels, sequencer strips, modifiers.

The goal of all this is to have a reliable way of matching original
and copy-on-written versions of data, so that it's possible to
preserve runtime caches.
2020-07-31 11:22:05 +02:00
f379bb368b BLI: fix float3 in-place operators 2020-07-31 11:17:33 +02:00
585c9c2f23 Merge branch 'blender-v2.90-release' 2020-07-31 10:51:00 +02:00
298d5eb669 UI: fix buttons ranges not properly updated when tabbing to next/previous
button

This was reported for the FCurve modifier restrict ranges, but might fail
elsewhere, too. Reason is that the post_but has its range (hardmin/
hardmax etc) set before the updates to the active button take place, so
changes here dont end up on the post_but (even though the RNA range
function is properly called for a new defined button - new one is not the
same as the post_but though).

Now update the ranges on the post_but when that gets active.

Fixes T78763

Maniphest Tasks: T78763

Differential Revision: https://developer.blender.org/D8265
2020-07-31 10:47:52 +02:00
f3e8326453 Cleanup: fix function signature 2020-07-31 10:13:33 +02:00
59c14c1a62 Merge branch 'blender-v2.90-release' 2020-07-30 22:08:54 -04:00
8c375113b5 UI: Label Fixes
These were added in rB146473f08335e8cb774ccaf1baad82a1d308fbe1 however 
there were a few errors with the labels:

1. Underscore in label
2. Abbreviation when not needed
2020-07-30 22:05:25 -04:00
9f23dbe75c Merge branch 'master' into newboolean 2020-07-30 19:47:41 -04:00
a85a52f064 Fix wrong use of initializer in C++. Fix unused parameter. 2020-07-30 19:13:53 -04:00
7755a2ed78 Fix a coplanar case - two cubes forming steps.
Needed careful logic about what to do with zero volume cells.
It worked before on some cases by accident, but now it should
work on any depth stack of coincident faces.
2020-07-30 17:58:36 -04:00
44928a2a8f Fix: Blender_test not working on windows.
This bumps the minimum requirement for cmake from 3.10 to 3.18 on windows
if `WITH_GTESTS` is enabled.

Reviewed By: sergey brecht sybren campbellbarton

Differential Revision: https://developer.blender.org/D8405
2020-07-30 13:18:05 -06:00
848cbe889b Fix T79347 GPU: Segfault starting blender 2020-07-30 19:43:53 +02:00
9132fd8825 Merge branch 'blender-v2.90-release' into master 2020-07-30 11:24:39 -06:00
f45f8a7a89 Fix T79278: Selected object filter skipping collection instances
Collection instance datablocks were not filtered out when only showing
the selected object. They were treated as a collection (which should
show when filtering objects). Adds a case to check if the parent is an
object.
2020-07-30 11:19:07 -06:00
David Vogel
820ca419e0 Add compound shape for rigid body simulation
This patch adds a new compound shape entry to the shape selection
dropdown. It also corrects wrong inertia calculation for convex hulls,
that resulted in strange behavior for small objects.

The compound shape take the collision shapes from its object children
and combines them. This makes it possible to create concave shapes from
primitive shapes. Using this instead of the mesh collision shape is
often many times faster.

Reviewed By: Sergey, Sebastian Parborg

Differential Revision: http://developer.blender.org/D5797
2020-07-30 18:53:35 +02:00
d3944940f9 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-30 18:38:08 +02:00
Valentin
4089b07aa0 Cleanup: Remove pre 2.80 headers
Review: D8341
2020-07-30 18:37:36 +02:00
8dc2fbd7b6 Fix T79117: dependency cycle with passive rigid body objects
Reviewers: zeddb

Differential Revision: D8431
2020-07-30 18:22:29 +02:00
27d50d6f67 Enable header auto-complete suggestions in Xcode
Description of `USER_HEADER_SEARCH_PATHS` build setting:
"
This is a list of paths to folders to be searched by the compiler
for included or imported user header files (those headers listed
in quotes) when compiling C, Objective-C, C++, or Objective-C++.
Paths are delimited by whitespace, so any paths with spaces in
them need to be properly quoted. See Always Search User Paths
(Deprecated) (ALWAYS_SEARCH_USER_PATHS) for more details
on how this setting is used. If the compiler doesn't support the
concept of user headers, then the search paths are prepended to
the any existing header search paths defined in Header Search
Paths (HEADER_SEARCH_PATHS).
"

http://help.apple.com/xcode/mac/current/#/itcaec37c2a6

Xcode doesn't use `HEADER_SEARCH_PATHS` for auto-complete. Only the
header files in the same directory as the current file are suggested.

CMake as of now correctly sets `SYSTEM_HEADER_SEARCH_PATHS` and lumps the
rest in `HEADER_SEARCH_PATHS`.  The standard way is to use
`USER_HEADER_SEARCH_PATHS` & `SYSTEM_HEADER_SEARCH_PATHS` and let
`HEADER_SEARCH_PATHS` be used as a fallback for compilers which do not
distinguish between `<*.h>` and `"*.h"` syntax.

So set `USER_HEADER_SEARCH_PATHS` to the include paths specified
in the `CMakeLists.txt` files of all targets.
2020-07-30 21:13:26 +05:30
168653ed1d Merge branch 'blender-v2.90-release' 2020-07-30 17:36:20 +02:00
ff1d599172 Fix T79357: VSE crash on prefetching when performing cuts
Caused by {rBa1a333a1e92e}

`BKE_sequencer_prefetch_get_original_sequence` cant get a sequence in
`BKE_sequencer_cache_put`.

rBa1a333a1e92e moved multiple NULL checks (including the one checking
seq) above BKE_sequencer_prefetch_get_original_sequence (this should
never return NULL really, but this is for another fix).

So solution suggested by @ISS is to just stop prefetching all together
before changing content of seqbase.

Maniphest Tasks: T79357

Differential Revision: https://developer.blender.org/D8421
2020-07-30 17:29:48 +02:00
b1bfcf9f6b GPU: Fix compilation error (missed one) 2020-07-30 17:17:16 +02:00
2d38ff67d3 GPU: Fix compilation error 2020-07-30 17:08:23 +02:00
d7a28b3d1a Cleanup: IMB: Put lowercase prefix on static functions 2020-07-30 16:55:42 +02:00
da741013a1 EEVEE: GLSL refactor/cleanup
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code
complexity and duplication.
- split bsdf_common_lib.glsl into multiple sub library which are now shared
with other engines.
- the surface shader code is now more organised and have its own files.
- change default world to use a material nodetree and make lookdev shader
more clear.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D8306
2020-07-30 16:44:58 +02:00
55401fbb3d IMB: Refactor util_gpu.c to not expose enum getters
This was causing compiler error on MSVC and is not a good idea
in general.
2020-07-30 16:44:57 +02:00
008ccacdfc Cleanup: Use MEM_calloc_arrayN in the Cloth Brush
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8432
2020-07-30 16:23:19 +02:00
2e33c5ca15 Sculpt: Use constraints in cloth deform brushes
Previously, deform brushes were modifying the final positions in the
simulation directly, which was causing all sorts of artifacts in the
deformed area and problems with other features of the solver.
Now these brushes deform a separate array of positions and the solver
adds constraints to them, so the real vertices are moved when solving
the constraints. This prevents those artifacts and gives the brush a
much better behavior.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8424
2020-07-30 16:10:15 +02:00
49c1359b55 Sculpt: Enable persistent base for the cloth brush
The cloth brush builds the constraints when the stroke starts usign the
current state of the mesh. This means that deformations profuced by the
simulattion will accumulate after multiple strokes as it will always
start from the previous deformed state. While this is useful in many
cases, for other uses it is convenient to always simulate the same
initial shape, but applying different forces to it.

The persistent base options work like the persistent base in the layer
brush and allows the cloth brush to not accumulate deformation after
each stroke. When enabled, constraints are created for the shape stored
in the persistent base instead of from the current state of the mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8428
2020-07-30 15:59:35 +02:00
27b643d27a Merge branch 'blender-v2.90-release' 2020-07-30 14:27:07 +02:00
9cac158e96 Fix T78730: CLOG writes/reads outside allocated memory.
Fix several issues in CLOG code:
* In `clg_str_reserve`, allocated memory may be bigger than requested
  one, do not assign the latter back to `cstr->len_alloc`.
* `clg_str_vappendf` was mis-interpreting returned value from
  `vsnprintf`, and completely mixing total allocated memory and extra
  needed amount of memory to allocate...

Simplified code of `clg_str_vappendf` to only have allocating code
handled in one place, makes things easier to follow too.

Think this should also be beckported to 2.83.
2020-07-30 14:26:44 +02:00
19175f4757 GPUBatch & GPUImmediate: Use GPUShader instead of using raw OGL handle 2020-07-30 13:28:50 +02:00
3eff2b44db Merge branch 'blender-v2.90-release' 2020-07-30 13:02:29 +02:00
4251a87bf6 Fix usercount not decrementing in gpencil_stroke_separate_exec
This is part of T79273 where separating a stroke would result in
multiuser gpencil data for the original object.
Real underlying issue seems to be that gpencil multiuser objects (also
the ones created by Alt+D duplicating) have a problem evaluating
modifiers correctly [this will need further investigation].
Not sure if this is a limitation of D5470?

This patch only corrects the usercount on separating [which already fixes
the scenario reported because singleuser gpencil modifiers work
correctly].

Note: we could have also called `ED_object_add_duplicate` with the
`USER_DUP_GPENCIL` dupflag -- that would have taken care of the usercount
--, but then the whole following logic in `gpencil_stroke_separate_exec`
would need to change from **adding** layers/frames/strokes to
**removing** these.

Part of T79273

Maniphest Tasks: T79273

Differential Revision: https://developer.blender.org/D8419
2020-07-30 12:47:54 +02:00
742ad5acbc Merge branch 'blender-v2.90-release' into master 2020-07-30 17:45:26 +10:00
2bc017ece1 Fix T79207: Crash converting curve to mesh 2020-07-30 17:42:09 +10:00
5893a1562f Cleanup: split curve bevel into separate file 2020-07-30 14:54:39 +10:00
24d035b383 Merge branch 'blender-v2.90-release' into master 2020-07-30 14:21:54 +10:00
1f48e67002 Merge branch 'blender-v2.90-release' into master 2020-07-30 14:21:49 +10:00
422e5e372e Merge branch 'blender-v2.90-release' into master 2020-07-30 14:21:41 +10:00
0ab66dd63f Fix T79369: BMesh.calc_volume() gave incorrect result 2020-07-30 14:20:18 +10:00
69ec7ab873 UV: path select support with sync-select enabled
Also improve region fill with edge-select enabled which often failed
to include both vertices from each edge in the resulting region.
2020-07-30 12:07:10 +10:00
ff0112bcb2 Fix UV select with sync select enabled wasn't setting active 2020-07-30 11:02:03 +10:00
dc3baf2c78 Cleanup: spelling 2020-07-30 08:43:40 +10:00
929c94ee20 Cleanup: warnings 2020-07-30 08:43:40 +10:00
2181028292 Merge branch 'blender-v2.90-release' 2020-07-29 19:19:25 -03:00
699cefefd0 Fix ghash return value on 'Correct Face Attributes' with 'Keep Connect'
The result was somewhat unpredictable.
This error was recently introduced.
2020-07-29 19:17:56 -03:00
486c7b87fb Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRW 2020-07-29 23:21:33 +02:00
5f6fb5bb41 Cleanup: Split gpu_texture_image.c into BKE and IMB modules
This is in order to disolve GPU_draw.h into more meaningful code blocks.

All the Image related function are in `image_gpu.c`.
All the MovieClip related function are in `movieclip.c`.

The IMB module now has a connection with GPU. This is not strickly
necessary and the code could be move to `image_gpu.c` if needed.

The Image garbage collection is also ported to `image_gpu.c`.
2020-07-29 23:06:37 +02:00
7e8d493730 GPU_draw.h: cleanup before splitting 2020-07-29 23:06:37 +02:00
c09f61a915 RNA: Image API: Fix error in NULL check in rna_Image_gl_touch
This check was always returning true.
2020-07-29 23:06:37 +02:00
5f46a0fbce Cleanup: Rename define
*_LEN follows names elsewhere in Blender more closely than "_N_"
2020-07-29 17:01:46 -04:00
81ce8481b2 Fix failing PLY test, update hash because metadata changed 2020-07-29 19:49:53 +02:00
8c10e56331 Sculpt: Cloth Brush Soft Body Influence property
This property adds constraints to the simulation using the initial
location of the vertices, making it behave like a soft body. The
strength of these constraints can be modified with the brush parameter.
This makes some deformation modes more subtle and predictable, making it
possible to use the cloth brush to add surface detail in a more
controllable way without loosing completely the original shape of the
mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7845
2020-07-29 19:14:03 +02:00
ebda95953c Merge branch 'blender-v2.90-release' 2020-07-29 18:22:33 +02:00
3274ce0a8e Fix T79119: Hook modifier deformation not shown in edit mode.
Missing temp `BKE_mesh_wrapper_ensure_mdata` hack for the Hook
modifier...
2020-07-29 18:21:27 +02:00
f62c7c546a Merge branch 'blender-v2.90-release' 2020-07-29 17:39:59 +02:00
Bastien Montagne
4e6975ffd6 Fix T78285: Invalid thread safety in shrinkwrap modifier code.
This uses mesh's runtime mutex for both `BKE_mesh_runtime_looptri_ensure`
(was using its own global RW mutex before), and `BKE_mesh_wrapper_ensure_mdata`
(was not protected at all before).

This is more like a band-aid than a proper fix, as mentioned in the report
proper fix would be for the modifier to request those data (the relevant
BVHTree, which would implicitely also call the tow others) through flags,
just like it does for regular CDData layers. But this is a much bigger
refactor to be done outside of bugfix scope.

Reviewed By: sergey

Maniphest Tasks: T78285

Differential Revision: https://developer.blender.org/D8415
2020-07-29 17:36:46 +02:00
03acbc7b71 Merge branch 'blender-v2.90-release' 2020-07-29 17:22:50 +02:00
54a2fcc0f3 Fix Cloth Brush global Sculpt gravity applied in the wrong falloff
Previously, gravity was only applied in the real brush radius, not in
the whole simulation radius. For most deformation modes, applying
gravity to the entire simulation instead of just to the brush radius and
scaled by the radius (like a regular sculpt brush) makes more sense.
After this fix and with the cloth collisions patch applied, it is possible
to do things like this with the cloth grab brush.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8406
2020-07-29 17:21:41 +02:00
6e5278c3da Fix T79054: Crash with Cloth Brush and anchored stroke
As the comment says, anchored stroke can't rely on the first stroke
iteration for creating the simulation data. Probably lost in a cleanup.

I also made that anchored stroke doesn't restore the mesh state in the
cloth brush, so it can create the simulation effect.

Reviewed By: sergey

Maniphest Tasks: T79054

Differential Revision: https://developer.blender.org/D8348
2020-07-29 17:19:10 +02:00
83f01db7a9 Compositor: Fix node preview when input resolution is not known
The final render will use scene resolution in this case.

For example, when Color Input is plugger to preview and composite output
nodes, final render will flood-fill the final image which is a size of
scene resolution with this color. Before this fix the node preview was
empty. After this fix the node preview will be flood-filled with the
color.

Fixes T78586

Differential Revision: https://developer.blender.org/D8263
2020-07-29 17:18:35 +02:00
66df8fff32 Compositor: Fix calculation of preview resolution
Were two issues:

- Divider was calculated in integer domain, causing rounding issues in
  general case, and causing singularity in a corner case when input is
  smaller than the preview size.

- The resolution was scaled down by 1 pixel for no obvious reason.
2020-07-29 17:18:35 +02:00
b9c7c904ed GPUShader: Fix linking with MSVC 2020-07-29 16:07:51 +02:00
f0687d4665 Cleanup: GPUTexture: Use UNPACK3 in texture_fluid 2020-07-29 15:54:51 +02:00
1804a6d040 GPUState: Fix compilation error on MSVC 2020-07-29 15:54:51 +02:00
2d89cd7dd5 Cleanup: GPU: Move Image based function to GPU_draw.h
This makes it less confusing what functions are for blender
structures.
2020-07-29 15:54:51 +02:00
99d0b3b793 Cleanup: GPU: Rename gpu_texture_smoke to fluid, and move back to C
The file do not have a reason to be C++ anymore.
2020-07-29 15:54:51 +02:00
7becd283cc GPencil: New Brush predefined mode
it's good to have an option to ' pin' a mode to the brush, to use that mode always, independent of the current viewport selected mode.

{F8723224}

Reviewed By: pepeland

Differential Revision: https://developer.blender.org/D8399
81a002
2020-07-29 15:34:54 +02:00
ade7603379 Cleanup: Remove deprecated comment. 2020-07-29 15:30:10 +02:00
e2e87efea2 Cleanup: Always keep unlock at same level as lock.
This was fine in those cases with current code, but that kind of
assumption is always risky, and an open door to hard-to-track bugs when
code changes in the future...
2020-07-29 15:30:10 +02:00
e749643793 GPU: Refactor gpu_texture_image to not use GL calls
This is also a bit of code cleanup, reorganisation.

Tried to be DRYed but avoid too much code change to (hopefully) minimize
breakage.

- GPU: remove TEXTARGET_CUBE_MAP, this is no longer used in the codebase.
- GPUTexture: Move compressed texture upload to gpu_texture.cc
- GPUTexture: Add per texture Anisotropic filtering switch
2020-07-29 15:03:02 +02:00
e4ee9de638 GPU: Move gpu_shader.c to C++
We split builtin shader support to its own file to avoid
converting code (lack of designated initializer in C++)
and to reduce file size.
2020-07-29 15:03:02 +02:00
18d2db22ff GPU: Move gpu_state.c to C++ 2020-07-29 15:03:02 +02:00
45d61bdc03 GPU: Move gpu_texture.c to C++
# Conflicts:
#	source/blender/gpu/GPU_texture.h
2020-07-29 15:03:02 +02:00
56d0a554a8 GPU: Move gpu_uniformbuffer.c to C++
This also rewrite and simplify the module a bit.
2020-07-29 15:03:02 +02:00
f84342d7e1 GPU: Move gpu_vertex_buffer.c to C++ 2020-07-29 15:03:02 +02:00
959529d4b8 GPU: Move gpu_vertex_format.c to C++ 2020-07-29 15:03:02 +02:00
18caaff149 Merge branch 'blender-v2.90-release' 2020-07-29 09:10:07 -03:00
84f7de432c Fix T78826: Move constraint is not fully disabled
Caused by rB45f17e10ec50
2020-07-29 09:09:34 -03:00
9c807325dd Particles: rename Size attribute to Radius
Doing this change for consistency with the point cloud attributes.
2020-07-29 12:03:30 +02:00
91150c9ef5 Workbench/Eeevee: Minor refactor in smoke draw function
More concise this way.
2020-07-29 11:22:35 +02:00
659db0592d GPencil: Consider extrude point as last
Before, when extrude a point, the extruded point is considered as the first point of the stroke, but this was not logic.

Now, the extrude point is considered as last.

Related to T79313
2020-07-29 11:19:35 +02:00
4cad74e589 Particles: add Size attribute 2020-07-29 10:05:27 +02:00
3e82500509 Fix T79355: switch to texture paint workspace changes image in other workspaces
Only automatically change image in editor to follow texture paint editors and
workspaces that are visible.
2020-07-29 09:06:23 +02:00
7a07683060 Cleanup: rename uiBut.dt, uiBlock.dt to 'emboss'
Use 'emboss' instead of 'draw_type' as enum, layout & functions use
the term emboss.

This issue was noted by @Poulpator in D8414, as `dt` is also an
abbreviation for delta-time.
2020-07-29 12:05:27 +10:00
a3c6304a27 Cleanup: quiet possible comma misuse warning in feestyle PyAPI 2020-07-29 11:00:32 +10:00
1e76441dd6 Clanup: unused return 2020-07-29 10:50:43 +10:00
dcad6c9db8 Cleanup: correct assert in GPU_offscreen_read_pixels 2020-07-29 10:50:31 +10:00
ac6fbf6ba8 Cleanup: declare static variables 2020-07-29 10:50:10 +10:00
012ed9ca9f Fix incorrect flag check in overlay relationship lines 2020-07-29 10:45:53 +10:00
nutti
0f075c25c4 Docs: add translation keyword argument default for msgctxt 2020-07-29 10:01:42 +10:00
nutti
55c6cc46b5 Fix RST syntax for freestyle documentation 2020-07-29 09:49:08 +10:00
7dfc2f5137 Cleanup: Doxygen sections, comment formatting 2020-07-28 17:20:41 -04:00
a0bc3596f0 Cleanup: class -> struct 2020-07-28 20:56:45 +02:00
cd3be9c46d Cleanup: too small loop variable 2020-07-28 20:56:34 +02:00
c3f6227f30 Cleanup: Use bool instead of int 2020-07-28 14:24:25 -04:00
e5e97d0fe0 Merge branch 'blender-v2.90-release' 2020-07-28 18:46:38 +02:00
d8919d12f7 GPencil: Fix typo error in RIM VFX panel
The vertical axis must be named Y, not Z because it works in 2D space.
2020-07-28 18:46:22 +02:00
814ca40c63 Merge branch 'blender-v2.90-release' 2020-07-28 16:37:01 +02:00
fcf91bbf0d Merge branch 'blender-v2.90-release' 2020-07-28 18:32:11 +02:00
9c1da81a4c Fix T54544: "Copy Materials to Selected" only works when materials are defined on the mesh.
Build a temp matarray storing materials from obdata and source object
(depending on slots 'allocation' of source object), and assign those to
targets.

Also remove limitation of 'using same obdata is forbidden', just never
edit obdata materials in that case...

Certainly not perfect, but already much better than existing code.
2020-07-28 18:31:51 +02:00
cf243e0980 Merge branch 'blender-v2.90-release' 2020-07-28 17:56:26 +02:00
5d88f8eba2 Fix T61607: OpenEXR files with less common RGB channels names not loaded
Previously there would have to be 3 channels R,G,B. Now also support cases
where there are fewer channels or other names like Red, AR and RA are used.
2020-07-28 17:55:37 +02:00
556252f1fe Fix T79067: Cycles panorama viewport render stretched after recent changes 2020-07-28 17:34:51 +02:00
80539723b9 Fix T79219: Cycles NLM denoiser clean passes broken after recent changes 2020-07-28 17:34:44 +02:00
67c33caeec Fix: remove error in previous commit 2020-07-28 16:35:31 +02:00
b274d18aec Cleanup: correct usage of extern-C blocks in various places
This removes extern-C blocks around other includes and adds
such blocks for some headers that need them.
2020-07-28 16:33:43 +02:00
cbeb2e55ed Merge branch 'blender-v2.90-release' 2020-07-28 16:24:53 +02:00
dcf7a05077 GPencil: Fix unreported missing strokes in interpolation
Sometimes the interpolated stroke was tagged and removed.
2020-07-28 16:23:45 +02:00
8fbed7f7f5 Merge branch 'blender-v2.90-release' 2020-07-28 15:46:09 +02:00
9ff7820f62 Fix T79259: OptiX render with fisheye camera is different to CUDA
The fisheye camera setup causes the edges of the image to not shoot primary rays. This was not
respected by OptiX because of an optimization that tried to reduce conditionals around trace calls.
Removing that does not seem to have an impact on performance anymore however and it fixes
the issue.
2020-07-28 15:45:46 +02:00
bc0b75ea37 Merge branch 'blender-v2.90-release' 2020-07-28 09:55:27 -03:00
5e232d7a0b Fix bad 'Correct Face Attributes' behavior when extruding faces
A face must have area in order to be possible calculate interpolation weights.
The same to the reference UVs.
But the new faces created with the extrude operator, have no area (before moving).

The solution was to get the loop data from some neighbor face.

Differential Revision: https://developer.blender.org/D8278
2020-07-28 09:53:44 -03:00
6a689b5047 Transform: Correct Face Attributes: Option to merge attributes
Keeping face attributes connected is now optional.

Keeping UV's connected is useful for organic modeling, but bad for
architectural.

Differential Revision: https://developer.blender.org/D8360
2020-07-28 09:53:23 -03:00
47b82fc02f Fix precision issues in 'interp_weights_poly_v2'
These precision issues were evident in corrected uvs when the option
`"Correct Face Attributes"` is enabled.
2020-07-28 09:53:07 -03:00
26bc8f4935 Merge branch 'blender-v2.90-release' 2020-07-28 14:44:54 +02:00
b99358315e Fix T79180: Object disappears when scaled, set origin etc after applying smooth modifier.
Very dummy mistake in modifier code would generate invalid number
(divisions by zero)...

Should also be ported to 2.83.
2020-07-28 14:44:17 +02:00
76d489fe23 Bump minimum CMake version to 3.10
This bumps the minimally required CMake version from 3.5 to 3.10, as
discussed in D8405.

Since D7649 landed, there has been the `gtest_discover_tests()` call to
discover individual unit tests in `bin/tests/blender_test`. This
function was introduced in CMake 3.10.

Since there were no complaints about this incompatibility, I suspect
that a newer version is already in use by the majority of the
Blender-building people.
2020-07-28 14:17:13 +02:00
9d412a92f5 Cleanup: incorrect spelling of 'manhattan' 2020-07-28 22:06:44 +10:00
2a52c2d001 Cleanup: spelling, comments 2020-07-28 21:49:37 +10:00
82c38a7df0 Fix T79067: Cycles panorama viewport render stretched after recent changes 2020-07-28 13:35:45 +02:00
75e16c22d7 Fix T79219: Cycles NLM denoiser clean passes broken after recent changes 2020-07-28 13:16:44 +02:00
f0c4566ce3 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-28 12:40:05 +02:00
ec80f1d376 Cleanup: Commented BKE_object_moves_in_time() does not consider physics
When an object is moved only by the rigid body physics system, the
function `BKE_object_moves_in_time()` will incorrectly return `false`.
This commit adds a comment to make this behaviour more explicit.

No functional changes.
2020-07-28 12:39:52 +02:00
19de9d1a9e Cleanup: spelling fix in comment 2020-07-28 12:39:52 +02:00
050de1fb8e Fix T79263: Alembic, exported rigid body animation not moving
The root cause was that `BKE_object_moves_in_time()` incorrectly returns
`false` when an object is moved by the physics system.

This also fixes the same issue in the USD exporter.
2020-07-28 12:38:31 +02:00
3b9e16a4f7 Particles: initial support for the Time input node 2020-07-28 12:10:37 +02:00
c8e45c3fe9 Merge branch 'blender-v2.90-release' 2020-07-28 12:02:59 +02:00
d738e47b0d Clip Editor: Make filter labels consistent
This was done for the regular dopesheet in rB9ccc73ade8a2, this just
makes that label consistent across all anim views.

Differential Revision: https://developer.blender.org/D8255
2020-07-28 12:00:47 +02:00
34125ce507 Merge branch 'blender-v2.90-release' 2020-07-28 11:54:51 +02:00
e296c9e24e Fix T79031: Batch Generate-Previews doesn't work anymore
Caused by rB19785b96c43f.

Maniphest Tasks: T79031

Differential Revision: https://developer.blender.org/D8400
2020-07-28 11:52:38 +02:00
8a60e920f4 Merge branch 'blender-v2.90-release' 2020-07-28 11:47:55 +02:00
290b372aac Fix T79264: Mantaflow Field weights cannot be animated
rna_EffectorWeight_path() needs to point to "domain_settings" (instead
of "settings"), was a missing change when switching the FluidModifier to
mantaflow.

Maniphest Tasks: T79264

Differential Revision: https://developer.blender.org/D8398
2020-07-28 11:36:07 +02:00
da32c17631 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-28 11:08:10 +02:00
617e67529c Tests: show debugging hint when USDStageCreationTest fails
Setting the environment variable `PXR_PATH_DEBUG` non-empty will make the
USD library print the directories it uses to find its JSON files. This can
aid in debugging when this unit test fails. Now the failure message also
tells you about this.

No functional changes.
2020-07-28 11:02:05 +02:00
e7dd89b50b Cleanup: remove redundant return statement
This was found by clang-tidy.
2020-07-28 11:00:08 +02:00
1675969152 Merge branch 'blender-v2.90-release' 2020-07-28 17:57:56 +10:00
a2a29327d9 Fix T79341: Crash evaluating curve 2020-07-28 17:53:22 +10:00
289aac723a Merge branch 'blender-v2.90-release' 2020-07-27 21:17:03 -06:00
ed19781a2a Fix T77951: Remove duplicate outliner menu entries
Move the common entries (View and Area) into a static method to be
called from other menus to avoid duplicating the New Collection and ID
Paste operators.
2020-07-27 21:08:28 -06:00
6ad75949b9 Fix: Wrong outliner restrict column for gpencil layer hide
The icon was drawing in the viewport disable rather than the viewport
hide column. Unreported.
2020-07-27 20:07:55 -06:00
ace832bf7c Merge branch 'blender-v2.90-release' 2020-07-27 22:21:57 +02:00
221604cdd6 Fix Sculpt Relax operation when deforming mesh boundaries
Previously, mesh boundaries were relaxed as any other vertex, which was
causing artifacts and unwanted deformation. In order to prevent this,
the mesh filter was using the automasking system to lock the boundary
vertices, which was hacked into the tool. For the brush, the only
solution was to enable boundary automasking to lock those vertices
in plance.

Now the relax vertex function slides the boundary vertices along the
mesh boundary edges, relaxing all the topology correctly while
preserving the shape of the mesh. The automasking hack in the relax
mesh filter was also removed as now vertices slide correctly along
the boundary.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8350
2020-07-27 22:19:35 +02:00
0006526952 Fix T79074: Mesh Topology info not being updated after changes
All these data arrays are created for a specific topology, so they should be
freed and updated when the PBVH rebuilds. Previously, this was only
happening when freeing the SculptSession, but it also needs to happen in
BKE_sculpt_update_object_before_eval to avoid reusing out of date data.

Reviewed By: sergey

Maniphest Tasks: T79074

Differential Revision: https://developer.blender.org/D8357
2020-07-27 22:04:31 +02:00
7eebebebc7 Fix T79164: Sculpting with smooth shading doesn't update normals
Just a missing update flag

Reviewed By: sergey

Maniphest Tasks: T79164

Differential Revision: https://developer.blender.org/D8364
2020-07-27 22:02:35 +02:00
4f3233dd53 Fix T78242: Crash when using a Sculpt color tools that needs connectivity for the first time
When there is no color layer available,
BKE_sculpt_update_object_for_edit creates a new one and tags the mesh
with ID_RECLAC_GEOMETRY, so this layer is inmediatly available when the
tool starts. This also deletes the PBVH and when it is created again in
BKE_sculpt_update_object_after_eval, the pmap is not initialized, making
the tool crash.

This moves the color layer creation to a separate function outside
BKE_sculpt_update_object_for_edit, which now runs after the color
layer is available, so it won't need to update again and the pmap will
still be available when the tool is used.

Reviewed By: sergey

Maniphest Tasks: T78242

Differential Revision: https://developer.blender.org/D8135
2020-07-27 21:58:59 +02:00
a0b0a47d81 GPencil: Scale stroke thickness when use Offset modifier scale 2020-07-27 19:09:44 +02:00
e8869d9c71 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 19:02:44 +02:00
2584a2a4e7 Fix USD unit test on buildbot
The buildbot uses a separate `CMAKE_INSTALL_PREFIX`. This means that
the unit test could not find its USD JSON files in the build directory.
Using `${CMAKE_INSTALL_PREFIX}` instead of `$<TARGET_FILE_DIR:blender>`
solved this.
2020-07-27 19:02:22 +02:00
e893430a63 Partly revert "Fix T77276: Generating Python API docs raises many warnings"
This commit reverts the "noindex" part of the original commit.
using noindex made it imposible to link to a specific property.

The original warnings do not pose an issue so until a proper solution is 
found I am reverting this commit.

This reverts commit 953c232db3
2020-07-27 13:01:28 -04:00
729da8bfac CTest: Fix blender_test not working on windows.
MSVC does need the wholearchive flag but it was not set,
so no tests were actually linked into the binary.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D8404
2020-07-27 10:55:34 -06:00
e54289cdf3 Merge branch 'blender-v2.90-release' 2020-07-27 18:15:56 +02:00
1ae8855f8e Fix T78308: Weight Transfer Operator "Deform Pose Bones" destination setting doesn't work.
Some modes were working by mere chance in that ugly 'reversed' case, but
the to/from selection modes were not properly swapped...

Should also be safe for 2.83.
2020-07-27 18:12:40 +02:00
7fd68db841 Merge branch 'blender-v2.90-release' 2020-07-27 17:40:10 +02:00
960ce1e394 Fix T78306: Weight Transfer Operator target mesh doesn't update when transforming bones.
Data transfer operator was missing tagging DEG for relations updates.

Should be portable to 2.83 as well.
2020-07-27 17:39:49 +02:00
2e376cfcc8 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 17:32:28 +02:00
a5b2aa96e4 CMake: reject older GCC version when using precompiled Linux libraries
In the situation where the precompiled libraries are used on Linux +
GCC, a version of GCC older than 9.3 is guaranteed to cause problems.

This just implents a fatal error message when we know it doesn't make
sense to continue. We could do more checks and add some warnings, but
it's very likely that these will be ignored amongst the other noise.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D8396
2020-07-27 17:29:13 +02:00
9a53d4a882 Particles: support Clamp node 2020-07-27 17:12:15 +02:00
bd4b29d63d Cleanup: fixed compiler warning about strncat
`strncat(command, "x", 1)` is the same as `strcat(command, "x")`, except
that the latter form doesn't trigger a GCC warning.

No functional changes.
2020-07-27 17:03:32 +02:00
c7ee66e517 Cleanup: remove outdated comment 2020-07-27 16:42:04 +02:00
6f5d01779a Functions: add some tests for virtual spans 2020-07-27 16:35:54 +02:00
38e65331a8 Particles: initial support for events and actions
The following nodes work now (although things can still be improved of course):
Particle Birth Event, Praticle Time Step Event, Set Particle Attribute and Execute Condition.

Multiple Set Particle Attribute nodes can be chained using the "Execute" sockets.
They will be executed from left to right.
2020-07-27 16:26:43 +02:00
a83bb170b0 Merge branch 'blender-v2.90-release' 2020-07-27 16:18:44 +02:00
d64e171c4b Cycles: Enable OptiX on first generation Maxwell GPUs again 2020-07-27 16:11:00 +02:00
4c5e1f1c25 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 15:49:02 +02:00
79312962de Cleanup: Fix compiler warning about function without prototype
No functional changes.
2020-07-27 15:48:47 +02:00
81a0027f13 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 15:26:08 +02:00
f8a0a5a350 PointCloud: Fix viewport issue when using radius attrib after not using it
This was a simple issue with the static GPUVertFormat being the same for
both cases.
2020-07-27 15:41:16 +02:00
71506698de Cleanup: Fix compiler warning about missing parentheses
The code was well-defined, given that `&&` binds stronger than `||`, but
still GCC warns about this.

No functional changes.
2020-07-27 15:25:33 +02:00
565d7f75cc UI: improve errors when evaluating a number button fails
Showing the Python error without any explanation is often
not enough information and doesn't hint that the error was in the
user input.

The error report from a invalid expression such as '..1' used to be:
   ('invalid syntax', ('<string>', 1, 1, '..1'))

Now reads:
   Error evaluating number, see Info editor for details: invalid syntax

Address issue raised by T78913.
2020-07-27 21:00:50 +10:00
7beef1fd33 PyAPI: simplify syntax error reports
The result of syntax errors read poorly in reports,
resulting in cryptic and unhelpful information.

Change PyC_ExceptionBuffer_Simple only to extract the initial text,
making syntax errors when entering invalid numeric expressions into
buttons easier to follow.
2020-07-27 21:00:50 +10:00
d7cb67454d Cleanup: match call signature for UI unit number evaluation
Also rename ui_but_string_set_eval_num to ui_but_string_eval_number
as it doesn't set any of the buttons values.
2020-07-27 21:00:49 +10:00
9ce2c5bf50 Cleanup: remove workaround for old BLI_dynstr_vappendf bug
Remove workaround from 1c806f6bb4
as this doesn't seem to be needed anymore.
2020-07-27 21:00:49 +10:00
b18c376946 Cleanup: quiet warnings without DDS 2020-07-27 21:00:49 +10:00
0b04f0e4e6 GPU: Fix crash and missing texture due to recent C++ port
Fix T79306 DRW: small issues with yesterday commits modifying TEXTARGET
Fix T79303 Image texture node crashes EEVEE when connected to a shader output
2020-07-27 13:37:22 +02:00
bfeb94eccc Cleanup: quiet warning 2020-07-27 11:41:51 +02:00
418753b6a6 GPU: fix build error due to wrong linkage specification 2020-07-27 11:40:47 +02:00
382b9007f8 GPencil: New operator to Cleanup duplicated frames
This operator cleanup any frame that is equal to the previous one. This is very handy when convert a mesh animation to Gpencil and the mesh is static for several frames.

Differential Revision: https://developer.blender.org/D8149
2020-07-27 10:47:04 +02:00
f31fa3eb97 Merge branch 'blender-v2.90-release' 2020-07-27 10:32:38 +02:00
ea4a00e93b Fluid: Fix warnings from max particle option
-Wreorder was the issue.
2020-07-27 10:32:12 +02:00
93e6ed9b45 Merge branch 'blender-v2.90-release' 2020-07-27 10:26:00 +02:00
d906116eba Cleanup: comments. 2020-07-27 10:25:43 +02:00
041904ceb8 Cleanup: Minor renaming. 2020-07-27 10:25:43 +02:00
40a9524637 Merge branch 'blender-v2.90-release' 2020-07-27 10:24:53 +02:00
87fb12d16e Allocator: fix build error with -Werror=format-security
Doing it again here, because I fixed this only in master branch before..
2020-07-27 10:23:20 +02:00
6d42ffe03c Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 09:06:00 +02:00
9b867f2e90 Fix T79121: Dependency cycle when driver points to prop with 'scale' in name
This makes `RNANodeQuery::construct_node_identifier()` more strict in
its matching of certain property names.

The downside of this approach is that it's not possible any more to use
`"rotation"` and expect a match for `"rotation_euler"` and friends, so
the list of strings to test against is now 3x as long.

Reviewed By: sergey

Maniphest Tasks: T79121

Differential Revision: https://developer.blender.org/D8375
2020-07-27 08:53:32 +02:00
3bcec7c142 Cleanup: Alembic, fix maybe-uninitialized warning
No functional changes.
2020-07-27 08:52:53 +02:00
d62250a3e0 UI: Show message in transform panel when no metaball elements are selected
The complete lack of a transform panel was confusing enough to spawn
this question: https://blender.stackexchange.com/q/169074/599
Displaying a message instead of nothing is more consistent with the
behavior of the mesh transform panel anyway.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D8390
2020-07-26 21:20:37 -04:00
9e7ee39385 Merge branch 'blender-v2.90-release' 2020-07-26 21:09:24 -04:00
344be1fcfa RNA to Manual: Update links 2020-07-26 21:06:35 -04:00
ba9c88ce18 GPUFramebuffer: Fix compilation issue with designated initializer in C++ 2020-07-27 00:08:48 +02:00
2c2082cc62 GPU: Fix MSVC compile errors 2020-07-26 23:50:29 +02:00
e76f64a532 Fluid: Added new option to control the maximum number fluid particles in the simulation
New option that lets users the define the maximum number of fluid particles that will be allowed in the simulation. This can come in handy, for example, to ensure that the particle count will not exceed the hardware capabilities, or to avoid excessive amounts of particles in a scene.
2020-07-26 22:04:59 +02:00
c9cc5ad1c0 Fluid: Updated Mantaflow source files
New files contain updated sampling function (support for maximum number of particles cap).
2020-07-26 22:04:59 +02:00
65e1d43f0b Fluid: Cleanup unsed file format options
File format options for noise and particles are not needed anymore (since OpenVDB update).
2020-07-26 22:04:59 +02:00
04195b1e74 Fluid: Added new option to control the maximum number fluid particles in the simulation
New option that lets users the define the maximum number of fluid particles that will be allowed in the simulation. This can come in handy, for example, to ensure that the particle count will not exceed the hardware capabilities, or to avoid excessive amounts of particles in a scene.
2020-07-26 22:02:10 +02:00
2ebf263f5c Fluid: Updated Mantaflow source files
New files contain updated sampling function (support for maximum number of particles cap).
2020-07-26 22:02:10 +02:00
9386dd66ff Fluid: Cleanup unsed file format options
File format options for noise and particles are not needed anymore (since OpenVDB update).
2020-07-26 22:02:10 +02:00
94afe7671c Cleanup: GPU: Remove glew headers part2 2020-07-26 21:07:25 +02:00
54237994d8 Cleanup: Image: Rename redundant enum for clarity 2020-07-26 21:07:25 +02:00
487eaeed7e GPUTexture: Replace GL textarget enum by Image enum 2020-07-26 21:07:25 +02:00
025dc31d28 GPU: Remove GL constant from BIF_glutil 2020-07-26 21:07:25 +02:00
64d8f6b191 Use floating point filtering to make the degenerate triangle detection faster. 2020-07-26 13:23:49 -04:00
7781c49c22 Set up to try either spinlock or mutex for boolean parallelism.
On my 48 core Linux machine, mutex's seem to lead to faster execution.
2020-07-26 13:09:29 -04:00
4c25824f19 Use multithreading to calculate subdivided triangles. 2020-07-26 12:43:37 -04:00
18cca0e704 Cleanup: GPU: Remove GPU_glew.h outside of GPU module
Remove use of GL* constants and types inside the codebase. There is still
a few occurence to get rid of.
2020-07-26 17:29:49 +02:00
9e23dbd060 Cleanup: GPU_codegen.c: Use LISTBASE_FOREACH macro instead of for loops 2020-07-26 17:28:48 +02:00
15655aa1dd Cleanup: GPU: Remove unused code and header 2020-07-26 17:28:48 +02:00
cc7d5e1fe6 GPU: Move gpu_platform.c to C++ 2020-07-26 17:28:48 +02:00
c276ef61d4 GPU: Move gpu_immediate.c to C++ 2020-07-26 17:28:48 +02:00
b296b68ff2 GPU: Move gpu_framebuffer.c to C++ 2020-07-26 17:28:48 +02:00
9905db5557 GPU: Move gpu_extensions.c to C++ 2020-07-26 17:28:48 +02:00
7c3eaffbbd GPU: Move gpu_element.c to C++ 2020-07-26 17:28:48 +02:00
97b597cd04 GPU: Move and rename gpu_draw*.c to C++
`gpu_draw.c` was a misleading name, `gpu_texture_image.cc` is better
suited.
2020-07-26 17:28:48 +02:00
8b7802db85 GPU: Move gpu_debug.c to C++ 2020-07-26 17:28:48 +02:00
56803e2754 GPU: Rename gpu_context.cpp to .cc suffix 2020-07-26 17:28:48 +02:00
7b4a21077a GPU: Move gpu_batch.c to C++ 2020-07-26 17:28:48 +02:00
d3cecc5007 GPU: Move gpu_attr_binding.c to C++ 2020-07-26 17:28:48 +02:00
13afc81f6d BLI: Add MACRO for enum usage in C++
This is handy to add support for enums used in both C and C++
files. This removes the need to typecast each time for every
operation.

Only support bitwise operators for now.
2020-07-26 17:28:48 +02:00
a77175c9b6 GPU: Add extern "C" to intern headers 2020-07-26 17:28:48 +02:00
076d033e10 VSE: Refactor delete operator and API
Operator logic is limited to iterating over selection and executing
same code as python API does.

Functional changes:

 - No attempt to preserve effects is made. Dependant effects are deleted.
 - No attempt to change meta strip boundaries.

Partially fixes T73828

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6892
2020-07-26 16:07:34 +02:00
f0e370a650 Merge branch 'blender-v2.90-release' 2020-07-26 15:04:56 +02:00
7ceb6ffe57 Fix T74958: Infinite loop on using strip as modifier mask
Add recursion check before assigning strip as a mask for modifier.
Same check is used for recursion check when reassigning effect input, so it
should not be possible to create recursion at all.
2020-07-26 15:00:37 +02:00
f2907b06f4 Fix T78999: Crash when adjusting sequencer property
Sequencer was not initialized yet, and RNA update function tried to clean up cache.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8323
2020-07-26 15:00:37 +02:00
5414ccbd4c Merge branch 'blender-v2.90-release' 2020-07-26 22:00:13 +10:00
28b1c70895 Fix T79272: Dimensions fail on negative scaled axis 2020-07-26 21:58:47 +10:00
850234c1b1 UV: port smart project from Python to C
Use C for faster operation on high poly models,
in my tests this gave ~27x speedup.

D8311 by @andreasterrius with edits.
2020-07-26 21:27:32 +10:00
a2dbeb458c Merge branch 'master' into newboolean 2020-07-26 06:47:46 -04:00
9482cc6865 UV: support creating ParamHandle without checking UV selection
Needed for unwrapping from the 3D view.
2020-07-26 20:42:11 +10:00
accadbc2aa Used wrong #if to isolate debugging code for Windows. 2020-07-26 06:38:02 -04:00
fd7e31b3e5 Particles: don't mark Particle Attribute node as mockup
It is actually doing something already.
2020-07-26 12:32:28 +02:00
6cecdf2ade Functions: move tests closer to code 2020-07-26 12:19:11 +02:00
d6e3ba3416 Fix the knife boolean modes.
Had to track the intersect edges through from mesh_intersect
through to the bmesh boolean.
2020-07-25 21:19:39 -04:00
13abacaaf3 Particles: show which nodes are only mockups in the Add menu
More nodes will be implemented step by step. I don't remove/disable these nodes,
so that it is still possible to add them.
2020-07-25 21:01:57 +02:00
14326619a1 Cleanup: avoid using namespace name in many cases 2020-07-25 20:39:21 +02:00
1e999c7bdb Particles: initial Quick Particles operator
This operator automates the following steps:
1. Create a point cloud object.
2. Create a simulation data block.
3. Add a small particle simulation to the node tree.
4. Add a Simulation modifier to the point cloud object.
5. Reference the particle simulation from the modifier.

You have to go back to frame 1 to start the simulation.
The simulation is not yet cached and cannot be rendered.

The bounding box of the point cloud object is enabled for now,
because otherwise it is hard to select the object.
2020-07-25 20:24:36 +02:00
04d46bdb83 Pointcloud: workaround for a viewport drawing issue 2020-07-25 20:19:55 +02:00
89f4191a53 Allocator: fix build error with -Werror=format-security 2020-07-25 15:10:24 +02:00
0ae2a1d12a Particles: improve emitter when object is animated 2020-07-25 14:51:15 +02:00
d52e45c89e Merge branch 'blender-v2.90-release' 2020-07-25 21:31:16 +10:00
a8d058dbf4 Fix T79260: Crash displaying the same mesh in two windows 2020-07-25 21:30:08 +10:00
790d3804d0 Merge branch 'blender-v2.90-release' 2020-07-25 20:50:38 +10:00
4ca8f25fa8 Fix T79239: UV path select crash 2020-07-25 20:48:40 +10:00
82db64ed80 Merge branch 'blender-v2.90-release' 2020-07-25 20:36:31 +10:00
537c57136f Fix T79254: FCurve editor crash when zooming out to limit 2020-07-25 20:32:07 +10:00
eeaa4379aa Simulation: cleanup dna data 2020-07-25 11:54:06 +02:00
ddd4fec386 Merge branch 'blender-v2.90-release' 2020-07-25 17:19:49 +10:00
2308668bac Fix T72622: Transform object origin ignores shape keys
D8367 by @paul2t with edits.
2020-07-25 17:19:13 +10:00
04ea79dc0b Turn off debug file writing in boolean etc unit tests.
Also, for Windows, do something other than /tmp when file writing
is turned on. This file writing is only intended for debugging.
2020-07-24 16:20:33 -04:00
273f50a333 Merge branch 'blender-v2.90-release' 2020-07-24 13:13:42 -03:00
d7c4e96493 Cleanup: Rename 'isect_ray_seg_v3' to 'isect_ray_line_v3'
The name was misleading as it returns true whenever it intersects the
line represented by the points.
2020-07-24 12:07:58 -03:00
9a117fcdae GPencil: Add more randomness to random stroke color
The old method produce a small range of similar colors.
2020-07-24 16:24:04 +02:00
e18cf6f998 Interpolate face loop data from example faces.
This makes for a reasonable first pass at getting OK UV maps.
2020-07-24 09:58:34 -04:00
704d581aea Merge branch 'blender-v2.90-release' 2020-07-24 15:39:11 +02:00
c64b12c0b8 Fix OptiX being shown as available on first generation Maxwell GPUs
The OptiX kernels are compiled for target "compute_sm_52", which is only available on second
generation Maxwell GPUs, so disable support for older ones.
2020-07-24 15:36:09 +02:00
50b7025ebf Use original edges as examples when possible.
These means that, for example, an original edge that has a bevel
weight and only survives partly after the boolean will still
have that bevel weight.
2020-07-24 09:27:26 -04:00
50ff450202 Cleanup: can use guarded instead of raw allocator now 2020-07-24 13:47:57 +02:00
74fcb4d4c2 Particles: initial particle birth action
A particle action is some function that is triggered by some event.
Right now, users cannot control this. There is just a
randomize-velocity on-birth action. So the direction of spawned
particles is slightly randomized now.

This also adds a new integer attribute called "Hash" which is
useful for a number of things. Mainly for generating random numbers
for a specific particle. The ID of a particle is not necessarily a good source
of randomness.
2020-07-24 13:37:55 +02:00
3edc33123c BMesh construction now better at preserving attributes of mesh elements.
Uses existing BMVerts, BMEdges, and BMFaces if possible.
Uses good examples for BMFaces for intersected faces.
Still todo: good examples for BMEdges when partially reusing an edge,
and UV interpolation for new faces.
2020-07-23 07:46:53 -04:00
7c36c72b25 Merge branch 'master' into newboolean 2020-07-21 18:31:40 -04:00
77c83d3be1 Fixed the regression after making binary ops not do self-intersection.
Now the new Boolean code is only about 3 to 4 times slower than the
current BMesh one.
2020-07-20 11:58:37 -04:00
3b77c59bf7 Merge branch 'master' into newboolean 2020-07-20 08:15:06 -04:00
37ee7f20e7 Update integer type usage 2020-07-20 13:35:58 +02:00
44f58e0d96 Merge branch 'master' into newboolean 2020-07-20 13:34:29 +02:00
833514b2ce Work in progress to treat nary boolean differently.
This will make it faster. There's one bug in it still,
but committing progress.
2020-07-20 05:28:42 -04:00
62dc64bdee Better estimate of number of output faces.
Avoids need to resize some arena vectors in many cases.
2020-07-19 16:00:48 -04:00
383b4c0727 Added floating filters to the initial plane-side tests in tri-tri intersect.
Needed an "abs" function for double3, so added it to all of the
float/double/mpq 2/3 types.
2020-07-19 14:16:39 -04:00
41722bfaa6 Fix a strange merge problem, and fix a couple of warnings. 2020-07-18 19:58:41 -04:00
64e462f688 Merge branch 'master' into newboolean 2020-07-18 06:58:43 -04:00
49a15ac05a Merge master
commit aa8279648e
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 21:19:48 2020 +0200

    Simulation: extract node tree parsing code to separate file

commit 25582aef61
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 20:51:52 2020 +0200

    Simulation: separate code from node tree parsing and solver

commit 69d14c0ddb
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 17 15:18:54 2020 -0400

    Fix T78959: Show current frame indicator when interface is locked

    When the playhead drawing moved to an overlay, a check was added to keep
    it from drawing with a locked interface. This is necessary for some overlays,
    but not this one, so this removes the check, making it the responsibility of
    the editor.

    A context function is added to make that check easier in the future.

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

commit 8b0df381d9
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Fri Jul 17 14:33:40 2020 -0300

    Transform: use GHASH_ITER when restoring customdata

commit d8a6eec1a3
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 17 16:00:08 2020 +0200

    Cleanup: Removed incorrect `// namespace DEG` comment

    No functional changes.

commit 893eb30730
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Fri Jul 17 16:11:21 2020 +0200

    Fluid: Numpy support for Mantaflow build system

    Adjusted the fluid build system so that plugins that depend on numpy can be compiled as well.

    Note that in this commit numpy support is still disabled. It can be enabled by re-running the Mantaflow update script with USE_NUMPY=1 and enabling WITH_MANTA_NUMPY in extern/mantaflow/CMakeLists.txt. This will happen in a future commit.

commit 0cdc75ccd2
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Fri Jul 17 15:58:13 2020 +0200

    Fluid: Cleanup build system for extern mantaflow

    No longer including unused dependencies. Should numpy IO be needed at some point, the Manta source update script can be configured so that the required dependencies are included again.

commit e3f8768d8a
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 14:23:57 2020 +0200

    Refactor: move ParticleFunction to separate file

commit 2679236047
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 14:15:06 2020 +0200

    Cleanup: avoid static initialization order issues when accessing CPPTypes

    Instead of depending on static initialization order of globals use
    static variables within functions. Those are initialized on first use.
    This is every so slighly less efficient, but avoids a full class of problems.

commit 3ef59121a4
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 13:47:57 2020 +0200

    Simulation: move initial simulation code from bf_blenkernel to bf_simulation

    I removed bf_blenkernel from `nodes/CMakeLists.txt` again (added it yesterday),
    because now this was causing me unresolved symbol errors... Without it, cmake
    seems to link the libraries bf_simulation, bf_blenkernel and bf_nodes in the right
    order. Not sure if that is just luck or if it is guaranteed.

    It was possible to fix the issue by using cmakes `LINK_INTERFACE_MULTIPLICITY`,
    but that is probably bad style.

commit 9582797d4b
Author: Jeroen Bakker <jbakker>
Date:   Fri Jul 17 13:47:10 2020 +0200

    Fix T77867: Link Duplicate Object crashes during batch creation

    When using link duplicated objects it could happen that one object is
    calculating the GPUBuffers and the second object is marking these
    buffers invalid. This introduces threading issues.

    This patch fixes this by combining the surface and surface per material
    batches. Most likely the surface per material batches are used and when
    requested you will most likely need the surface batch for the depth
    tests and overlays.

    During tests it slightly improves performance as batches aren't thrown
    away without using it.

    After this patch we can add a quick path for meshes with one material
    and two materials.

    Alternative approaches that have been checked:
    - sync extraction per object: reduced performance to much (-15%)
      ({D8292})
    - post checks: reduced the threading issues, but didn't solve it.
    - separating preparation and execution of the extraction ({D8312})

    Reviewed By: Clément Foucault

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

commit bf2bb6db26
Author: Ankit Meel <ankitjmeel@gmail.com>
Date:   Fri Jul 17 12:50:08 2020 +0530

    Cleanup: silence unused variable warning

    Reviewed By: fclem

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

commit 0e3d34e48f
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 12:38:15 2020 +0200

    BLI: add StringRefNull.c_str() method

    This should be used whenever you rely on the fact, that the
    returned pointer points to the beginning of a null-terminated array.

commit 0fcd23a388
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 12:28:09 2020 +0200

    Simulation: use better api for adding and removing simulation states

commit c5f61fbf48
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 17 11:29:46 2020 +0200

    Cleanup: avoid warning about redundant access specifier

    No functional changes.

commit 5910dbdbf7
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 17 11:36:59 2020 +0200

    Nodes: move some code from blenkernel directory to nodes

    This also introduces the `blender::nodes` namespace. Eventually,
    we want to move most/all of the node implementation files into
    this namespace.

    The reason for this file-move is that the code fits much better
    into the `nodes` directory than in the `blenkernel` directory.

commit 0a40c671b0
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 17 17:11:32 2020 +1000

    Cleanup: consistent ordering for scene argument to UV functions

commit 83e204702d
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 23:50:33 2020 +1000

    Cleanup: remove f-string use in favor of percentage for formatting

commit 618f31312c
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 17 17:35:46 2020 +1000

    Fix vertex selection error from recent refactor

    Temporary fix for regression in 8084b7e6e2.

commit 89a7a1c156
Author: Jeroen Bakker <jeroen@blender.org>
Date:   Fri Jul 17 08:31:03 2020 +0200

    Cleanup: extract draw cache sanity checks to own function

commit 608d9b5aa1
Author: Hans Goudey <h.goudey@me.com>
Date:   Thu Jul 16 14:07:47 2020 -0400

    UI: Add shortcuts for constraint panels

    Only the delete shortcut applies here, although the move up and down
    operators can optionally be assigned in the keymap.

    See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the
    grease pencil modifier panel implementation, which is the same.
    Some refactoring of the constraint delete operator was necessary,
    including adding an invoke function.

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

commit b13bbb22e4
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 19:52:28 2020 +0200

    Fix link error in bf_nodes

    I got undefined reference errors on the `NodeMFNetworkBuilder::get_default_fn`
    function under some circumstances. This symbol is definitely defined in bf_blenkernel.
    The error seemed a bit undeterministic and was probably caused by some incorrect
    link order. I don't get the error with this change.

commit 02a3720000
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 18:49:26 2020 +0200

    Simulation: rename bf_physics to bf_simulation

    Also see {rB9363c4de0635394548fa2eb8d205581313029775}.

commit 93f21ebb13
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Thu Jul 16 18:01:08 2020 +0200

    Fluid: Update Mantaflow source files

    Includes cleanup that resolves a -Wunused-but-set-variable warning.

commit e7c1a32a78
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Thu Jul 16 17:22:58 2020 +0200

    Tests: disable ASAN when discovering tests

    CMake, when it's configuring the project, runs the `blender_test` test
    runner (if it exists from a previous build) to discover which tests it
    contains. At this time none of the tests themselves are run, so it's not
    that useful to run ASAN and have it break things when there are memory
    leaks.

    This commit disables ASAN by injecting `ASAN_OPTIONS="detect_leaks=0"` in
    the environment variables.

    It is not enough to use `set(ENV{ASAN_OPTIONS} "detect_leaks=0")` in
    `tests/gtests/runner/CMakeLists.txt`, as it wouldn't be passed to the child
    process.

commit a138bf57c9
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Thu Jul 16 16:10:53 2020 +0200

    Tests: move tests from USD test directory into `io/common` and `io/usd`

    This commit is a followup of {D7649}, and ports the USD tests to the new
    testing approach. It moves test code from `tests/gtests/usd` into
    `source/blender/io/common` and `source/blender/io/usd`, and adjusts the
    use of namespaces to be consistent with the other tests.

    I decided to put one test into `io/usd/tests`, instead of
    `io/usd/intern`. The reason is that this test does not correspond with a
    single file in that directory; instead, it tests Blender's integration
    with the USD library itself.

    There are two new CLI arguments for the Big Test Runner:

    - `--test-assets-dir`, which points to the `lib/tests` directory in the
      SVN repository. This allows unit tests to find test assets.
    - `--test-release-dir`, which points to `bin/{BLENDER_VERSION}` in the
      build directory. At the moment this is only used by the USD test.

    The CLI arguments are automatically passed to the Big Test Runner when
    using `ctest`. When manually running the tests, the arguments are only
    required when there is a test run that needs them.

    For more info about splitting some code into 'common', see
    rB084c5d6c7e2cf8.

    No functional changes to the tests themselves, only to the way they are
    built & run.

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

    Reviewed by: brecht, mont29

commit 09a483a3aa
Author: Francesco Siddi <fsiddi>
Date:   Thu Jul 16 17:10:15 2020 +0200

    macOS: improve design of .dmg background

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

commit 671c6d8afd
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 04:32:09 2020 +0200

    Cleanup: Gizmo: Remove non matched glDisable

    We use the polyline shader for drawing the rotation gizmo now.
    This shader supports clipping without hardware clip planes.

commit 07d70a76df
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 04:31:29 2020 +0200

    Cleanup: WM: Use GPUTexture API instead of raw ogl calls

commit 5099cbeec9
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 04:16:10 2020 +0200

    Cleanup: GPU: Move depth/color masks functions to GPU_state

commit 436d38bb54
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 03:31:25 2020 +0200

    Cleanup: GPU: Move XOR logic op to gpu_state.c

commit 3481f6eaf2
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 03:12:21 2020 +0200

    Cleanup: GPU: Remove GL_DITHER usage

commit 71ac137662
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 03:01:07 2020 +0200

    Cleanup: GPU: Move quad buffer stereo check to GPU module

commit 8084b7e6e2
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 02:50:55 2020 +0200

    Cleanup: GPU: Replace all glReadPixels by GPU equivalent

commit ab19abe223
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 02:06:25 2020 +0200

    Cleanup: Port glClear calls to GPU module functions

commit bc85081156
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Thu Jul 16 01:20:25 2020 +0200

    Cleanup: DRW: remove uneeded double bind

    Now that binds are permanent there is no need to setup the same
    texture for each subgroups.

commit 56b8adb9e2
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 16:41:36 2020 +0200

    Particles: avoid crash when connected unimplemented node

commit 1494ad20b9
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 16:33:20 2020 +0200

    Particles: add implicit covnersions between Vector and Color

    Not sure if these conversions are a good idea. However, we have them
    in Cycles, so they be available in the simulation node tree for consistency
    reasons.

commit 76bf050853
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 16:29:05 2020 +0200

    Particles: simplify adding new implicit conversions between sockets

commit aa547ce88b
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Thu Jul 16 16:39:14 2020 +0200

    Fluid: Update Mantaflow source files

    Refactored various functions after noticing new warnings when compiling on Apple DTK devices - there should now be fewer warnings when building.

commit f64710a518
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 16:09:09 2020 +0200

    Particles: change initial velocity of particles

    This is only temporary, but makes testing the system a bit easier.

commit 4249d6f58e
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 16:08:18 2020 +0200

    Particles: support Separate/Combine RGB nodes

commit ada173ebfd
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 15:54:18 2020 +0200

    Particles: simplify Combine XYZ node

commit 72df7c23c4
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 15:49:56 2020 +0200

    Particles: support Color Ramp node

commit c7aa0f9d74
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 16 14:54:45 2020 +0200

    Fix T78537: too much memory usage rendering animation with persistent images

    For still images, always return 0 for the current frame number. This ensures
    Cycles can detects that the image did not change.

    Based on patch by Vincent Blankfield.

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

commit 279cc34343
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 23:44:38 2020 +1000

    Keymap: disable 'Alt' click for tools prompt by default

    Based on feedback from artists in the Blender Studio this is too
    easy to access by accident.

    This is still accessible as a preference.

commit 83955d6769
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 13:25:57 2020 +0200

    Particles: support Map Range node

    Only linear interpolation mode is supported for now.

commit 99fda4d31e
Author: Ray Molenkamp <github@lazydodo.com>
Date:   Thu Jul 16 07:22:52 2020 -0600

    deps builder: Fix typo in windows harvesting

commit 9b6088cb9d
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 14:37:21 2020 +0200

    Simulation: Change BPH prefix to SIM

    In a previous commit the `physics` folder has been renamed to `simulation`.
    This commit updates the function/file prefix accordingly.

commit 9363c4de06
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 14:27:47 2020 +0200

    Simulation: Rename `physics` directory to `simulation`

    Function names will be updated in a separate commit.

    This will be the place for the new particle system and other
    code related to the Simulation data block. We don't want
    to have all that code in blenkernel.

    Approved by brecht.

commit 66b48ad8fb
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 16 12:47:28 2020 +0200

    Fix git tag warning when running make update after recent changes

commit f3ea6a5b28
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 14:15:12 2020 +0200

    Particles: implement more vector math operations

commit 3d8f8085fb
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 18:53:41 2020 +1000

    UI: show connected icon for proportional editing in the image space

commit b882f89fe3
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 13:41:47 2020 +0200

    Particles: support for most math node operations

commit 2ddb3dc617
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 13:38:23 2020 +0200

    Nodes: support default function for partially implemented nodes

commit 56aa5b0d8c
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Thu Jul 16 12:58:49 2020 +0200

    T73268: Link C/C++ unit tests into single executable

    This commit introduces a new way to build unit tests. It is now possible
    for each module to generate its own test library. The tests in these
    libraries are then bundled into a single executable.

    The test executable can be run with `ctest`. Even though the tests
    reside in a single executable, they are still exposed as individual
    tests to `ctest`, and thus can be selected via its `-R` argument.

    Not yet ported tests still build & run as before.

    The following rules apply:

    - Test code should reside in the same directory as the code under test.
    - Tests that target functionality in `somefile.{c,cc}` should reside in
      `somefile_test.cc`.
    - The namespace for tests is the `tests` sub-namespace of the code under
      test. For example, tests for `blender::bke` should be in
      `blender::bke:tests`.
    - The test files should be listed in the module's `CMakeLists.txt` in a
      `blender_add_test_lib()` call. See the `blenkernel` module for an
      example.

    Reviewed By: brecht

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

commit 065a00ee3e
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Tue Jul 14 16:31:54 2020 +0200

    Fix T78920: missing depsgraph relation when using sound strips in VSE

    Having a sound strip in the VSE caused a missing relation error to be
    logged on the console. This was caused by the AUDIO depsgraph component
    not having an entry node. This commits adds that node, and sets up
    relations correctly.

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

    Reviewed By: Sergey

commit d4ce777aed
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 11:33:35 2020 +0200

    BLI: move inline include to the bottom to avoid redeclaration warning

commit d897228682
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 11:28:31 2020 +0200

    BLI: move safe math functions to separate header

commit f6f93b5b12
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 11:05:13 2020 +0200

    BLI: add safe_divide, safe_modf and safe_logf

    Those are defined exactly as their corresponding functions in Cycles.

commit 7e0bf7a0f1
Author: Bastien Montagne <bastien@blender.org>
Date:   Thu Jul 16 11:03:11 2020 +0200

    LibOverride: Fix getting proper RNA path and ID from embedded ones.

    Master collections and root node trees should now be working as expected
    in that regard.

commit 35bfe1702c
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 16 10:46:18 2020 +0200

    BLI: add safe_powf function

    The same function is also used by cycles.

commit 4a9d903e2b
Author: Yevgeny Makarov <jenkm>
Date:   Thu Jul 16 18:06:51 2020 +1000

    Fix View3D "Mirror" menu, both "Global" and "Local" items are GLOBAL

commit 9715ad5aca
Author: Stefan Werner <stewreo@gmail.com>
Date:   Thu Jul 16 09:25:55 2020 +0200

    macOS: Support arm64 architecture.

    Enabling all `make deps` dependencies with the exception of Embree and OIDN.
    After that, Blender can be compiled on an Apple Silicon Mac just like on any
    Intel based Mac. There are still compiler warnings that need to be
    investigated and there are probably a couple of bug still to be discovered
    and to be fixed.

    Most patches to the dependencies are simple and are about disabling SSE and
    setting the proper architecture to compiile for. Notable exception is Python,
    where I back ported a yet to be accepted PR for upstream Python:
    https://github.com/python/cpython/pull/21249

    Cross compiling or buliding a Universal Binary is not supported yet.
    The minimum macOS target version for x86_64 remains at 10.13, the target
    for arm64 is 11.00.

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

commit ad4928a171
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 17:00:16 2020 +1000

    UI: avoid aligning labels for ui_item_with_label

    Key-map display was doing thousands of redundant alignment operations.
    Set the spacing instead as align was only set to use zero spacing.

    This would have prevented the crash reported by T78636.

commit 75520894c7
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 16:32:55 2020 +1000

    Fix T78636: Crash displaying many aligned buttons

    Displaying user preferences search crashed on macOS when the search
    contained a common character such as 'E'.
    This caused alignment to 'alloca' too much memory.

    Replace with a heap allocation fallback.

commit 2811de6e5c
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 13:48:01 2020 +1000

    Cleanup: fix building without USE_UIBUT_SPATIAL_ALIGN defined

commit 5b099a25d7
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 13:27:50 2020 +1000

    Fix T78966: Center cursor doesn't refresh the UI

commit 123e29c274
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 13:17:31 2020 +1000

    Cleanup: missing CMake headers from source lists

commit 54abab53bf
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 11:07:36 2020 +1000

    Cleanup: undeclared function warning, unused argument

commit a3d90337b8
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 10:58:33 2020 +1000

    Cleanup: spelling

commit d11a2dfe71
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 16 10:44:37 2020 +1000

    Cleanup: minor change to grease pencil material access

    Rename for clarity and avoid passing in the prefix length.

commit 75a09ba2ed
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Thu Jul 16 02:24:37 2020 +0200

    Fix T78837: Prefetching can corrupt .blend files

    This happened because of typo in seq_dupli() when duplicating effect data.
    Instead of duplicating data to new sequence, it was duplicated into original.

    Reviewed By: sergey

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

commit 974e36d7d0
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 21:05:50 2020 +0200

    Fix T78647 UVEdit: Crash when entering edit mode with UV Editor open

    Only affects MacOS.

commit 058514aa0a
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 20:10:45 2020 +0200

    PointCloud: Initial rendering support for Workbench

    Also includes outline overlays. Removes the temp overlay drawing

    We make the geometry follow camera like billboards this uses less
    geometry. Currently we use half octahedron for now. Goal would be
    to use icospheres.

    This patch also optimize the case when pointcloud has uniform radius.
    However we should premultiply the radius prop by the default radius
    beforehand to avoid a multiplication on CPU.

    Using geometry instead of pseudo raytraced spheres is more scalable as
    we can render as low as 1 or 2 triangle to a full half sphere and can
    integrate easily in the render pipeline using a low amount of code.

    Reviewed By: brecht

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

commit d4d810f817
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Mon Jul 6 21:15:36 2020 +0200

    Cleanup: EEVEE: Remove concentric samples.

commit 37a8c6d809
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Mon Jul 6 21:06:16 2020 +0200

    Cleanup: EEVEE: Remove unused IRRADIANCE_CUBEMAP

commit 47885abbe6
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 16:41:30 2020 +0200

    Workbench: Replace viewvecs caculation by DRWView

commit cd8f3c9ee7
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 16:38:44 2020 +0200

    DRW: Add glsl math libraries

    Copied from eevee bsdf_common_lib.glsl

commit 2c1edcf3ef
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 15:01:59 2020 +0200

    EEVEE: Fix undefined behavior in world output

commit 24c846b2b4
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 14:59:52 2020 +0200

    GPU: Shader: Move IN_OUT define to shader GPU_shader_create_ex

    This adds the opportunity to use it in multiple places.

commit 987d14a3b2
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 14:40:28 2020 +0200

    DRW: Shader: Fix const correctness and print better debug output

commit 8e16873086
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 14:39:29 2020 +0200

    DRW: Shader: Add DRW_shader_create(_fullscreen)_with_shaderlib

    Some convenience function for using DRWShaderLibrary.

commit 5dcf60e053
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Wed Jul 15 14:35:57 2020 +0200

    DRW: View: Add ViewVecs calculation

    This will remove some code duplication between draw engines.

commit f1104c2828
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Wed Jul 15 18:52:01 2020 +0200

    Fix T78369: Sculpt Vertex Colors not rendering in EEVEE

    The vertex colors node was using the M_COL attribute type but Sculpt
    Vertex Colors use CD_PROP_COLOR
    Now the Vertex Color node also fallbacks to legacy vertex colors if
    Scultp Vertex Colors are not enabled as experimental.

    Reviewed By: brecht

    Maniphest Tasks: T78369

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

commit eb54624a9a
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 15 18:10:55 2020 +0200

    LibOverride: make outliner's 'override hierarchy' use same logic as 3DView operator.

    So now one can create a 'full', 'complete' override of a character from
    the outliner as well.

commit 5057b28a2f
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 15 18:09:30 2020 +0200

    LibOverride: move most of 'complete override creation' from ED_object to BKE_lib_override.

    This code is fairly complex and can be used in more places, better not
    duplicate that logic and just have it in BKE area.

commit ba100c883c
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 15 18:07:56 2020 +0200

    BKE collection: add util to add a collection using another collection as 'template'.

    Similar to what we already had using an object as 'template'.

commit a082e49671
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 15 15:51:13 2020 +0200

    Cleanup: remove debug prints.

commit cda6da4957
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 15 18:14:03 2020 +0200

    Fix error in recent commit

    Obviously a copy paste error of mine...

commit ae4098e234
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Wed Jul 15 17:25:07 2020 +0200

    GPencil: Fix unreported error baking mesh animation

    When the mesh is linked, the materials can not be available or be the same assigned to mesh. Now, if the mesh is linked, a simple two materials conversion is used.

    To get the full list of materials, the mesh must not be linked.

    Also checked some indexes to be sure never get a wrong value and that materials are not created again and again.

commit 36e836d0e9
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Wed Jul 15 17:03:51 2020 +0200

    Fluid: Adjusted Mantaflow version number

    Version number was increased after recent OpenVDB IO changes.

commit 19d17b217a
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 15 16:48:30 2020 +0200

    Particles: use CD_PROP_FLOAT3 instead of CD_LOCATION

    `CD_LOCATION` was only used temporarily due to the lack
    of a better alternative. This also removes the name from
    `CD_LOCATION` again, because at most one layer of this
    type should exist.

commit 57ec1f37e9
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 15 16:42:17 2020 +0200

    CustomData: add float2 and float3 data types

    This adds `CD_PROP_FLOAT2` and `CD_PROP_FLOAT3`.

    Reviewers: brecht

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

commit e06a346458
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Wed Jul 15 16:24:03 2020 +0200

    Fix T78747: Fix mesh boundary detection and automasking

    This issue was produced by a hack in the sculpt mode code from 2.80
     when the sculpt API for connectivity info was not available.
    The smooth brush was the only brush that needed connectivity info,
    so there were 3 different smooth functions with the connectivity
    queries implemented for dyntopo, meshes and grids. The mesh version
    of smoothing was checking the number of connected faces to a vertex
    to mask the mesh boundaries, which was not covering all cases and
    was hardcoded in the smooth function itself.

    This patch removes all those legacy functions and unifies all
    smooth functions into a single one using the new API and the
    automasking system. In order to achieve this, there were needed
    some extra changes:

    - The smooth brush now does not automasks the boundaries by default,
    so its default preset needs to be updated to enable automasking

    - The mesh boundary info is extracted once and cached in a
    bitmap, similar to the disconnected elements IDs. This makes
    boundary detection work as expected in all cases, solving a lot
    of known issues with the smooth brush. In multires, this info is
    extracted and cached only at the base mesh level, so it is much
    more memory efficient than the previous automasking system.

    - In order to keep the brushes responsive as they were before,
    the automasking system can now skip creating the cache when it
    is not needed for the requested options. This means that for
    high poly meshes and simple automasking options the brushes
    won't lag on start.

    Reviewed By: sergey

    Maniphest Tasks: T78747

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

commit 10cacbbb15
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Tue Jul 14 23:15:13 2020 +0200

    Fix T77417: Topology Automasking not working with individual vertices

    The flood fill operation was setting the mask using to_v, so in the first
    iteration when the floodfill callback was using the active vertex as
    from_v and any other neighbor as to_v, the mask for the active vertex
    was never set.

    Now the mask is set using from_v and it checks if it should continue
    propagating to the next neighbor using to_v.

    Reviewed By: sergey

    Maniphest Tasks: T77417

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

commit 613d314251
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Wed Jul 15 17:35:57 2020 +1000

    UV: support region fill for path select

    This matches edit-mesh region selection (Ctrl-Shift-Select).

commit b3c34011c0
Author: Hans Goudey <h.goudey@me.com>
Date:   Wed Jul 15 09:11:01 2020 -0400

    Cleanup: Replace 0 with False for boolean argument

commit efc6f6e1ae
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 15 14:23:51 2020 +0200

    Clang-Tidy: ignore some newer checks

    Those checks have been added to clang tidy within the last year.
    They fail when I use a clang tidy version I built from source.

    Reviewers: sergey

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

commit 5a11c8ba24
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Wed Jul 15 21:48:28 2020 +1000

    Fix T68845: Follow Active Quads, divide by zero error

commit 87f8949f0e
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Wed Jul 15 13:37:13 2020 +0200

    Fix T78930: Cycles OpenCL error on graphics cards that don't support half float

commit 44bb73e765
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Wed Jul 15 08:10:41 2020 -0300

    Revert "Cleanup: simplify Weld Modifier logic"

    This reverts commit 98b1a716d6.

    That commit broke a few modifiers.py tests
    (Screw+Weld and a weld merge threshold).

    And some pairs may be lost in the first loop.

commit ff2fa59689
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 15 12:45:40 2020 +0200

    Fix T76690: Incorrect liquid particle count displayed

    Reviewers: sergey, sebbas

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

commit 4e8fc14120
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Wed Jul 15 12:47:45 2020 +0200

    GPencil: Fix name typo error

commit 7e2ffbfb25
Author: Sebastian Parborg <darkdefende@gmail.com>
Date:   Wed Jul 15 12:36:48 2020 +0200

    Add missing NULL assignment to D8293

    Missed reseting "next_td" in that patch.
    Shouldn't have caused any issues in practice, but it is nice to be
    extra clear and safe in the code.

commit 50c6448781
Author: Sebastian Parborg <darkdefende@gmail.com>
Date:   Wed Jul 15 12:28:32 2020 +0200

    Fix T78909: Curve-edit proportional connected-only broken

    Now it calculates the actual distance when traveling along the curve.

    I addition to this, it also now supports cyclic curves.

    Reviewed By: Campbell

    Differential Revision: http://developer.blender.org/D8293

commit e8b26a0501
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 15 11:06:37 2020 +0200

    Fix signed/unsigned comparison

commit 680a81fc49
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 15 10:58:54 2020 +0200

    LibOverride: rework 'make override' 3DView operator.

    Removed the 'select main object to override' menu when overriding an
    instanced collection, this was no more used anyway.

    Added new behavior allowing to select which directly linked collection
    to override when trying to override an inderctly linked object. This
    allows to link collections without instancing them with an empty object,
    select one of their objects, and call override operator.

commit eb87b1c8f6
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Wed Jul 15 15:37:03 2020 +1000

    Cleanup: remove assignment from a NULL struct

    Quiet ASAN 'member access within null pointer' warning.

    While this doesn't crash, access to 'shading'
    without checking if the 'v3d' would have.

commit 920b138f83
Author: Liam Scaife <Voltist>
Date:   Wed Jul 15 15:19:21 2020 +1000

    UI: Add manifold extrude to extrude menu

commit e062def3b4
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Wed Jul 15 13:11:22 2020 +1000

    Cleanup: spelling

commit 061d76f55c
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Wed Jul 15 13:09:06 2020 +1000

    Revert "Cleanup: remove public unused function."

    This reverts commit 03c8b048a1.

    This commit re-introduced T76837.

    While there is a comment explaining why this function is needed,
    the naming of the poll function does make this confusing.
    The API could be changed to avoid confusion here.

commit d493fc43bd
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Tue Jul 14 17:45:31 2020 -0300

    Fix T78875: Numerical display of delta of translation is not updating in 3d view

commit 7f67e3200a
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Tue Jul 14 22:16:43 2020 +0200

    Fluid: Fix liquid mesh scaling

    Fixes issue with .bobj.gz and .obj mesh files not always being scaled correctly in the viewport.

commit 7e0289b618
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Tue Jul 14 22:15:00 2020 +0200

    Fluid: Updated Mantaflow source files

    New files include fixes for obj mesh import and minor cleanups.

commit 98b1a716d6
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Tue Jul 14 15:18:03 2020 -0300

    Cleanup: simplify Weld Modifier logic

    The original code to rearrange the weld vertices map was confusing.

    It traverses the overlap result multiple times within a loop.

    This part of the code has therefore been rethought, simplified and commented.

    This also results in a slight improvement in the performance of the modifier.

commit dbcc74f801
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Tue Jul 14 18:11:28 2020 +0200

    Fix T77263: Mantaflow: Cache gets deleted at changing upres factor under Particles section.

    Moved fluid simulation reset to separate functions based on type.

commit 0b100e21fb
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 13 14:19:13 2020 +0200

    Fix T78704: RenderPass normals disapear when view isn't updated

    When the view isn't updated the renderpass thought that it was rendering
    the next sample, skipping the conversion from encoded to blender
    normals.

    This patch resets the current sample when only rendering single sample
    layers.

    Reviewed By: Clément Foucault

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

commit 6cc88e330b
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 6 08:41:28 2020 +0200

    Fix T78431: Update mesh_cd_layers_type_ to support 8 bytes.

    Sculpt vertex colors changed the `DRW_MeshCDMask` from 4 bytes to 8 bytes, but
    the functions assumed it still was 4 bytes. This patch updates the functions and
    adds a compile time check.

    Reviewed By: Clément Foucault

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

commit 2ba1cf4b40
Author: Sebastian Parborg <darkdefende@gmail.com>
Date:   Tue Jul 14 17:26:13 2020 +0200

    Fix T78880: UV Editor - Match prop edit connected behavior with mesh editing and fix Rip Region double proportional checkbox

    This fixes the double prop edit checkbox in the redo menu.

    This also makes it so that proportional edit in connected mode now
    matches how it behaves in mesh edit mode.

    Without this change, ripping in UV edit mode with proportional edit on
    would be useless as the UV verts you ripped will still be stuck together
    even if they were not connected anymore.

    Reviewed By: Campbell

    Differential Revision: http://developer.blender.org/D8289

commit 797027be6b
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Tue Jul 14 16:30:01 2020 +0200

    Fluid: Fix missing flag update for cache

    These flags need to be set correctly in order to distinguish between data that comes from cache files and raw data that comes directly from pointers to the data in Mantaflow.

commit 14eaa9ed63
Author: Bastien Montagne <bastien@blender.org>
Date:   Tue Jul 14 16:03:12 2020 +0200

    LibOverride: fix for removing `use_override_library` in rB3d587efef2872.

    Thanks to @JacquesLucke for the heads up.

commit 8e9dd5492a
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Tue Jul 14 15:59:40 2020 +0200

    Gpencil: Simplify modifier sample mode minimal vert count fix.

    For this mode is possible use strokes of 2 points.

    Differential revision: https://developer.blender.org/D8138

commit c8a62e4f50
Author: Bastien Montagne <bastien@blender.org>
Date:   Tue Jul 14 15:27:41 2020 +0200

    Cleanup: function name not following its module conventions.

commit 6068f49c33
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 14 15:20:44 2020 +0200

    BLI: remove static assert noexcept move constructors

    The move constructor of `mpq_class` from GMP currently
    allocates when it is moved. So, it cannot be noexcept.
    Since we want to use this type, this static assert cannot
    stay there.

commit 2e8a78f4d1
Author: Kévin Dietrich <kevin.dietrich@mailoo.org>
Date:   Mon Jul 13 18:26:48 2020 +0200

    Fluid bake: fix memory leak when path validation fails

    Reviewed By: sebbas

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

commit 78148e20fa
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 14 22:47:18 2020 +1000

    Cleanup: remove tab indention

commit fa7ace2215
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 14 22:45:33 2020 +1000

    PyAPI: support element multiplication for vector, matrix, quaternions

    This was disabled during 2.8x for smooth porting of 2.7x scripts,

    Now '@' is used for matrix multiplication,
    support '*' to multiple vector elements.

    See T56276.

commit e3fd60b182
Author: Bastien Montagne <bastien@blender.org>
Date:   Tue Jul 14 14:49:59 2020 +0200

    LibOverride: Outliner: Add an operation to override the selected ID and its parents.

    This will override all linked data-blocks in the tree branch leading to
    the selected one.

commit 140b26909e
Author: Bastien Montagne <bastien@blender.org>
Date:   Tue Jul 14 11:38:25 2020 +0200

    LibOverride: Move code tagging reauired dependencies of an override into BKE.

    This is fairly generic code that can be re-used in other places.

commit 1e5ce39156
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Tue Jul 14 09:30:54 2020 -0300

    Fix T78900: Single vertex sliding crashes

    As we can see in `initVertSlide_ex`, `sld` can be `NULL`.
    `sld` is dereferenced, but can still be `NULL`.

commit 01ec76842f
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 14 13:47:32 2020 +0200

    Fix T77766: support animated global gravity toggle

    Reviewers: sebbas

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

commit 4096330b81
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 14 13:01:46 2020 +0200

    Cleanup: typo

commit 25fc84bf2e
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 14 10:42:35 2020 +0200

    Fix wrong vector size functions used in knife tool

    Should not use copy_v3_v3 on a 2 element vectors.

commit 26793d619c
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Tue Jul 14 10:26:19 2020 +0200

    GPencil: Cleanup Build modifier and fix potential div by zero errors

commit 0fb08b7cc4
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 14 16:04:18 2020 +1000

    Cleanup: sort header, cmake paths

commit 93e14e5935
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 14 15:53:56 2020 +1000

    Fix T78883: New bezier curve points to uninitialized memory

commit 5338b36fcc
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 14 15:19:52 2020 +1000

    Cleanup: spelling

commit b818f6b55f
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 13 20:10:49 2020 -0400

    Fix T78902: Only check main modifier panel for expansion property

    Internally the "show_expanded" property stores the expansion for every
    subpanel, but for RNA we should only check the first bit of the flag that
    corresponds to the main panel.

commit 0b24930541
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 13 17:16:01 2020 -0400

    UI: Add missing row in curve profile template

commit 37fb586a0b
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 13 16:10:45 2020 -0300

    Cleanup: remove unnecessary member

    `Kfv-> sco` was being treated as a local variable, and can be
    confusing since this value is not updated when navigating the viewport.

commit 70992ae270
Author: Ray Molenkamp <github@lazydodo.com>
Date:   Mon Jul 13 12:29:53 2020 -0600

    Fix: Fix build error with MSVC in BLI_span_test

    span.size() returns an uint, causing a signed/unsigned comparison
    using 3u sidesteps the issue

commit 6e74a8b69f
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Mon Jul 13 16:45:15 2020 +0200

    Fix T78881: Cycles OpenImageDenoise not using albedo and normal correctly

    Properly normalize buffers now. Also expose option to not use albedo and normal
    just like OptiX.

commit 2b5e21fe00
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Sat Jul 11 00:19:45 2020 +0200

    Sculpt: Add extra deform types to Smear

    The smear brush was using the stroke direction to slide colors across
    the mesh surface (this is called drag in other sculpt tools). Similarly,
    other deformations can be included. The most common ones in image
    editing are pinch and expand, which can be used to sharpen transitions
    between colors.

    Reviewed By: sergey

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

commit 1076952209
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Fri Jul 10 23:00:21 2020 +0200

    Fix wrong variable name in Sculpt Vertex Colors experimental check

    Reviewed By: sergey

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

commit eb3f74a0fe
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Fri Jul 10 19:43:01 2020 +0200

    Sculpt: Enable color palettes for sculpt vertex colors

    Enables the color palette subpanel for brushes that have color
    capabilities (only the paint brush for now)

    Reviewed By: sergey

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

commit 8dd2386a68
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 17:43:22 2020 +0200

    IDTemplate: Minor tweak to 'make local/override' code.

    Only update pointer of the template if we actually changed it...

commit fcc91faf3f
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 17:02:58 2020 +0200

    Fix (unreported) bad handling of undo for some IDTemplates operations.

commit 91e67c7bda
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 13 16:55:39 2020 +0200

    Cleanup: remove some incorrectly placed consts

    Clang-tidy reported that those parameters could be const,
    but that is not true on windows.

commit 3d587efef2
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 16:44:41 2020 +0200

    LibOverride: Cleanup: Remove option to disable library overrides.

    Code is mature enough now to not need this anymore, people who do not
    want to use liboverrides can just not create them.

commit 5c8dd2a703
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 13 11:40:14 2020 -0300

    Cleanup: silence warnings

commit 3dcc7c73e2
Author: Ray Molenkamp <github@lazydodo.com>
Date:   Mon Jul 13 08:38:31 2020 -0600

    MSVC: Fix build error with the 8.1 SDK

    shobjidl_core.h only exists in the windows 10 SDK in the 8.1
    SDK ShObjIdl.h will have the definitions we need, which still
    exists in the 10 SDK and implicitly includes shobjidl_core.h.

    so ShObjIdl.h will work on both SDK versions.

commit 29da019cb3
Author: Szymon Ulatowski <szulat>
Date:   Mon Jul 13 17:02:19 2020 +0200

    EEVEE: Fix sky zenith bug

    Careless use of acos() in spherical coordinates transformation was
    deteriorating the precision near zenith (and nadir) and producing
    glitchy pixels (best seen in longer focal lengths).

    Reviewed By: fclem

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

commit 16989c4d1d
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 16:15:52 2020 +0200

    Fix T78037: fresh install of blender 2.83.0 not able to save user startup file.

    Simply remove that check ob userdef's themes, we are never read any
    userdef from startup file anymore, so this check makes no more sense.

    To be backported to 2.83.

commit 952279a366
Author: Sebastián Barschkis <sebbas@sebbas.org>
Date:   Mon Jul 13 16:09:24 2020 +0200

    Fix T76687: [Mantaflow] low domain transformation performance

    Implemented G.moving suggestion from comments.

commit 5ecefc6a07
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Mon Jul 13 15:42:47 2020 +0200

    Build: make update support for git tags

    Previously it only picked the appropriate version with the
    blender-vX.XX-release branches.

commit 2be7a11e43
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Mon Jul 13 15:26:00 2020 +0200

    Python API: new RNA property `Screen.is_scrubbing`

    This commit adds a new read-only boolean property `Screen.is_scrubbing`.

    The related property `Screen.is_animation_playing` is set to `True` in
    two situations:

    - Animation is actually playing (for example via the Play button in the
      timeline)
    - The user is scrubbing through time (in the timeline, dopesheet, graph
      editor, etc.)

    To distinguish between these two cases, the property
    `Screen.is_scrubbing` has been added.

    Concept approved by @brecht.

commit b9f565881e
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Mon Jul 13 15:02:25 2020 +0200

    VSE: Python API, allow creation of VSE Movie strips with missing file

    It was already possible to create Sound and Image strips that reference
    non-existing files. Now it's also possible to create Movie strips
    referencing missing files via the Python API call
    `Sequences.new_movie()`. In this case, the duration of the strip will be
    set to 1 frame.

    Note that this commit does not change anything in the user interface.

    The Python API of the `MovieStrip` class is extended with a function
    `reload_if_needed()`. This function only performs disk I/O if the movie
    strip cannot produce frames, that is either when its filepath points to
    a non-existing file, or when the video sequence editor has not been
    shown yet (for example because it is in an inactive workspace).

    This allows for the following:

    ```
    import bpy

    scene = bpy.context.scene
    vse = scene.sequence_editor_create()

    filepath = bpy.path.abspath('//demo.mkv')
    strip = vse.sequences.new_movie("movie", filepath,
        channel=2,
        frame_start=47,
        file_must_exist=False)
    strip.frame_final_end = 327
    ```

    This will create a new movie strip, even when `demo.mkv` does not exist.

    Once `demo.mkv` has appeared at the expected location, either
    `strip.reload_if_needed()` or `strip.filepath = strip.filepath` will
    load it.

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

    Reviewed By: Sergey, ISS

commit 9db0c36af1
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 14:29:04 2020 +0200

    LibOverride: add more polling checks to operators not supposed to work on overrides.

    This is long work, we are still likely missing a lot of cases...

commit 03c8b048a1
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 14:15:57 2020 +0200

    Cleanup: remove public unused function.

commit 9c9eb03d78
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Sun Jul 12 21:47:50 2020 -0300

    Fix T78855: Knife tool crashes when the geometry has no face

    I don't see the need for a BVH Tree to have root but not have leafs.
    But apparently this case is possible.

commit f019164f1f
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Sun Jul 12 21:13:05 2020 -0300

    Optimization: Use dedicated function to restore customdata

    Called when canceling a transform operation.

commit 8074a18964
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Sun Jul 12 21:01:54 2020 -0300

    Cleanup: move unchanged condition out of loop

commit 7b558a20a9
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Sun Jul 12 20:53:22 2020 -0300

    Fix Extrude Manifold losing original UV

commit 976a0ff691
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 12:48:56 2020 +0200

    RNA code cleanup: Fix wrong usages of `rna_idproperty_check()`.

    This function is more expansive than the simpler `rna_ensure_property()`
    one, and should only be used when IDProperty data is actually needed.

    If one only needs to ensure it has a valid PropertyRNA pointer,
    `rna_ensure_property()` is much more efficient.

    Also add compiler warnings when results of those functions are unused,
    this should never be the case.

commit f8afbb7657
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 12:47:49 2020 +0200

    RNA property management: tweak to 'is set' information.

    Only consider a full IDProperty as set if it actually exists in given
    PointerRNA data.

commit 0158571b34
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 13 12:46:29 2020 +0200

    I18n utils: fix broken case when 'settings' argument is default NULL one.

commit 7453ff73ad
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 13 12:48:46 2020 +0200

    Cleanup: quiet warnings by adding const in some places

    The warnings were introduced in rB725973485a909c2b732c5.

commit 725973485a
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 13 11:27:09 2020 +0200

    Clang Tidy: enable readability-non-const-parameter warning

    Clang Tidy reported a couple of false positives. I disabled
    those `NOLINTNEXTLINE`.

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

commit a19584a471
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 13 10:51:46 2020 +0200

    BLI: fix constructor regression for Vector and Array

    This was introduced in rB403384998a6bb5f428e15ced5.

commit 644a915b1b
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 13 10:49:59 2020 +0200

    BLI: don't allow mutable span of initializer list

commit 0718c6fae0
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 13 10:40:05 2020 +0200

    Cleanup: fix clang tidy warning

    The code was actually correct, but clang tidy complaint about
    using the Vector after it was moved from.

commit 91c763af3e
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 13 10:34:44 2020 +0200

    Cleanup: typo

commit 6dabfacb38
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:53:54 2020 +0200

    Sky: Code style and formatting fixes

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

commit 6a3c91f7ad
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:53:02 2020 +0200

    Cycles: Clamp Sky Texture altitude to avoid numerical issues

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

commit 7aacf2e119
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:52:07 2020 +0200

    Cycles: Account for Sky Texture mapping in the sun sampling code

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

commit 192bd2605f
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:51:13 2020 +0200

    Cycles: Change precomputed Sky Texture mapping to prioritize the horizon

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

commit 41e6f9bd43
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:49:25 2020 +0200

    Cycles: Add control for sun intensity in Sky Texture and change altitude to km

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

commit e2736afdbe
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:44:24 2020 +0200

    Cycles: Add versioning code for the new Sky Texture model

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

commit 77cd8182f8
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:40:47 2020 +0200

    Cycles: Remove Vector input on Sky texture when using the included sun

    When using the sun, we need to sun sampling logic to avoid excessive
    sampling map resolution, but that logic assumes that the Vector input
    comes from the view direction.
    That is the case in the vast majority of cases anyways, so the easiest
    solution is to just remove the input for that case.

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

commit 474dcbcf12
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Mon Jul 13 01:39:11 2020 +0200

    Cycles: Remove limits on the Sky texture's sun rotation

    For animation/driver purposes, being able to go outside of the 0-360
    range makes things easier.

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

commit f319eec881
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 11:05:43 2020 +0200

    Cleanup: disable debug code

commit 30ed51d60a
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:50:19 2020 +0200

    Cleanup: unused debug variable

commit 21b20ae5ec
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:38:57 2020 +0200

    Particles: initial support for forces in simulation node trees

    The force node can now be used to control the behavior of particles.
    Forces can access particles attributes. Currently, there are three attributes:
    `Position` (vector), `Velocity` (vector) and `ID` (integer).

    Supported nodes are: Math, Vector Math, Separate Vector, Combine Vector and Value.

    Next, I'll have to split `simulation.cc` into multiple files and move
    some stuff out of blenkernel into another folder.

commit ebf9082e1c
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:38:30 2020 +0200

    Nodes: support more implicit conversions in simulation node tree

commit 838b1742fb
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:38:03 2020 +0200

    Functions: minor improvements

commit 404486e66c
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 10:01:37 2020 +0200

    Functions: minor api improvements

commit ee5c2f6ead
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 11 20:41:21 2020 +0200

    GPencil: Replace "ShaderFX" with "Shader Effects" in RNA prop text

commit c7eada103c
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 18:02:06 2020 +0200

    Nodes: support implicit conversions and incorrectly linked sockets

commit 06401157a6
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 17:59:43 2020 +0200

    Fix: incorrect attribute type in network

commit 46b79b3d4a
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:55:57 2020 +0200

    Nodes: support vector math node in simulation node tree

commit b920875893
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:47:53 2020 +0200

    Nodes: support math node in simulation node tree

commit 8fae58ce0b
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:39:17 2020 +0200

    Nodes: support Value node in simulation node tree

commit 16d4373158
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:24:53 2020 +0200

    Nodes: move Math, Vector Math and Value shader nodes to c++ files

    This required a little bit of refactoring, because we were using c-only
    syntax for the gpu shader names. All tests are still passing.

commit 415d3ee05b
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 22:03:27 2020 +1000

    UV: add path select operator that uses the selection

    Instead of using the mouse cursor position,
    this selects between existing selected elements.

    Access this since picking a selection path doesn't
    work from the menu.

commit 6e698653df
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 20:34:17 2020 +1000

    Cleanup: remove unused function

commit 651db1b26f
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 15:10:05 2020 +1000

    Cleanup: spelling

commit 020e0f11ff
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 14:50:47 2020 +1000

    Docs: remove reference to PYTHONHOME

    This is no longer used by default, when '--python-use-system-env' is set
    there are many Python environment variables, don't list them in
    Blender's help message.

commit d2b910fafe
Author: Aaron Carlisle <carlisle.b3d@gmail.com>
Date:   Fri Jul 10 16:07:31 2020 -0400

    UI: UV: Add Select Shortest Path to menu

    This matches the 3D Viewport

commit 3dc0178390
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 20:00:20 2020 +0200

    Fix T78662: Cycles baking fails if denoising is enabled, after recent changes

    This is not supported yet.

commit 6fbacd6048
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 19:56:53 2020 +0200

    Fix build error building without OpenImageDenoise

commit 48f10319c6
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 18:40:35 2020 +0200

    Fix T78801: Eevee missing setting to enable/disable freestyle per view layer

    This was only visible when Cycles was enabled.

commit 4e8fc15586
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 10 12:21:32 2020 -0400

    UI: Improve transform constraint layout

      - Remove the "mapping" subpanel and moves the source axis
        selection ot the destination subpanel.
      - Rename "Source" and "Destination" to "Map From" and "Map To" to
        make the action more clear
      - Gray out source axes when their data isn't selected.

      These changes were discussed in D8041.

commit 3e4f49fe71
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 18:02:51 2020 +0200

    Revert "Fix T78296: Performance - Use Binary Search for MDeformWeight"

    This reverts commit 39b525e0f0 and
    3121015dce as tests are failing.

commit d5208c45fa
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Fri Jul 10 17:56:05 2020 +0200

    GPencil: Fix unreported Use Falloff curve for active frame not working

    For the active frame it was using always a value of 1.0 and it was not using the curve.

commit 6eeb32706a
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 12:20:07 2020 +0200

    Cycles: support OpenImageDenoise in final renders

    Performance is not great currently due to the API not seeming to support
    efficient denoising of multiple tiles at the same time. So in many cases
    only one or a few threads will actually be denoising at the same time.

    In renders with many samples this is not a big problem, but for faster
    renders it's a signficant overhead.

    We should try to optimize this still, possibly by batching denoising of
    a bigger neighborhood of multiple tiles at once.

commit 93791381fe
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 20:01:22 2020 +0200

    Cleanup: reduce hardcoded numbers in denoising neighbor tiles code

commit e65c78cd43
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 18:54:42 2020 +0200

    Cleanup: minor refactoring in Cycles update detection code

commit ad45b8d6a4
Author: Milan Jaros <jar091>
Date:   Fri Jul 10 11:49:52 2020 +0200

    Cycles: optimize camera inside volume tests

    Only run when there are volumes in the scene, and compute in parallel.

    Ref T56939

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

commit d8e648c352
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 17:09:35 2020 +0200

    Fix T78776: Cycles OpenCL error after recent changes for holdouts

commit 9dbe9a753a
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 16:50:26 2020 +0200

    Fix T78766: Blender crashes after deleting vertices with Custom Normals.

    Some core BMesh topology changing functions were not properly tagging
    custom normal runtime caches as dirty...

commit 5372924983
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Fri Jul 10 16:14:10 2020 +0200

    Fix T78579: Proxy produces wrong preview when using Offset or Crop

    Make sure that proxy and original images are scaled to same size before
    applying offset or crop.

    During testing, I discovered, that raw cache will lose information whether
    this image was proxy or not. Because of this, proxy images will not create
    this cache type. It would be fairly easy to implement this functionality for
    cache, but I have decided to not do it now, because I did not want to pass yet
    another mostly hard-coded bool flag to cache system. Since image is proxy, it
    should be fast to read anyway.

    In case of using offset property, code was modified to make sure we scale
    image only once. I also tried to make code more readable and streamlined and
    cleaned up surrounding functions a bit.

    Reviewed By: brecht

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

commit 77f823a240
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Fri Jul 10 15:57:28 2020 +0200

    Fix T78573: Crash when removing strips with prefetching

    Stop prefetching before changing content of seqbase.

    Reviewed By: brecht

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

commit 47e71f4623
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Fri Jul 10 15:53:57 2020 +0200

    Fix T69440: Memory leak adding strips via python

    seq->strip was overwritten in python API function.

    Reviewed By: sergey

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

commit cbfedf2139
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 15:53:36 2020 +0200

    BLI: add C++ random number generator

    This adds `blender::RandomNumberGenerator` in `BLI_rand.hh`.
    Furthermore, `RNG` is now implemented in terms of this new generator.
    No functional changes are expected, the generated random numbers
    are not changed by this commit.

    Reviewers: campbellbarton, brecht

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

commit c2304d2f02
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 15:29:03 2020 +0200

    Expose override flags to python RNA properties definition.

    Time will tell whether we need to expose more RNA override flags here.

    Implements/Fix T78534.

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

commit 4d1c3c029e
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 08:37:35 2020 +0200

    Cleanup: declaration and implementation function signature did not match

commit f93e0f1a9e
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 15:23:52 2020 +0200

    Refactor override code to properly deal with runtime rna properties too.

    The triplet static RNA / runtime RNA / custom properties is a real pain to
    deal with...

    Using the new `PropertyRNAOrID` struct helps clarifying and properly
    dealing with all three cases.

    Note that this makes override of py-defined RNA properties working
    (support for that will be committed next).

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

commit 337e2c9029
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 15:19:40 2020 +0200

    RNA: refactor how we get 'ensured' RNA properties.

    Introduce new PropertyRNAOrID structure, storing most useful data about
    an 'opaque' PropertyRNA in relation with a given PointerRNA struct.

    It deals with all the three cases (pure static RNA, runtime RNA where
    data is actually stored in IDProperties, and pure IDProperties, aka
    custom data.

commit 6c1157201a
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 22:59:12 2020 +1000

    Cleanup: simplify platform define checks

    Platforms besides WIN32 were in a single else clause, use elif instead.

commit 45287f909c
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 22:58:30 2020 +1000

    Fix for building on systems besides apple/windows/linux

commit 26d28ade26
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:40:23 2020 +0200

    Cleanup: follow code style

commit c806db6313
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:22:35 2020 +0200

    Functions: add utility to find dependencies of input sockets

commit 60133ff98d
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:20:39 2020 +0200

    Functions: store derived node tree and network in map for future access

commit 295b3aefb0
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:19:45 2020 +0200

    Functions: make constant folding work on unfinished networks

commit 7bae599232
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:18:51 2020 +0200

    Nodes: add redundant name check in debug builds to prevent errors

commit 3121015dce
Author: Jeroen Bakker <jeroen@blender.org>
Date:   Fri Jul 10 13:37:12 2020 +0200

    Fix Crash due to recent changes

    {39b525e0f07fa25dcda54226ade789959b642dec} could write in unallocated
    space.

commit 00eb6a56aa
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Fri Jul 10 13:30:08 2020 +0200

    GPencil: Fix tooltip error

    The tooltip was copied by error from Lattice modifier.

commit 8fd65a2252
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:56:57 2020 +0200

    Functions: use new is-equal and hash function of CPPType

commit 3edd2832b2
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:54:19 2020 +0200

    Functions: make generic types hashable

commit f62204718b
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:53:50 2020 +0200

    BLI: initial hash function for Color4b and float4x4

commit 8f6c0f2242
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:41:51 2020 +0200

    Functions: make generic types equality comparable

commit 52636c3059
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:36:06 2020 +0200

    Cleanup: various cleanups in for CPPType

commit 39b525e0f0
Author: Jeroen Bakker <jeroen@blender.org>
Date:   Fri Jul 10 12:05:31 2020 +0200

    Fix T78296: Performance - Use Binary Search for MDeformWeight

    Use binary search for querying deform weights.

    Spring 02_020_A.anim.blend on Ryzen 1700X goes from 12.4 to 12.7fps.

    During profiling it was detected that adding new items to the head was faster than adding to the tail.

    Reviewed By: Campbell Barton

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

commit 77a646279d
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:04:32 2020 +0200

    Cleanup: structure CPPType according to code style guide

commit 9c25731781
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 11:53:11 2020 +0200

    LibOverride: Fix improper tagging of more of the backward pointers in RNA nodetrees.

commit 582a0b7e5a
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 19:02:18 2020 +1000

    Fix T78756: White UV drawing is displayed as Dashed

commit 7a9028cad1
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 18:58:36 2020 +1000

    Fix UV rip failing to disable proportional edit-mode

commit a148c4676b
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 16:04:09 2020 +1000

    Cleanup: spelling

commit 03f5acd445
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 16:03:12 2020 +1000

    Cleanup: clang-format

commit 8b660ea0ec
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 13:36:16 2020 +1000

    Fix UV path redo in vert/edge mode

    Redo was only working in some situations,
    some options were also not being forwarded.

commit 96068324cd
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 13:35:44 2020 +1000

    Fix BM_loop_at_index_find lookup

commit 89cb41faa0
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:55:59 2020 +1000

    UV: allow ripping face-regions

    This changes the behavior of rip when entire faces are selected.
    Now face regions are isolated and moved instead of ripping the edge-loop
    extracted from the selection boundary.

    This is a convenient alternative to separate selection & move.
    Resolves T78751.

commit 3fdd092649
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:38:28 2020 +1000

    Cleanup: face-center mesh calculation

    Loop over faces and calculate their centers instead of zeroing the
    face center array and accumulating all faces vertex corners.

    Move subsurf face center extraction into it's own loop since it works
    differently.

commit b0378440ce
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:18:43 2020 +1000

    Fix missing adjacent UV check for recent UV path select

    Path selection could cross UV islands if the destination element was
    on an island boundary.

commit 8f24ec2e26
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:04:29 2020 +1000

    Cleanup: add BLI_linklist_find_last

    This makes adding to the end of a linked list simpler,
    In most cases we avoid this in favor of BLI_linklist_append.

    For one off operations it's OK.

commit 3dd460aa7f
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:41:14 2020 +1000

    Cleanup: spelling

commit a0d3b60015
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:46:26 2020 +1000

    Cleanup: use FLT_MAX for the maximum path selection cost

    A large number below FLT_MAX was used to avoid overflow,
    however this doesn't cause any problems.

commit 0b77e2f4c4
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:31:41 2020 +1000

    Cleanup: variable names, use define for maximum path cost

commit 92bc277950
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:40:38 2020 +1000

    Cleanup: undeclared warnings

commit 3623db7784
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 19:03:50 2020 +0200

    BLI: add more operator overloads for float2

commit 03a00bda2b
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Thu Jul 9 17:16:24 2020 +0200

    Sculpt: Make Sculpt Vertex Colors features experimental

    This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option.

    Reviewed By: brecht

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

commit 1e3247c078
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 18:19:39 2020 +0200

    Fix: add missing extern "C"

commit a90b69d065
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 18:04:13 2020 +0200

    Build: add more libc compatibility functions for upcoming libraries update

    These are needed by the x264 library.

commit 6778949e01
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Thu Jul 9 17:56:00 2020 +0200

    Fix repeated Face Sets IDs when joining meshes

    As Face Sets IDs start from 0 and increase by 1 each time a new face set
    is created in a mesh, when joining multiple meshes it could happen that
    the same ID is used by several unrelated areas in multiple objects. This
    checks the Face Sets IDs when joining meshes and ensures that they are
    not repeated between different objects when joining them, so in the
    resulting mesh all previous face sets will have different IDs.

    Reviewed By: sergey

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

commit 7b1c406b54
Author: Bastien Montagne <bastien@blender.org>
Date:   Thu Jul 9 15:33:34 2020 +0200

    Implement T77959: Never duplicate linked data during deep-copy.

    Note that this behavior is enforced on user level for now, but on code
    side it is controlled with a flag, which should make it easy to refine
    that behavior if needed.

    Only exception is when we duplicate a linked ID directly (then we assume
    user wants a local deep-copy of that linked data, and we always also
    duplicate linked sub-data-blocks).

    Note that this commit also slightly refactor the handling of actions of
    animdata, by simplifying `BKE_animdata_copy_id_action()` and adding an
    explicit new `BKE_animdata_duplicate_id_action()` to be used during ID
    duplication (deep copy).

    This also allows us to get rid of the special case for liboverrides.

commit 78b629a98f
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Wed Jul 8 18:10:31 2020 +0200

    Sculpt: Skip fully hidden nodes in sculpt tools

    As tools iterators skip not visible vertices, fully hidden nodes can
    also be skipped and considered as masked.

    Reviewed By: sergey

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

commit 1fb667da01
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Tue Jul 7 23:01:51 2020 +0200

    Fix wrong upate flag when updating the PBVH visibility

    This function was using the wrong flag to update the visibility state of
    the nodes, so I assume that most of the partially visible optimizations
    were not working.

    Reviewed By: sergey

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

commit e5ebaa9fd6
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Wed Jul 8 17:22:11 2020 +0200

    Fix T78664: Implement Mesh and Face Set boundary automasking in Multires

    This implements the SCULPT_vertex_is_boundary and SCULPT_vertex_has_unique_face_set functions for PBVH_GRIDS, which makes features such as automasking now work in multires. It also fixes some other face sets related features in multires, like face set boundary smoothing.

    This uses the BKE_subdiv_ccg_coarse_mesh_adjacency_info_get function to get the vertex indicies in the base mesh from multires. This way the API functions can get topology or face set information directly from it. In the future, these vertex indices can be used to get any other information from the base mesh from multires, like seams, sharp edges, disconnected elements IDs...

    Reviewed By: sergey

    Maniphest Tasks: T78664

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

commit bd84b2cbcc
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Sat Jul 4 18:28:40 2020 +0200

    Fix Sculpt Vertex Colors sample color changing brush alpha

    It is not practical to change the alpha of the paint color with the
    color picker as with the current brush design alpha is the main strength
    control for the brush.

    Reviewed By: sergey

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

commit 13b1374497
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Thu Jul 9 17:41:04 2020 +0200

    Fix crash when using Mask by Color in Multires

    Reviewed By: sergey

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

commit 78d48343ae
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Thu Jul 9 15:59:57 2020 +0200

    Make deps: Fix compilation error on CentOS

    There were two issues.

    First is related on ISPC's CMake configuration forcing C and C++
    compilers to be clang and clang++. This goes against of desired
    behavior when we use our own compiled clang compilers.

    The second issue was related on linker failure: CLang libraries
    are linked statically, and they need some of C++ 11 STL symbols
    which are coming from libstdc++.

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

commit 2be0ae7c99
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 16:51:48 2020 +0200

    Fix Cycles unnecessary updates to camera in viewport render

    Problem identified by Milan Jaros.

commit 9de09220fc
Author: Szymon Ulatowski <szulat>
Date:   Thu Jul 9 17:19:52 2020 +0200

    EEVEE: Implement the missing Sky texture

    I'm not sure if the Sky was deliberately left out or was just waiting for a
    better moment, but so many I was disappointed that Sky in EEVEE is
    completely white.

    There are already 2 implementations (osl and gpu) so this is the third one.
    Looking at other cases it seems that we are not supposed to share sources
    between cycles and the rest? So the new util_sky_model files are just
    copies of what is already in cycles, except that the data file uses the RGB
    variant of the Hosek/Wilkie model, because we output RGB anyway (but can be
    easily changed to XYZ if desired - the results are nearly identical).
    I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I
    wanted to use mat3 but it does not work).
    Also, should I cache the sky model data between renders if the parameters
    do not change?

    Reviewed By: fclem, brecht

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

commit 42c99ec15b
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 16:37:44 2020 +0200

    BLI: rename rand.c to rand.cc

commit 580d50091c
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 15:40:27 2020 +0200

    Particles: Create a simulation state for every Particle Simulation node

    Every Particle Simulation node has a name (or a path when it is in a node group).
    This name has to be used in the Simulation modifier on a point cloud to see
    the particles.

    Caching has been disabled for now, because it was holding back development
    a bit. To reset the simulation, go back to frame 1.

    Currently, there is no way to influence the simulation. There are just some
    randomly moving points. Changing that is the next step.

commit 31ad43a3c7
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 15:29:25 2020 +0200

    Blenloader: make BLO_read_data_address work in C++

commit 544c435fdd
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 12:20:07 2020 +0200

    Fix T78745: Cycles error baking with multiple materials

commit 8ddf7556a5
Author: Bastien Montagne <bastien@blender.org>
Date:   Thu Jul 9 11:44:11 2020 +0200

    Fix T78718: Crash when deleting particle system modifier with the X Shortcut.

    Duplication and deletion code of modifiers was totally wrong for
    particle system, that special weird thing needs its own custom
    management.

    Note that for now I chose not to duplicate the particle settings ID when
    duplicating the modifier...

commit ea5fe7abc1
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 17:29:17 2020 +1000

    UV: path selection support

    This adds support for path selection for vertex edge & face selection
    modes, matching mesh editing behavior, useful with the UV rip tool.

    Region select & edge tagging are currently not supported,
    although they could be added eventually.

commit 0b8221683f
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 9 18:23:16 2020 +1000

    BMesh: add utility functions

    - BM_edge_uv_share_vert_check
    - BM_face_uv_calc_center_median_weighted
    - BM_loop_at_index_find

commit 0b3bf69d3c
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 9 13:33:15 2020 +1000

    Cleanup: move BMesh UV queries into their own file

commit 754c5d6a14
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 9 13:29:48 2020 +1000

    Cleanup: clang-format

commit 31bc76ea4e
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 22:29:10 2020 +0200

    Cleanup: remove unnecessary calls to as_span

    This uses the new implicit conversions and constructors
    that have been committed in the previous commit.

    I tested these changes on Linux with gcc and on Windows.

commit 403384998a
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 22:27:25 2020 +0200

    BLI: improve constructors and conversions to span

    This allows us to avoid many calls to `as_span()` methods. I will
    remove those in the next commit. Furthermore, constructors
    of Vector and Array can convert from one type to another now.

    I tested these changes on Linux with gcc and on Windows.

commit 4b85ed819d
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 20:41:00 2020 +0200

    Cleanup: remove unused function

    This is not necessary in C++17 anymore.

commit f7d5d4ee3b
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 20:39:12 2020 +0200

    Cleanup: use c++17 helper variable templates

commit e4926c167b
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 8 18:08:08 2020 +0200

    Fix T78718: Crash when deleting particle system modifier with the X Shortcut.

    Again those backward pointers not properly flagged in RNA, hence
    generating infinite loops.

commit f4a39cafa1
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 17:05:40 2020 +0200

    Functions: add AttributesRef class

    This is the same as MutableAttributesRef, but the data in it cannot be changed.

commit 439c238bb4
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 17:04:50 2020 +0200

    Cleanup: use different internal socket name

commit 05365d1376
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 17:04:09 2020 +0200

    Functions: support hashing MFDataType and CPPType

commit 2de5de57c5
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Wed Jul 8 15:03:06 2020 +0200

    Build: fix stack linker warning with ffmpeg on macOS

    The ff_cfhd_init_vlcs() function was using a lot of stack space, which
    made linker on macOS unhappy. Using heap allocation allows to silence
    the warning without causing other side-effects.

    Kept the patch enabled for all platforms to avoid difference in behavior
    and performance on different platforms, which could make certain types
    of investigation very tricky.

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

commit cb3c4218bf
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 8 15:43:57 2020 +0200

    Minor cleanup in rna override code.

commit d1f4546a59
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:10:24 2020 +0200

    Functions: implement common subnetwork elimination optimization

    This was the last of the three network optimizations I developed in
    the functions branch. Common subnetwork elimination and constant
    folding together can get rid of most unnecessary nodes.

commit e3e42c00cb
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:06:32 2020 +0200

    Functions: Support getting MFSocket based on its id

commit 2b9d62b73a
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:06:04 2020 +0200

    Functions: Support accessing socket index of MFSocket

commit 34d175f372
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:04:28 2020 +0200

    Functions: initial hash/equals implementation for constant multi-functions

commit 840941215d
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:02:47 2020 +0200

    Functions: allow multi-functions to override a hash and equals function

commit 36a547af7b
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:01:33 2020 +0200

    Cleanup: add correct license header to tests

commit ff133bbd33
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 14:57:31 2020 +0200

    BLI: add disjoint set data structure

    This can be used to find separate islands in meshes efficiently (as is
    done in cycles already). Furthermore, this helps to implement some
    algorithms on node trees more efficiently.

commit a8ff8b64dc
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 14:40:34 2020 +0200

    BLI: add comparison operators and hash functions for float3, etc.

commit ff444da7c4
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 2 12:28:57 2020 +0200

    macOS: upgrade minimum required version to 10.13 High Sierra

    C++17 does not work on 10.12, and Apple extended support ended for 10.12 in
    October 2019.

    Maniphest Tasks: T76783, T76184

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

commit 6435acd8f6
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Wed Jul 8 12:57:59 2020 +0200

    Cycles: support shader transparency for holdout objects

    Now transparent areas of the object will render objects behind.

    Fixes T78728.

commit 643196cc37
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Wed Jul 8 11:04:49 2020 +0200

    CMake: Fix spelling of Embree passed to find package

    The spelling and capitalization of package name passed to find_package()
    and find_package_handle_standard_args() needs to match.

    Silences CMake warning about mismatch.

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

commit 45004d82e0
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 11:18:43 2020 +0200

    Functions: add dead node removal and constant folding optimization

    Those optimizations work on the multi-function network level.
    Not only will they make the network evaluation faster, but they also
    simplify the network a lot. That makes it easier to understand the
    exported dot graph.

commit 50d7c00d9c
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 10:16:56 2020 +0200

    Cleanup: fix comment

commit 01c8aa12a1
Author: Alexander Gavrilov <angavrilov@gmail.com>
Date:   Wed Jul 1 17:38:07 2020 +0300

    Apply Modifier: support applying as shape key and keeping the modifier.

    This can be useful to save the result of a cloth simulation as a
    shape key without destroying the simulation, so it's possible to
    e.g. re-run it to get other shapes, or simply use the new shape
    key to start the simulation already in a draped state.

    It also makes sense to allow applying as shape key even when the
    mesh is shared, because the operation itself just adds a shape
    key. To support this, split the apply operator into Apply and
    Apply As Shapekey so that they can have different poll callbacks.

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

commit 7fcb6bc59c
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Wed Jul 8 02:10:02 2020 +0200

    Fix T78324: Different Sky Texture results between CPU and GPU

    The problem here was numerical precision: The code calculates the angle between
    sun and view direction, and the usual acos(dot(a, b)) approach for that has
    poor numerical performance for almost parallel angles.

    As a result, the generally tiny difference between floating point computation
    between CPU and GPU was enough to make the sun vanish at different radii,
    causing different results.

    The new version fixes the difference by making the computation much more robust
    on both platforms.

commit afcb41a0aa
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 20:32:40 2020 +0200

    BLI: simplify copy constructor of Array

commit eb5fb1741d
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 20:29:35 2020 +0200

    Cleanup: don't end description with a '.'

commit 8713109212
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 20:27:34 2020 +0200

    Cleanup: fix typo

commit 902ee4d13c
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 19:46:10 2020 +0200

    Functions: cleanup loop that traverses the MFNetwork

commit 22158162ef
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 19:34:35 2020 +0200

    Functions: add generic functions that output constants

commit f4633cf46c
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 19:16:31 2020 +0200

    BLI: simplify copy constructor of vector

commit 67042aa6a1
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:45:34 2020 +0200

    Functions: extend multi-function network api

commit adfae89f96
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:40:42 2020 +0200

    BLI: provide access to underlying node in dot exporter

commit a8627ea66d
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:39:24 2020 +0200

    Functions: Add debug print and destruct callback to CPPType

commit 4990e4dd01
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:23:33 2020 +0200

    Nodes: Generate multi-function network from node tree

    This adds new callbacks to `bNodeSocketType` and `bNodeType`.
    Those are used to generate a multi-function network from a node
    tree. Later, this network is evaluated on e.g. particle data.

    Reviewers: brecht

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

commit ff97545c50
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Tue Jul 7 18:37:35 2020 +0200

    Fix T75943 EEVEE: Cubemaps shows black

    Caused by faulty driver implementation. Force fallback method.

commit 1e2ff4f81b
Author: Hans Goudey <h.goudey@me.com>
Date:   Tue Jul 7 11:10:42 2020 -0400

    Cleanup: Add braces for clang tidy

commit 0edf2fc128
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 16:51:03 2020 +0200

    BLI: Correct spin lock definition

    The MSVC atomic function is defined for an unsigned type.

    Not sure why this became an issue after switch to TBB by default,
    maybe some CFLAGS changed to be more strict after that.

commit dad3de89dc
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Tue Jul 7 11:27:09 2020 -0300

    Fix: remove accidental code

    `v1` and `v2` are already set.

commit d352902758
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 11:16:31 2020 +0200

    Make deps: Use own nasm for ffmpeg and x264

    Fixes the warning: building for macOS, but linking in object file

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

commit 1e3c0b4b03
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 10:47:09 2020 +0200

    Make deps: Compile own version of nasm for Apple

    The upstream version of nasm does not put version information to the
    generated object files, which makes linker to show the following
    warning:

      building for macOS, but linking in object file

    Using own patched version of nasm which puts required information to
    the object file, making linker happy.

    The plan is to either streamline the patch and provide it to the
    upstream, or, it that takes too long, get an independent fix from the
    upstream.

commit 202e7ccaae
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 6 14:33:59 2020 +0200

    Fix T77455: Blender Freezes when using the 3d Scale Gizmo

    Issue is reported on Linux ith Intel HD6xx iGPU. Inside
    `gpu_select_sample_query.c` the call to `glGetQueryObjectuiv` froze. After
    bisecting this lead to the polyline shader. When using a 3d color shader
    in stead of the polyline shader during selection seems to fix the issue.

    Other parts of blender might also be effective, but I wasn't able to
    freeze blender in these areas. When it does, we might want to add
    a similar work-around to button2d, cage2d, cage3d & move3d, navigate.

    Backport this patch to 2.83.

    Reviewed By: Clément Foucault

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

commit d1dcd2b464
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 16:17:36 2020 +0200

    BLI: Fix mistake in SpinLock TBB migration

    Copy-paste mistake.

commit 20558848d3
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Tue Jul 7 09:45:53 2020 -0300

    Optimization: use `BLI_bvhtree_intersect_plane` to detect faces that will be affected by the knife tool

    The knife code currently calls the `BLI_bvhtree_overlap` function that
    tests the overlap between the mesh tree and an AABB that encompasses the
    points projected in the clip_start, clip_end and or clip_planes of the
    view.

    This resulted in many false positives since the AABB is very large.
    Often all the triangles "overlapped".

    The solution was to create a new function that actually tests the
    intersection of AABB with a plane.

    Even not considering the clip_planes of the view, this solution is more
    appropriate than using overlap.

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

commit 630c6226e2
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Tue Jul 7 16:26:01 2020 +0200

    Fix T78307 UI: Drawing artifacts in the Blender UI on macOS

    This was due to a bad driver which was not respecting this bit of the
    specification:

    `If the current primitive does not originate from an instanced draw command, the value of gl_InstanceID is zero.`

commit 737bd549b6
Author: Patrick Mours <pmours@nvidia.com>
Date:   Mon Jul 6 12:25:54 2020 +0200

    Cycles: Add support for native OptiX curve primitive

    This patch adds support for the curve primitive from OptiX to Cycles. It's currently hidden
    behind a debug option, since there can be some slight rendering differences still (because no
    backface culling is performed and something seems off with endcaps). The curve primitive
    was added with the OptiX 7.1 SDK and requires a r450 driver or newer, so this also updates
    the codebase to be able to build with the new SDK.

    Reviewed By: brecht

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

commit 95f0f31279
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Tue Jul 7 14:45:31 2020 +0200

    Fix T78692: improve UI regarding the effect of the denoiser on denoising passes

    It wasn't obvious that the choice of Cycles denoiser also generates different
    denoising data passes for compositing.

commit a394aac8b4
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Tue Jul 7 14:47:59 2020 +0200

    Fix T78666: Cycles non-uniformly scaled hair renders wrong for static objects

    Don't apply the matrix transform optimization in this case, curve points and
    radius can't represent non-uniform scale the way is possible with triangle
    meshes and vertices.

    This would cause abrupt change if objects had e.g. motion blur in one frame
    and not in the next.

commit 98bee41c8a
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Tue Jul 7 14:30:55 2020 +0200

    IO: Reversed persistent ID order in exports to Alembic and USD

    Each duplicated (a.k.a. instanced) object has a Persistent ID, which
    identifies a dupli within the context of its duplicator. This ID
    consists of several numbers when there are nested duplis (for example a
    mesh instancing empties on its vertices, where each empty instances a
    collection). When exporting to Alembic/USD, these are used to uniquely
    name the duplicated objects in the export.

    This commit reverses the order of the persistent ID numbers, so that the
    first number identifies the first level of recursion. This produces
    trees like this:

        ABC
         `--Triangle
             |--Triangle
             |--Empty-1
             |    `--Pole-1-0
             |        |--Pole
             |        `--Block-1-1
             |            `--Block
             |--Empty
             |    `--Pole-0
             |        |--Pole
             |        `--Block-1
             |            `--Block
             |--Empty-2
             |    `--Pole-2-0
             |        |--Pole
             |        `--Block-2-1
             |            `--Block
             `--Empty-0
                 `--Pole-0-0
                     |--Pole
                     `--Block-0-1
                         `--Block

    It is now clearer that `Pole-2-0` and `Block-2-1` are instanced by
    `Empty-2`. Before this commit, they would have been named `Pole-0-2` and
    `Block-1-2`.

commit 70b1c09d7a
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Tue Jul 7 12:45:30 2020 +0200

    IO: Fix bug exporting dupli parent/child relations

    Exporting a scene to USD or Alembic would fail when there are multiple
    duplicates of parent & child objects, duplicated by the same object. For
    example, this happens when such a hierarchy of objects is contained in a
    collection, and that collection is instanced multiple times by mesh
    vertices. The problem here is that the 'parent' pointer of each
    duplicated object points to the real parent; Blender would not figure
    out properly which duplicated parent should be used.

    This is now resolved by keeping track of the persistent ID of each
    duplicated instance, which makes it possible to reconstruct the
    parent-child relations of duplicated objects. This does use up some
    memory for each dupli, so it could be heavy to export a Spring scene
    (with all the pebbles and leaves), but it's only a small addition on top
    of the USD/Alembic writer objects that have to be created anyway. At
    least with this patch, they're created correctly.

    Code-wise, the following changes are made:

    - The export graph (that maps export parent to its export children) used
      to have as its key (Object, Duplicator). This is insufficient to
      correctly distinguish between multiple duplis of the same object by
      the same duplicator, so this is now extended to (Object, Duplicator,
      Persistent ID). To make this possible, new classes `ObjectIdentifier`
      and `PersistentID` are introduced.
    - Finding the parent of a duplicated object is done via its persistent
      ID. In Python notation, the code first tries to find the parent
      instance where `child_persistent_id[1:] == parent_persistent_id[1:]`.
      If that fails, the dupli with persistent ID `child_persistent_id[1:]`
      is used as parent.

    Reviewed By: sergey

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

commit f2175e06a7
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 12:43:18 2020 +0200

    Mae deps: Ensure Brotli is disabled for FreeType

    We don't need it and it was optionally enabled, causing Blender to fail
    to link on certain configuration (when Brotli is installed via Homebrew
    for example).

commit 02cd159539
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 12:31:10 2020 +0200

    Cleanup: add comment explaining operator delete

commit cc311e4a52
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Tue Jun 30 15:13:54 2020 +0200

    IO: print export name instead of object name in debug export graph output

    This is just a change in `AbstractHierarchyIterator::debug_print_export_graph()`
    to aid in debugging. It'll make it possible to distinguish between
    different duplicates of the same object.

    No functional changes to Blender itself.

commit 5761cb9ee2
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 11:52:45 2020 +0200

    Guarded Allocator: add missing operator delete

    This resolves warning C4291 on windows.

commit 80fe5e1b15
Author: Johan Walles <walles>
Date:   Tue Jul 7 11:09:31 2020 +0200

    UI: Add units to motion tracking solve errors

    The unit being "pixels".

    Before this change the solve errors were unitless in the UI.

    With this change in place, the UI is now clear on that the unit of the
    reprojection errors is pixels (px).

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

commit 6d9a6f12b3
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 10:06:14 2020 +0200

    Make deps: Fix compilation error of Python on macOS

    The configuration was confused about gettext installed via Homebrew
    and isysroot passed to Python's compilation but not to test programs.

    After this change `import gettext` still works, but it is unclear how
    to test it further,

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

commit 955abbeff2
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 09:01:01 2020 +0200

    Fix sign conversion error

commit e233ee1c1f
Author: Philipp Oeser <info@graphics-engineer.com>
Date:   Thu Jun 25 14:37:22 2020 +0200

    Fix T78186: Dyntopo panel error with tools that dont have a brush

    Maniphest Tasks: T78186

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

commit 19d4e265b6
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 10:35:28 2020 +0200

    Cleanup: remove redundant comments

    Searching in these files for "_as" will reveal a comment at the
    top, that explains what these methods are for. There is no need
    to duplicate that knowledge all over the place.

commit 6e609f0eb0
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 17:50:33 2020 +1000

    Cleanup: use doxy comments

commit 62774baded
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 16:06:05 2020 +1000

    UI: add merge/split menus

    This makes the menus and keymap match the edit-mesh
    (M for merge, Alt-M for split).

commit d212b3dc43
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Mon Jul 6 15:28:19 2020 +0200

    Make deps: Fixes for macOS platform

    Set of fixes which had to be made in order to have dependencies built
    on own laptop:

    - Require bison as a dependent software. It is required by ISPC.

      On macOS it is required to be installed via Homebrew. This is because
      Bison from Xcode toolchain is too old.

    - Made sure Boost is compiled using clang.

      Without this gcc was used, and some unsupported command line argument
      was passed to it.

    - Modify OGG in a way which does in fact pull fixed sized types.
      They are defined in stdint.h.

      Without this fix FFmpeg will not detect presence of OGG because the
      test program fails to compile.

    - Force disable zstd compression and make wepb optional for the TIFF
      library. Without this TIFF might pick up development libraries from
      Homebrew.

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

commit b28683b8b5
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 16:03:26 2020 +1000

    Cleanup: remove unused arguments

commit 0c58970da7
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 12:44:47 2020 +1000

    Cleanup: spelling

commit ad0edc626d
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 12:43:45 2020 +1000

    Cleanup: unused World struct members linfac, logfac

commit e20171e59f
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 16:39:28 2020 -0400

    Fix build error with tests for removed functions

    These GHash functions were removed in 12817083ec,
    so the tests should be removed too.

commit d557f05502
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 16:07:54 2020 -0400

    Cleanup: Use bool instead of int

commit 053e0c0af3
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 15:35:21 2020 -0400

    UI: Add shortcuts for shader effect panels

    Only the delete shortcut applies here, although the move up and down
    operators can optionally be assigned in the keymap.

    See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the
    grease pencil modifier panel implementation, which is the same.

commit 12817083ec
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 6 14:44:30 2020 -0300

    Cleanup: Use the BLI_edgehash API in the sewing simulation of cloths

    Also remove the code in the ghash that is no longer used.

    This change simplifies the existing code.

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

commit a856de700b
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 13:17:07 2020 -0400

    Fix T77730: ShaderFx Missing Update Notifier

    This adds a notification type for shaderfx so the properties editor can
    be properly notified to redraw.

    Another possible solution would be to also redraw the shaderfx tab
     with a ND_MODIFIER update, but this solution allows us to avoid
     some unecessary redraws too. There were no existing cases of
    ND_OBJECT | NC_MODIFIER updates, so those cases were
    removed from buttons_area_listener.

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

commit f6f4043924
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 17:59:04 2020 +0200

    BLI: add methods to lookup a stored key in a set

commit 1562c9f031
Author: Patrick Mours <pmours@nvidia.com>
Date:   Mon Jul 6 17:32:32 2020 +0200

    Fix OptiX viewport denoising not working when rendering scene (without OptiX) that uses unsupported features

    Denoising devices do not need to load the full feature set of kernels, so only activate the denoising
    feature for them (so that it is possible to use features that are supported by the render devices, but
    not the denoising devices).

commit aabfd2fb9b
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 6 16:55:00 2020 +0200

    Cleanup: readfile: remove old deprecated OldNewMap for runtime caches.

commit ee3eba902a
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 6 16:21:41 2020 +0200

    Runtime cache preservation during undo: add support for nodes and embedded IDs.

commit bfc644dcfb
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Mon Jul 6 16:52:28 2020 +0200

    Reduce `DupliObject::persistent_id` from 16 to 8 items

    For historical reasons, `DupliObject::persistent_id` was of size
    `2*MAX_DUPLI_RECUR`. These reasons are now gone, and the persistent ID
    always gets exactly one array element for every dupli-recursion.

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

    Reviewed by: brecht

commit 0b07f9b717
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 6 15:07:12 2020 +0200

    Fix T78608: Memory leak in Material properties: "Data from SCE".

    Caused by recent own refactor of cache presevation handling in readfile,
    EEVEE's lightcache are weird birds that can also be saved in .blend
    files, need a special handling for those 'persistent' caches...

commit 99feb10b8b
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 23:01:36 2020 +1000

    Cleanup: warning, spelling

commit 20446f07f6
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 22:52:29 2020 +1000

    Docs: reference bl_rna_get_subclass_py instead of bl_rna_get_subclass

    bl_rna_get_subclass only works for Nodes at the moment.

commit ffaf294c3f
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Mon Jul 6 14:53:39 2020 +0200

    Fix alignment/size issue on ARM/RPi architecture

    Addresses 964305 from Debian bug tracker.

commit 924578ce19
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 6 09:49:00 2020 -0300

    Optimization: Don't compute the snap to face on the knife tool twice

    Both `knife_find_closest_vert` and `knife_find_closest_edge` call
    `knife_find_closest_face`. Thus, running the raycast twice and setting
    values like `kcd->curr.bmface` and `kcd->curr.is_space` repeatedly.

    So:
    - separate `knife_find_closest_face` from `knife_find_closest_vert` and `knife_find_closest_edge`.
    - rename `knife_find_closest_vert` to `knife_find_closest_vert_of_face`
    - rename `knife_find_closest_edge `to `knife_find_closest_edge_of_face`.
    - do not set parameters previously set.

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

commit 073c426900
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 6 09:03:33 2020 -0300

    Fix faces disappearing when AutoMerge & Split

commit c632cf9ccd
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 21:23:35 2020 +1000

    Fix UV select separate not refreshing the display

commit 2c0cab03ca
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 21:14:12 2020 +1000

    UV: add rip region to toolbar

commit dbe171fb26
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 21:03:45 2020 +1000

    Cleanup: spelling, comments

commit 18b6c49a90
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 12:37:11 2020 +0200

    Cleanup: rename namespace TimeIt to timeit

    According to our style guide, namespaces should have
    lower case names.

commit 572c48cf98
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 09:08:53 2020 +0200

    BLI: improve exception safety of memory utils

    Even if we do not use exception in many places in Blender, our core C++ library
    should become exception safe. Otherwise, we don't even have the option
    to work with exceptions if we decide to do so.

commit 703a73fa84
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 10:56:26 2020 +0200

    BLI: refactor how buffers for small object optimization are stored

    Previously, there was an error when operator-> was returning an
    invalid type. See error C2839.

commit 80393a0eba
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:41:36 2020 +1000

    UV: add rip tool

    New rip tool matching edit-mesh rip functionality.

    Useful as disconnecting UV's, especially for loops is inconvenient
    without this.

    This uses 'V' to rip, changing stitch to 'Alt-V'.

commit 9353477383
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:41:17 2020 +1000

    BMesh: add BM_face_calc_uv_cross

commit b51b893df8
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:40:55 2020 +1000

    BMesh: add BM_loop_other_vert_loop_by_edge

commit 705015e0a4
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 6 10:21:14 2020 +0200

    Fix T78481: Workbench Shadow effects XRay

    When in XRay some effects (shadow, cavity & depth of field) aren't supported.
    This patch makes sure that these effects aren't enabled.

commit 4f3045999d
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:35:41 2020 +1000

    Cleanup: warnings, spelling

commit 0f617cd67e
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 6 07:45:10 2020 +0200

    GPU: Remove local shaders workaround for Intel/Windows

    It has been tested that local shaders workaround isn't needed for the
    latest Windows/Intel 6xx GPU's.

    Currently the local shaders workaround doesn't work anymore during the
    investigation it was detected that the intel drivers didn't need it
    anymore.

    Local shaders should still be fixed as it is also used for some legacy
    iGPU's. The current work around crashes when doing preview renders in
    EEVEE as the default materials aren't available but for the work around
    they should. (See T77346 for more information)

commit baf124c753
Author: Aaron Carlisle <carlisle.b3d@gmail.com>
Date:   Sun Jul 5 16:45:56 2020 -0400

    RNA Manual Reference: Update links

commit 247a28f242
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 5 15:08:26 2020 +0200

    Revert "BLI: refactor how buffers for small object optimization are stored"

    This reverts commit 5d79f9f276.

    This was introducing build errors in windows. Need a bit more time to check it.

commit 5d79f9f276
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 5 16:30:26 2020 +0200

    BLI: refactor how buffers for small object optimization are stored

commit 464aaf2701
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 4 17:31:02 2020 +0200

    Fix T78603: GPencil Noise modifier Vertex Group influence filter missing

    This was removed by error during the last refactor of modiifers.

commit 169bb4b9ce
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 4 17:28:05 2020 +0200

    BLI: fix mistake in move constructor of Stack

commit 8e97694c8a
Author: Julian Eisel <julian@blender.org>
Date:   Sat Jul 4 17:06:57 2020 +0200

    Fix T78588: Material preview not visible in selection list

    Logic to determine if the library icon should be used was too general.

commit 9168ea8aab
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 4 11:15:11 2020 +0200

    Cleanup: Fix small typo error

commit 17603816f2
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 4 11:04:21 2020 +0200

    GPencil: Cleanup some comments typo

commit b0da78084b
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Sat Jul 4 01:27:12 2020 +0200

    UI: Attempt to fix OSX widget shader issue

    Some OSX GL driver implementation needs a dummy vbo read. This fixed issues
    with the Hair shaders in the past.

    Related to T78307

commit cad98923d0
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Sat Jul 4 01:02:54 2020 +0200

    Cleanup: spelling

commit ea65c6a153
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Sat Jul 4 00:59:09 2020 +0200

    Fix T78433: Adding Fade Generates Python Exception

    This was caused by typo in rB67a822e08684.

commit 4bf56b37ca
Author: Nathan Craddock <nzcraddock@gmail.com>
Date:   Fri Jul 3 13:31:42 2020 -0600

    Cleanup: Use C-style comments in outliner files

    No functional changes. Convert all C++ style comments to C comments.
    Also capitalize and add full stops.

    The comments themselves were not cleaned up. Some could be removed or
    reworded.

commit 59ef43147e
Author: Nathan Craddock <nzcraddock@gmail.com>
Date:   Fri Jul 3 12:48:00 2020 -0600

    Cleanup: Remove unused outliner activation code

    No functional changes. Remove commented calls to extern_set_butspace
    and unused text activation code.

commit 57a48bd0ca
Author: Nathan Craddock <nzcraddock@gmail.com>
Date:   Fri Jul 3 12:36:09 2020 -0600

    Cleanup: Use _fn suffix for outliner button callbacks

    No functional changes. Use _fn instead of _cb.

commit d7dbf90a02
Author: Sebastian Parborg <darkdefende@gmail.com>
Date:   Fri Jul 3 21:22:41 2020 +0200

    Clang-tidy: Enable braces-around-statements warning

commit 185fe9cd8b
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 3 18:55:32 2020 +0200

    Cleanup: compiler warning

commit 46fcc12e83
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 3 18:54:04 2020 +0200

    Fix error in new Hair data type file reading

commit d2db481dc7
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 18:04:40 2020 +0200

    Cleanup: Blendkernel, Clang-Tidy else-after-return fixes (incomplete)

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/blenkernel` module. Not all warnings are
    addressed in this commit.

    No functional changes.

commit a21cb22f8b
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 11:58:43 2020 -0400

    Cleanup: Deduplicate code for finding context object

    Instead of manually checking the pinned object, use the existing
    ED_object_active_context function. This requires adding const
    to the context in that function.

commit 33a74941c5
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:30:31 2020 +0200

    Cleanup: Editors, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors` module.

    No functional changes.

commit 367034f210
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:30:09 2020 +0200

    Cleanup: Editors/Space/UV-Edit, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/uv_edit` module.

    No functional changes.

commit 651d1aa7c8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:25:04 2020 +0200

    Cleanup: Editors/Transform, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/transform` module.

    No functional changes.

commit 35ce16939c
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:58 2020 +0200

    Cleanup: Editors/Space/sequencer, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_sequencer` module.

    No functional changes.

commit a201020cd3
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:41 2020 +0200

    Cleanup: Editors/Space/Clip, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_clip` module.

    No functional changes.

commit f254f66587
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:22 2020 +0200

    Cleanup: Editors/Space/Outliner, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_outliner` module.

    No functional changes.

commit 3aa53b361d
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:08 2020 +0200

    Cleanup: Editors/Space/Node, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_node` module.

    No functional changes.

commit bf532b1106
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:19:13 2020 +0200

    Cleanup: Editors/Space/Text, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_text` module.

    No functional changes.

commit 2f6fc5a7e8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:18:56 2020 +0200

    Cleanup: Editors/Space/View3D, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_view3d` module.

    No functional changes.

commit b61ecb785c
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 16:34:57 2020 +0200

    Cleanup: Explicit return in each `else if` block in `buttons_context()`

    This is a similar change as in rB4283da83cc9.

    No functional changes.

commit f43fedd400
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 17:35:31 2020 +0200

    Cleanup: remove side effect in assertion

commit 4a48939f04
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 11:18:24 2020 -0400

    UI: Fix bevel modifier not showing vertex group

commit cad2d32be6
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 17:09:24 2020 +0200

    Clang-Tidy: Enable bugprone-misplaced-widening-cast

commit 4a5389816b
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 17:07:01 2020 +0200

    Clang-Tidy: enable readability-named-parameter

commit fac2e63bc0
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 16:57:55 2020 +0200

    Fix utterly broken code regarding GPUtextures of MovieClip in readfile.c

    Treat those as pure runtime code, reset to NULL by reading code, for
    now.

    Think those could be handled like Image gputextures (i.e. considered
    runtime cache and preserved across undo steps), but probably not
    critical for now.

commit 1bdabd7b4f
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 16:55:13 2020 +0200

    Move MovieClip to new undo cache management system.

commit 1019c9f582
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 16:54:08 2020 +0200

    Clang-Tidy: enable bugprone-too-small-loop-variable

commit 883f9dd6e5
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 16:48:04 2020 +0200

    Clang-Tidy: enable bugprone-assert-side-effect

    Looks like we have no assertions with side effects.

commit 9739fc4d1b
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 16:44:46 2020 +0200

    Clang-Tidy: More fixed of redundant check before delete

    For some reason got unnoticed in the original cleanup pass.

commit 14fd91e7e8
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 16:38:01 2020 +0200

    Clang-Tidy: enable bugprone-argument-comment

    It was called `inverted` in the header.

commit f4fdb8efc5
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:38:49 2020 -0400

    Cleanup: Remove redundant logic

commit f66aafa391
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:37:58 2020 -0400

    Fix memory leak when dragging shaderfx

commit f891d4e2ad
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 16:32:12 2020 +0200

    Clang-Tidy: Fix readability-delete-null-pointer warnings

    Also enable it in the configuration.

commit 53d41e1a6f
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:28:13 2020 -0400

    UI: Use sliders and [0, 1] ranges in ocean modifier

    The ocean modifier has two properties that use a [0, 10] hard min and
    hard max. The values act as factors though, so it makes more sense to
    use sliders and a 0 to 1 range.

    This commit also bumps the file subversion to avoid repeatedly applying
    the change to the properties' range.

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

commit 2a39b34a09
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 16:09:51 2020 +0200

    Cleanup: Editors/Sculpt/Paint, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/sculpt_paint` module.

    No functional changes.

commit fd5b093f84
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 16:01:15 2020 +0200

    Cleanup: Editors/Screen, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/screen` module.

    No functional changes.

commit 4283da83cc
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 15:59:48 2020 +0200

    Cleanup: Explicit return in each `else if` block in `ed_screen_context()`

    The `ed_screen_context()` function is approximately 700 lines long, and
    its main structure is a huge chain of `else if` statements. Some of the
    bodies did not return, but rather fell through and relied on the `return
    -1;` at the bottom of the function. This means that in order to truly
    understand what is going on in one of those `else if` blocks, it could
    be required to scroll past all the following `else if` blocks,
    double-checking that they all had an `else`, and then see what happens
    below.

    By adding explicit `return -1;` everywhere this happened, this is all
    avoided, increasing local understandability of the code. Furthermore, it
    makes the upcoming cleanup with the Clang-Tidy rule
    `readability-else-after-return` a lot easier to do.

    No functional changes.

commit de7c9f41e6
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 15:42:22 2020 +0200

    Cleanup: Editors/Object, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/object` module.

    No functional changes.

commit 19483125f8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 15:19:52 2020 +0200

    Cleanup: Editors/Mesh, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/mesh` module.

    No functional changes.

commit 7d0a0b8a6d
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 14:52:32 2020 +0200

    Cleanup: Editors/Armature, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/armature` module.

    No functional changes.

commit f82e52ebc8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 14:51:19 2020 +0200

    Cleanup: Editors/Animation, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/animation` module.

    No functional changes.

commit 17ba566018
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Fri Jul 3 02:15:54 2020 +0200

    Fix Pose Brush crashing after disabling connected only in FK mode

    This function was returning the ik_chain before disabling the
    fake_neighbors, so when the brush was used again with fake neighbors
    disabled after rebuilding the PBVH and free them, they were still
    enabled in the SculptSession, causing a the crash.

    Reviewed By: sergey

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

commit 3a59c184b9
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 16:09:58 2020 +0200

    Move Scene's cache management during undo to new system.

commit a33756d783
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:09:19 2020 -0400

    Cleanup: Unused variables in non-debug build

commit 6a58e15548
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:03:16 2020 -0400

    Cleanup: Remove obsolete code in interface_panel.c

    Some code delt with panel merging in earlier versions of Blender,
    which is no longer needed. Other code delt with controls that aren't
    used anymore, and in some cases have region-level equivalents.

    There's a surprising amount of this unused code in this file, so removing it
    will be helpful for the future.

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

commit 88d358902f
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 15:54:55 2020 +0200

    Clang-Tidy: Enable readability-redundant-string-cstr

commit 405e6c6cc9
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Fri Jul 3 15:53:44 2020 +0200

    Fix T78555: GPencil bake animation operator loose frame setting

    The values were reset for each run

commit 19ff145e66
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 09:41:55 2020 -0400

    Clang-Tidy: Enable readability-redundant-control-flow

commit ffef562bf7
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 15:31:23 2020 +0200

    Disable clang-tidy for code-generated RNA files

    This needs some extra care, which is probably easier once the initial
    pass over integration is done.

commit c9975088a9
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 15:27:12 2020 +0200

    Move volume to new cache management system for undo.

commit 1e255ce031
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 15:27:02 2020 +0200

    Fix T72214: Fluids: noise does not work with negative frame numbers

    The issue is duplicated code. There are two functions that zero-fill
    the frame number. They worked the same for positive frames numbers, but
    behaved differently for negative ones.

    On frame `-100`, `BLI_path_frame` outputs `-0100` and
    `fluid_cache_get_framenr_formatted_$ID$` outputted `-100`.

    I changed the behavior of the latter, because we depend on the behavior
    of the former for much longer already.

    Reviewers: sebbas

    Differential Revision: https://developer.blender.org/D8107
2020-07-17 21:40:09 -04:00
cd9b38005e Performance tuning: early rejection of trivial intersections.
Starting to use floating filters to avoid expensive gmp operations
when possible. These changes speed up the sphere-sphere test with
n=64 to 5s (now 17 times slower than BMesh on this test, down from
100 times slower. But answer is correct.
Also make format.
2020-07-16 22:23:18 -04:00
7148f31a3a Reverse the operand order for Difference to match old boolean. 2020-07-14 20:49:03 -04:00
8541b335cb Hooked up new boolean to boolean modifier. 2020-07-14 20:29:39 -04:00
f86b49d710 Comment out an assert prevents running profiler on Mac.
Not sure why this assert is not known to the compiler used
when profiling.
2020-07-14 17:16:07 -04:00
ad81b1993e Speedup, using BVH tree to limit number of tri-tri intersect tests.
Intersection of my spheresphere test with n=16 (two uvspheres
with 16 rings and 32 segments overlapping), time went from
12.8 seconds to 2.3 seconds on my Mac. The n=32 test went from
195.1s to 8.9s.
2020-07-14 08:01:50 -04:00
b10b38d386 Add a mesh intersect sphere-sphere test for performance tuning. 2020-07-13 07:24:43 -04:00
0024605194 Fix a test that needs a new kind of initializer. 2020-07-12 21:45:53 -04:00
a6c80378aa Merge Master, then fixes of problems caused by that.
commit 622aa7bc5015cc3b85deb0eb13b7b315169569b4
Author: Howard Trickey <howard.trickey@gmail.com>
Date:   Sun Jul 12 21:09:59 2020 -0400

    Provided noexcept move contructors for many types.

    Needed because now a static assert trips when making Arrays
    or Vectors of these types.

commit 7a7dd53bca36506fb51788cad0444dcb491b3c13
Merge: 74c56382b8 f319eec881
Author: Howard Trickey <howard.trickey@gmail.com>
Date:   Sun Jul 12 19:22:24 2020 -0400

    Merge branch 'master' into boolmerge

commit f319eec881
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 11:05:43 2020 +0200

    Cleanup: disable debug code

commit 30ed51d60a
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:50:19 2020 +0200

    Cleanup: unused debug variable

commit 21b20ae5ec
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:38:57 2020 +0200

    Particles: initial support for forces in simulation node trees

    The force node can now be used to control the behavior of particles.
    Forces can access particles attributes. Currently, there are three attributes:
    `Position` (vector), `Velocity` (vector) and `ID` (integer).

    Supported nodes are: Math, Vector Math, Separate Vector, Combine Vector and Value.

    Next, I'll have to split `simulation.cc` into multiple files and move
    some stuff out of blenkernel into another folder.

commit ebf9082e1c
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:38:30 2020 +0200

    Nodes: support more implicit conversions in simulation node tree

commit 838b1742fb
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 12:38:03 2020 +0200

    Functions: minor improvements

commit 404486e66c
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 12 10:01:37 2020 +0200

    Functions: minor api improvements

commit ee5c2f6ead
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 11 20:41:21 2020 +0200

    GPencil: Replace "ShaderFX" with "Shader Effects" in RNA prop text

commit c7eada103c
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 18:02:06 2020 +0200

    Nodes: support implicit conversions and incorrectly linked sockets

commit 06401157a6
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 17:59:43 2020 +0200

    Fix: incorrect attribute type in network

commit 46b79b3d4a
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:55:57 2020 +0200

    Nodes: support vector math node in simulation node tree

commit b920875893
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:47:53 2020 +0200

    Nodes: support math node in simulation node tree

commit 8fae58ce0b
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:39:17 2020 +0200

    Nodes: support Value node in simulation node tree

commit 16d4373158
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 11 16:24:53 2020 +0200

    Nodes: move Math, Vector Math and Value shader nodes to c++ files

    This required a little bit of refactoring, because we were using c-only
    syntax for the gpu shader names. All tests are still passing.

commit 415d3ee05b
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 22:03:27 2020 +1000

    UV: add path select operator that uses the selection

    Instead of using the mouse cursor position,
    this selects between existing selected elements.

    Access this since picking a selection path doesn't
    work from the menu.

commit 6e698653df
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 20:34:17 2020 +1000

    Cleanup: remove unused function

commit 651db1b26f
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 15:10:05 2020 +1000

    Cleanup: spelling

commit 020e0f11ff
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Sat Jul 11 14:50:47 2020 +1000

    Docs: remove reference to PYTHONHOME

    This is no longer used by default, when '--python-use-system-env' is set
    there are many Python environment variables, don't list them in
    Blender's help message.

commit d2b910fafe
Author: Aaron Carlisle <carlisle.b3d@gmail.com>
Date:   Fri Jul 10 16:07:31 2020 -0400

    UI: UV: Add Select Shortest Path to menu

    This matches the 3D Viewport

commit 3dc0178390
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 20:00:20 2020 +0200

    Fix T78662: Cycles baking fails if denoising is enabled, after recent changes

    This is not supported yet.

commit 6fbacd6048
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 19:56:53 2020 +0200

    Fix build error building without OpenImageDenoise

commit 48f10319c6
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 18:40:35 2020 +0200

    Fix T78801: Eevee missing setting to enable/disable freestyle per view layer

    This was only visible when Cycles was enabled.

commit 4e8fc15586
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 10 12:21:32 2020 -0400

    UI: Improve transform constraint layout

      - Remove the "mapping" subpanel and moves the source axis
        selection ot the destination subpanel.
      - Rename "Source" and "Destination" to "Map From" and "Map To" to
        make the action more clear
      - Gray out source axes when their data isn't selected.

      These changes were discussed in D8041.

commit 3e4f49fe71
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 18:02:51 2020 +0200

    Revert "Fix T78296: Performance - Use Binary Search for MDeformWeight"

    This reverts commit 39b525e0f0 and
    3121015dce as tests are failing.

commit d5208c45fa
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Fri Jul 10 17:56:05 2020 +0200

    GPencil: Fix unreported Use Falloff curve for active frame not working

    For the active frame it was using always a value of 1.0 and it was not using the curve.

commit 6eeb32706a
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 12:20:07 2020 +0200

    Cycles: support OpenImageDenoise in final renders

    Performance is not great currently due to the API not seeming to support
    efficient denoising of multiple tiles at the same time. So in many cases
    only one or a few threads will actually be denoising at the same time.

    In renders with many samples this is not a big problem, but for faster
    renders it's a signficant overhead.

    We should try to optimize this still, possibly by batching denoising of
    a bigger neighborhood of multiple tiles at once.

commit 93791381fe
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 20:01:22 2020 +0200

    Cleanup: reduce hardcoded numbers in denoising neighbor tiles code

commit e65c78cd43
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 18:54:42 2020 +0200

    Cleanup: minor refactoring in Cycles update detection code

commit ad45b8d6a4
Author: Milan Jaros <jar091>
Date:   Fri Jul 10 11:49:52 2020 +0200

    Cycles: optimize camera inside volume tests

    Only run when there are volumes in the scene, and compute in parallel.

    Ref T56939

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

commit d8e648c352
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 10 17:09:35 2020 +0200

    Fix T78776: Cycles OpenCL error after recent changes for holdouts

commit 9dbe9a753a
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 16:50:26 2020 +0200

    Fix T78766: Blender crashes after deleting vertices with Custom Normals.

    Some core BMesh topology changing functions were not properly tagging
    custom normal runtime caches as dirty...

commit 5372924983
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Fri Jul 10 16:14:10 2020 +0200

    Fix T78579: Proxy produces wrong preview when using Offset or Crop

    Make sure that proxy and original images are scaled to same size before
    applying offset or crop.

    During testing, I discovered, that raw cache will lose information whether
    this image was proxy or not. Because of this, proxy images will not create
    this cache type. It would be fairly easy to implement this functionality for
    cache, but I have decided to not do it now, because I did not want to pass yet
    another mostly hard-coded bool flag to cache system. Since image is proxy, it
    should be fast to read anyway.

    In case of using offset property, code was modified to make sure we scale
    image only once. I also tried to make code more readable and streamlined and
    cleaned up surrounding functions a bit.

    Reviewed By: brecht

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

commit 77f823a240
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Fri Jul 10 15:57:28 2020 +0200

    Fix T78573: Crash when removing strips with prefetching

    Stop prefetching before changing content of seqbase.

    Reviewed By: brecht

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

commit 47e71f4623
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Fri Jul 10 15:53:57 2020 +0200

    Fix T69440: Memory leak adding strips via python

    seq->strip was overwritten in python API function.

    Reviewed By: sergey

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

commit cbfedf2139
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 15:53:36 2020 +0200

    BLI: add C++ random number generator

    This adds `blender::RandomNumberGenerator` in `BLI_rand.hh`.
    Furthermore, `RNG` is now implemented in terms of this new generator.
    No functional changes are expected, the generated random numbers
    are not changed by this commit.

    Reviewers: campbellbarton, brecht

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

commit c2304d2f02
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 15:29:03 2020 +0200

    Expose override flags to python RNA properties definition.

    Time will tell whether we need to expose more RNA override flags here.

    Implements/Fix T78534.

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

commit 4d1c3c029e
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 08:37:35 2020 +0200

    Cleanup: declaration and implementation function signature did not match

commit f93e0f1a9e
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 15:23:52 2020 +0200

    Refactor override code to properly deal with runtime rna properties too.

    The triplet static RNA / runtime RNA / custom properties is a real pain to
    deal with...

    Using the new `PropertyRNAOrID` struct helps clarifying and properly
    dealing with all three cases.

    Note that this makes override of py-defined RNA properties working
    (support for that will be committed next).

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

commit 337e2c9029
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 15:19:40 2020 +0200

    RNA: refactor how we get 'ensured' RNA properties.

    Introduce new PropertyRNAOrID structure, storing most useful data about
    an 'opaque' PropertyRNA in relation with a given PointerRNA struct.

    It deals with all the three cases (pure static RNA, runtime RNA where
    data is actually stored in IDProperties, and pure IDProperties, aka
    custom data.

commit 6c1157201a
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 22:59:12 2020 +1000

    Cleanup: simplify platform define checks

    Platforms besides WIN32 were in a single else clause, use elif instead.

commit 45287f909c
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 22:58:30 2020 +1000

    Fix for building on systems besides apple/windows/linux

commit 26d28ade26
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:40:23 2020 +0200

    Cleanup: follow code style

commit c806db6313
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:22:35 2020 +0200

    Functions: add utility to find dependencies of input sockets

commit 60133ff98d
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:20:39 2020 +0200

    Functions: store derived node tree and network in map for future access

commit 295b3aefb0
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:19:45 2020 +0200

    Functions: make constant folding work on unfinished networks

commit 7bae599232
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 14:18:51 2020 +0200

    Nodes: add redundant name check in debug builds to prevent errors

commit 3121015dce
Author: Jeroen Bakker <jeroen@blender.org>
Date:   Fri Jul 10 13:37:12 2020 +0200

    Fix Crash due to recent changes

    {39b525e0f07fa25dcda54226ade789959b642dec} could write in unallocated
    space.

commit 00eb6a56aa
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Fri Jul 10 13:30:08 2020 +0200

    GPencil: Fix tooltip error

    The tooltip was copied by error from Lattice modifier.

commit 8fd65a2252
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:56:57 2020 +0200

    Functions: use new is-equal and hash function of CPPType

commit 3edd2832b2
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:54:19 2020 +0200

    Functions: make generic types hashable

commit f62204718b
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:53:50 2020 +0200

    BLI: initial hash function for Color4b and float4x4

commit 8f6c0f2242
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:41:51 2020 +0200

    Functions: make generic types equality comparable

commit 52636c3059
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:36:06 2020 +0200

    Cleanup: various cleanups in for CPPType

commit 39b525e0f0
Author: Jeroen Bakker <jeroen@blender.org>
Date:   Fri Jul 10 12:05:31 2020 +0200

    Fix T78296: Performance - Use Binary Search for MDeformWeight

    Use binary search for querying deform weights.

    Spring 02_020_A.anim.blend on Ryzen 1700X goes from 12.4 to 12.7fps.

    During profiling it was detected that adding new items to the head was faster than adding to the tail.

    Reviewed By: Campbell Barton

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

commit 77a646279d
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 10 12:04:32 2020 +0200

    Cleanup: structure CPPType according to code style guide

commit 9c25731781
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 10 11:53:11 2020 +0200

    LibOverride: Fix improper tagging of more of the backward pointers in RNA nodetrees.

commit 582a0b7e5a
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 19:02:18 2020 +1000

    Fix T78756: White UV drawing is displayed as Dashed

commit 7a9028cad1
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 18:58:36 2020 +1000

    Fix UV rip failing to disable proportional edit-mode

commit a148c4676b
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 16:04:09 2020 +1000

    Cleanup: spelling

commit 03f5acd445
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 16:03:12 2020 +1000

    Cleanup: clang-format

commit 8b660ea0ec
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 13:36:16 2020 +1000

    Fix UV path redo in vert/edge mode

    Redo was only working in some situations,
    some options were also not being forwarded.

commit 96068324cd
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 13:35:44 2020 +1000

    Fix BM_loop_at_index_find lookup

commit 89cb41faa0
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:55:59 2020 +1000

    UV: allow ripping face-regions

    This changes the behavior of rip when entire faces are selected.
    Now face regions are isolated and moved instead of ripping the edge-loop
    extracted from the selection boundary.

    This is a convenient alternative to separate selection & move.
    Resolves T78751.

commit 3fdd092649
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:38:28 2020 +1000

    Cleanup: face-center mesh calculation

    Loop over faces and calculate their centers instead of zeroing the
    face center array and accumulating all faces vertex corners.

    Move subsurf face center extraction into it's own loop since it works
    differently.

commit b0378440ce
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:18:43 2020 +1000

    Fix missing adjacent UV check for recent UV path select

    Path selection could cross UV islands if the destination element was
    on an island boundary.

commit 8f24ec2e26
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 12:04:29 2020 +1000

    Cleanup: add BLI_linklist_find_last

    This makes adding to the end of a linked list simpler,
    In most cases we avoid this in favor of BLI_linklist_append.

    For one off operations it's OK.

commit 3dd460aa7f
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:41:14 2020 +1000

    Cleanup: spelling

commit a0d3b60015
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:46:26 2020 +1000

    Cleanup: use FLT_MAX for the maximum path selection cost

    A large number below FLT_MAX was used to avoid overflow,
    however this doesn't cause any problems.

commit 0b77e2f4c4
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:31:41 2020 +1000

    Cleanup: variable names, use define for maximum path cost

commit 92bc277950
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Fri Jul 10 11:40:38 2020 +1000

    Cleanup: undeclared warnings

commit 3623db7784
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 19:03:50 2020 +0200

    BLI: add more operator overloads for float2

commit 03a00bda2b
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Thu Jul 9 17:16:24 2020 +0200

    Sculpt: Make Sculpt Vertex Colors features experimental

    This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option.

    Reviewed By: brecht

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

commit 1e3247c078
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 18:19:39 2020 +0200

    Fix: add missing extern "C"

commit a90b69d065
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 18:04:13 2020 +0200

    Build: add more libc compatibility functions for upcoming libraries update

    These are needed by the x264 library.

commit 6778949e01
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Thu Jul 9 17:56:00 2020 +0200

    Fix repeated Face Sets IDs when joining meshes

    As Face Sets IDs start from 0 and increase by 1 each time a new face set
    is created in a mesh, when joining multiple meshes it could happen that
    the same ID is used by several unrelated areas in multiple objects. This
    checks the Face Sets IDs when joining meshes and ensures that they are
    not repeated between different objects when joining them, so in the
    resulting mesh all previous face sets will have different IDs.

    Reviewed By: sergey

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

commit 7b1c406b54
Author: Bastien Montagne <bastien@blender.org>
Date:   Thu Jul 9 15:33:34 2020 +0200

    Implement T77959: Never duplicate linked data during deep-copy.

    Note that this behavior is enforced on user level for now, but on code
    side it is controlled with a flag, which should make it easy to refine
    that behavior if needed.

    Only exception is when we duplicate a linked ID directly (then we assume
    user wants a local deep-copy of that linked data, and we always also
    duplicate linked sub-data-blocks).

    Note that this commit also slightly refactor the handling of actions of
    animdata, by simplifying `BKE_animdata_copy_id_action()` and adding an
    explicit new `BKE_animdata_duplicate_id_action()` to be used during ID
    duplication (deep copy).

    This also allows us to get rid of the special case for liboverrides.

commit 78b629a98f
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Wed Jul 8 18:10:31 2020 +0200

    Sculpt: Skip fully hidden nodes in sculpt tools

    As tools iterators skip not visible vertices, fully hidden nodes can
    also be skipped and considered as masked.

    Reviewed By: sergey

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

commit 1fb667da01
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Tue Jul 7 23:01:51 2020 +0200

    Fix wrong upate flag when updating the PBVH visibility

    This function was using the wrong flag to update the visibility state of
    the nodes, so I assume that most of the partially visible optimizations
    were not working.

    Reviewed By: sergey

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

commit e5ebaa9fd6
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Wed Jul 8 17:22:11 2020 +0200

    Fix T78664: Implement Mesh and Face Set boundary automasking in Multires

    This implements the SCULPT_vertex_is_boundary and SCULPT_vertex_has_unique_face_set functions for PBVH_GRIDS, which makes features such as automasking now work in multires. It also fixes some other face sets related features in multires, like face set boundary smoothing.

    This uses the BKE_subdiv_ccg_coarse_mesh_adjacency_info_get function to get the vertex indicies in the base mesh from multires. This way the API functions can get topology or face set information directly from it. In the future, these vertex indices can be used to get any other information from the base mesh from multires, like seams, sharp edges, disconnected elements IDs...

    Reviewed By: sergey

    Maniphest Tasks: T78664

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

commit bd84b2cbcc
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Sat Jul 4 18:28:40 2020 +0200

    Fix Sculpt Vertex Colors sample color changing brush alpha

    It is not practical to change the alpha of the paint color with the
    color picker as with the current brush design alpha is the main strength
    control for the brush.

    Reviewed By: sergey

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

commit 13b1374497
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Thu Jul 9 17:41:04 2020 +0200

    Fix crash when using Mask by Color in Multires

    Reviewed By: sergey

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

commit 78d48343ae
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Thu Jul 9 15:59:57 2020 +0200

    Make deps: Fix compilation error on CentOS

    There were two issues.

    First is related on ISPC's CMake configuration forcing C and C++
    compilers to be clang and clang++. This goes against of desired
    behavior when we use our own compiled clang compilers.

    The second issue was related on linker failure: CLang libraries
    are linked statically, and they need some of C++ 11 STL symbols
    which are coming from libstdc++.

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

commit 2be0ae7c99
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 16:51:48 2020 +0200

    Fix Cycles unnecessary updates to camera in viewport render

    Problem identified by Milan Jaros.

commit 9de09220fc
Author: Szymon Ulatowski <szulat>
Date:   Thu Jul 9 17:19:52 2020 +0200

    EEVEE: Implement the missing Sky texture

    I'm not sure if the Sky was deliberately left out or was just waiting for a
    better moment, but so many I was disappointed that Sky in EEVEE is
    completely white.

    There are already 2 implementations (osl and gpu) so this is the third one.
    Looking at other cases it seems that we are not supposed to share sources
    between cycles and the rest? So the new util_sky_model files are just
    copies of what is already in cycles, except that the data file uses the RGB
    variant of the Hosek/Wilkie model, because we output RGB anyway (but can be
    easily changed to XYZ if desired - the results are nearly identical).
    I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I
    wanted to use mat3 but it does not work).
    Also, should I cache the sky model data between renders if the parameters
    do not change?

    Reviewed By: fclem, brecht

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

commit 42c99ec15b
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 16:37:44 2020 +0200

    BLI: rename rand.c to rand.cc

commit 580d50091c
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 15:40:27 2020 +0200

    Particles: Create a simulation state for every Particle Simulation node

    Every Particle Simulation node has a name (or a path when it is in a node group).
    This name has to be used in the Simulation modifier on a point cloud to see
    the particles.

    Caching has been disabled for now, because it was holding back development
    a bit. To reset the simulation, go back to frame 1.

    Currently, there is no way to influence the simulation. There are just some
    randomly moving points. Changing that is the next step.

commit 31ad43a3c7
Author: Jacques Lucke <jacques@blender.org>
Date:   Thu Jul 9 15:29:25 2020 +0200

    Blenloader: make BLO_read_data_address work in C++

commit 544c435fdd
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 9 12:20:07 2020 +0200

    Fix T78745: Cycles error baking with multiple materials

commit 8ddf7556a5
Author: Bastien Montagne <bastien@blender.org>
Date:   Thu Jul 9 11:44:11 2020 +0200

    Fix T78718: Crash when deleting particle system modifier with the X Shortcut.

    Duplication and deletion code of modifiers was totally wrong for
    particle system, that special weird thing needs its own custom
    management.

    Note that for now I chose not to duplicate the particle settings ID when
    duplicating the modifier...

commit ea5fe7abc1
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 17:29:17 2020 +1000

    UV: path selection support

    This adds support for path selection for vertex edge & face selection
    modes, matching mesh editing behavior, useful with the UV rip tool.

    Region select & edge tagging are currently not supported,
    although they could be added eventually.

commit 0b8221683f
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 9 18:23:16 2020 +1000

    BMesh: add utility functions

    - BM_edge_uv_share_vert_check
    - BM_face_uv_calc_center_median_weighted
    - BM_loop_at_index_find

commit 0b3bf69d3c
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 9 13:33:15 2020 +1000

    Cleanup: move BMesh UV queries into their own file

commit 754c5d6a14
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Thu Jul 9 13:29:48 2020 +1000

    Cleanup: clang-format

commit 31bc76ea4e
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 22:29:10 2020 +0200

    Cleanup: remove unnecessary calls to as_span

    This uses the new implicit conversions and constructors
    that have been committed in the previous commit.

    I tested these changes on Linux with gcc and on Windows.

commit 403384998a
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 22:27:25 2020 +0200

    BLI: improve constructors and conversions to span

    This allows us to avoid many calls to `as_span()` methods. I will
    remove those in the next commit. Furthermore, constructors
    of Vector and Array can convert from one type to another now.

    I tested these changes on Linux with gcc and on Windows.

commit 4b85ed819d
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 20:41:00 2020 +0200

    Cleanup: remove unused function

    This is not necessary in C++17 anymore.

commit f7d5d4ee3b
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 20:39:12 2020 +0200

    Cleanup: use c++17 helper variable templates

commit e4926c167b
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 8 18:08:08 2020 +0200

    Fix T78718: Crash when deleting particle system modifier with the X Shortcut.

    Again those backward pointers not properly flagged in RNA, hence
    generating infinite loops.

commit f4a39cafa1
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 17:05:40 2020 +0200

    Functions: add AttributesRef class

    This is the same as MutableAttributesRef, but the data in it cannot be changed.

commit 439c238bb4
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 17:04:50 2020 +0200

    Cleanup: use different internal socket name

commit 05365d1376
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 17:04:09 2020 +0200

    Functions: support hashing MFDataType and CPPType

commit 2de5de57c5
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Wed Jul 8 15:03:06 2020 +0200

    Build: fix stack linker warning with ffmpeg on macOS

    The ff_cfhd_init_vlcs() function was using a lot of stack space, which
    made linker on macOS unhappy. Using heap allocation allows to silence
    the warning without causing other side-effects.

    Kept the patch enabled for all platforms to avoid difference in behavior
    and performance on different platforms, which could make certain types
    of investigation very tricky.

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

commit cb3c4218bf
Author: Bastien Montagne <bastien@blender.org>
Date:   Wed Jul 8 15:43:57 2020 +0200

    Minor cleanup in rna override code.

commit d1f4546a59
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:10:24 2020 +0200

    Functions: implement common subnetwork elimination optimization

    This was the last of the three network optimizations I developed in
    the functions branch. Common subnetwork elimination and constant
    folding together can get rid of most unnecessary nodes.

commit e3e42c00cb
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:06:32 2020 +0200

    Functions: Support getting MFSocket based on its id

commit 2b9d62b73a
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:06:04 2020 +0200

    Functions: Support accessing socket index of MFSocket

commit 34d175f372
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:04:28 2020 +0200

    Functions: initial hash/equals implementation for constant multi-functions

commit 840941215d
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:02:47 2020 +0200

    Functions: allow multi-functions to override a hash and equals function

commit 36a547af7b
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 15:01:33 2020 +0200

    Cleanup: add correct license header to tests

commit ff133bbd33
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 14:57:31 2020 +0200

    BLI: add disjoint set data structure

    This can be used to find separate islands in meshes efficiently (as is
    done in cycles already). Furthermore, this helps to implement some
    algorithms on node trees more efficiently.

commit a8ff8b64dc
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 14:40:34 2020 +0200

    BLI: add comparison operators and hash functions for float3, etc.

commit ff444da7c4
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Thu Jul 2 12:28:57 2020 +0200

    macOS: upgrade minimum required version to 10.13 High Sierra

    C++17 does not work on 10.12, and Apple extended support ended for 10.12 in
    October 2019.

    Maniphest Tasks: T76783, T76184

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

commit 6435acd8f6
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Wed Jul 8 12:57:59 2020 +0200

    Cycles: support shader transparency for holdout objects

    Now transparent areas of the object will render objects behind.

    Fixes T78728.

commit 643196cc37
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Wed Jul 8 11:04:49 2020 +0200

    CMake: Fix spelling of Embree passed to find package

    The spelling and capitalization of package name passed to find_package()
    and find_package_handle_standard_args() needs to match.

    Silences CMake warning about mismatch.

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

commit 45004d82e0
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 11:18:43 2020 +0200

    Functions: add dead node removal and constant folding optimization

    Those optimizations work on the multi-function network level.
    Not only will they make the network evaluation faster, but they also
    simplify the network a lot. That makes it easier to understand the
    exported dot graph.

commit 50d7c00d9c
Author: Jacques Lucke <jacques@blender.org>
Date:   Wed Jul 8 10:16:56 2020 +0200

    Cleanup: fix comment

commit 01c8aa12a1
Author: Alexander Gavrilov <angavrilov@gmail.com>
Date:   Wed Jul 1 17:38:07 2020 +0300

    Apply Modifier: support applying as shape key and keeping the modifier.

    This can be useful to save the result of a cloth simulation as a
    shape key without destroying the simulation, so it's possible to
    e.g. re-run it to get other shapes, or simply use the new shape
    key to start the simulation already in a draped state.

    It also makes sense to allow applying as shape key even when the
    mesh is shared, because the operation itself just adds a shape
    key. To support this, split the apply operator into Apply and
    Apply As Shapekey so that they can have different poll callbacks.

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

commit 7fcb6bc59c
Author: Lukas Stockner <lukas.stockner@freenet.de>
Date:   Wed Jul 8 02:10:02 2020 +0200

    Fix T78324: Different Sky Texture results between CPU and GPU

    The problem here was numerical precision: The code calculates the angle between
    sun and view direction, and the usual acos(dot(a, b)) approach for that has
    poor numerical performance for almost parallel angles.

    As a result, the generally tiny difference between floating point computation
    between CPU and GPU was enough to make the sun vanish at different radii,
    causing different results.

    The new version fixes the difference by making the computation much more robust
    on both platforms.

commit afcb41a0aa
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 20:32:40 2020 +0200

    BLI: simplify copy constructor of Array

commit eb5fb1741d
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 20:29:35 2020 +0200

    Cleanup: don't end description with a '.'

commit 8713109212
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 20:27:34 2020 +0200

    Cleanup: fix typo

commit 902ee4d13c
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 19:46:10 2020 +0200

    Functions: cleanup loop that traverses the MFNetwork

commit 22158162ef
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 19:34:35 2020 +0200

    Functions: add generic functions that output constants

commit f4633cf46c
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 19:16:31 2020 +0200

    BLI: simplify copy constructor of vector

commit 67042aa6a1
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:45:34 2020 +0200

    Functions: extend multi-function network api

commit adfae89f96
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:40:42 2020 +0200

    BLI: provide access to underlying node in dot exporter

commit a8627ea66d
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:39:24 2020 +0200

    Functions: Add debug print and destruct callback to CPPType

commit 4990e4dd01
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 18:23:33 2020 +0200

    Nodes: Generate multi-function network from node tree

    This adds new callbacks to `bNodeSocketType` and `bNodeType`.
    Those are used to generate a multi-function network from a node
    tree. Later, this network is evaluated on e.g. particle data.

    Reviewers: brecht

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

commit ff97545c50
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Tue Jul 7 18:37:35 2020 +0200

    Fix T75943 EEVEE: Cubemaps shows black

    Caused by faulty driver implementation. Force fallback method.

commit 1e2ff4f81b
Author: Hans Goudey <h.goudey@me.com>
Date:   Tue Jul 7 11:10:42 2020 -0400

    Cleanup: Add braces for clang tidy

commit 0edf2fc128
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 16:51:03 2020 +0200

    BLI: Correct spin lock definition

    The MSVC atomic function is defined for an unsigned type.

    Not sure why this became an issue after switch to TBB by default,
    maybe some CFLAGS changed to be more strict after that.

commit dad3de89dc
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Tue Jul 7 11:27:09 2020 -0300

    Fix: remove accidental code

    `v1` and `v2` are already set.

commit d352902758
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 11:16:31 2020 +0200

    Make deps: Use own nasm for ffmpeg and x264

    Fixes the warning: building for macOS, but linking in object file

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

commit 1e3c0b4b03
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 10:47:09 2020 +0200

    Make deps: Compile own version of nasm for Apple

    The upstream version of nasm does not put version information to the
    generated object files, which makes linker to show the following
    warning:

      building for macOS, but linking in object file

    Using own patched version of nasm which puts required information to
    the object file, making linker happy.

    The plan is to either streamline the patch and provide it to the
    upstream, or, it that takes too long, get an independent fix from the
    upstream.

commit 202e7ccaae
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 6 14:33:59 2020 +0200

    Fix T77455: Blender Freezes when using the 3d Scale Gizmo

    Issue is reported on Linux ith Intel HD6xx iGPU. Inside
    `gpu_select_sample_query.c` the call to `glGetQueryObjectuiv` froze. After
    bisecting this lead to the polyline shader. When using a 3d color shader
    in stead of the polyline shader during selection seems to fix the issue.

    Other parts of blender might also be effective, but I wasn't able to
    freeze blender in these areas. When it does, we might want to add
    a similar work-around to button2d, cage2d, cage3d & move3d, navigate.

    Backport this patch to 2.83.

    Reviewed By: Clément Foucault

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

commit d1dcd2b464
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 16:17:36 2020 +0200

    BLI: Fix mistake in SpinLock TBB migration

    Copy-paste mistake.

commit 20558848d3
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Tue Jul 7 09:45:53 2020 -0300

    Optimization: use `BLI_bvhtree_intersect_plane` to detect faces that will be affected by the knife tool

    The knife code currently calls the `BLI_bvhtree_overlap` function that
    tests the overlap between the mesh tree and an AABB that encompasses the
    points projected in the clip_start, clip_end and or clip_planes of the
    view.

    This resulted in many false positives since the AABB is very large.
    Often all the triangles "overlapped".

    The solution was to create a new function that actually tests the
    intersection of AABB with a plane.

    Even not considering the clip_planes of the view, this solution is more
    appropriate than using overlap.

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

commit 630c6226e2
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Tue Jul 7 16:26:01 2020 +0200

    Fix T78307 UI: Drawing artifacts in the Blender UI on macOS

    This was due to a bad driver which was not respecting this bit of the
    specification:

    `If the current primitive does not originate from an instanced draw command, the value of gl_InstanceID is zero.`

commit 737bd549b6
Author: Patrick Mours <pmours@nvidia.com>
Date:   Mon Jul 6 12:25:54 2020 +0200

    Cycles: Add support for native OptiX curve primitive

    This patch adds support for the curve primitive from OptiX to Cycles. It's currently hidden
    behind a debug option, since there can be some slight rendering differences still (because no
    backface culling is performed and something seems off with endcaps). The curve primitive
    was added with the OptiX 7.1 SDK and requires a r450 driver or newer, so this also updates
    the codebase to be able to build with the new SDK.

    Reviewed By: brecht

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

commit 95f0f31279
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Tue Jul 7 14:45:31 2020 +0200

    Fix T78692: improve UI regarding the effect of the denoiser on denoising passes

    It wasn't obvious that the choice of Cycles denoiser also generates different
    denoising data passes for compositing.

commit a394aac8b4
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Tue Jul 7 14:47:59 2020 +0200

    Fix T78666: Cycles non-uniformly scaled hair renders wrong for static objects

    Don't apply the matrix transform optimization in this case, curve points and
    radius can't represent non-uniform scale the way is possible with triangle
    meshes and vertices.

    This would cause abrupt change if objects had e.g. motion blur in one frame
    and not in the next.

commit 98bee41c8a
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Tue Jul 7 14:30:55 2020 +0200

    IO: Reversed persistent ID order in exports to Alembic and USD

    Each duplicated (a.k.a. instanced) object has a Persistent ID, which
    identifies a dupli within the context of its duplicator. This ID
    consists of several numbers when there are nested duplis (for example a
    mesh instancing empties on its vertices, where each empty instances a
    collection). When exporting to Alembic/USD, these are used to uniquely
    name the duplicated objects in the export.

    This commit reverses the order of the persistent ID numbers, so that the
    first number identifies the first level of recursion. This produces
    trees like this:

        ABC
         `--Triangle
             |--Triangle
             |--Empty-1
             |    `--Pole-1-0
             |        |--Pole
             |        `--Block-1-1
             |            `--Block
             |--Empty
             |    `--Pole-0
             |        |--Pole
             |        `--Block-1
             |            `--Block
             |--Empty-2
             |    `--Pole-2-0
             |        |--Pole
             |        `--Block-2-1
             |            `--Block
             `--Empty-0
                 `--Pole-0-0
                     |--Pole
                     `--Block-0-1
                         `--Block

    It is now clearer that `Pole-2-0` and `Block-2-1` are instanced by
    `Empty-2`. Before this commit, they would have been named `Pole-0-2` and
    `Block-1-2`.

commit 70b1c09d7a
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Tue Jul 7 12:45:30 2020 +0200

    IO: Fix bug exporting dupli parent/child relations

    Exporting a scene to USD or Alembic would fail when there are multiple
    duplicates of parent & child objects, duplicated by the same object. For
    example, this happens when such a hierarchy of objects is contained in a
    collection, and that collection is instanced multiple times by mesh
    vertices. The problem here is that the 'parent' pointer of each
    duplicated object points to the real parent; Blender would not figure
    out properly which duplicated parent should be used.

    This is now resolved by keeping track of the persistent ID of each
    duplicated instance, which makes it possible to reconstruct the
    parent-child relations of duplicated objects. This does use up some
    memory for each dupli, so it could be heavy to export a Spring scene
    (with all the pebbles and leaves), but it's only a small addition on top
    of the USD/Alembic writer objects that have to be created anyway. At
    least with this patch, they're created correctly.

    Code-wise, the following changes are made:

    - The export graph (that maps export parent to its export children) used
      to have as its key (Object, Duplicator). This is insufficient to
      correctly distinguish between multiple duplis of the same object by
      the same duplicator, so this is now extended to (Object, Duplicator,
      Persistent ID). To make this possible, new classes `ObjectIdentifier`
      and `PersistentID` are introduced.
    - Finding the parent of a duplicated object is done via its persistent
      ID. In Python notation, the code first tries to find the parent
      instance where `child_persistent_id[1:] == parent_persistent_id[1:]`.
      If that fails, the dupli with persistent ID `child_persistent_id[1:]`
      is used as parent.

    Reviewed By: sergey

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

commit f2175e06a7
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 12:43:18 2020 +0200

    Mae deps: Ensure Brotli is disabled for FreeType

    We don't need it and it was optionally enabled, causing Blender to fail
    to link on certain configuration (when Brotli is installed via Homebrew
    for example).

commit 02cd159539
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 12:31:10 2020 +0200

    Cleanup: add comment explaining operator delete

commit cc311e4a52
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Tue Jun 30 15:13:54 2020 +0200

    IO: print export name instead of object name in debug export graph output

    This is just a change in `AbstractHierarchyIterator::debug_print_export_graph()`
    to aid in debugging. It'll make it possible to distinguish between
    different duplicates of the same object.

    No functional changes to Blender itself.

commit 5761cb9ee2
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 11:52:45 2020 +0200

    Guarded Allocator: add missing operator delete

    This resolves warning C4291 on windows.

commit 80fe5e1b15
Author: Johan Walles <walles>
Date:   Tue Jul 7 11:09:31 2020 +0200

    UI: Add units to motion tracking solve errors

    The unit being "pixels".

    Before this change the solve errors were unitless in the UI.

    With this change in place, the UI is now clear on that the unit of the
    reprojection errors is pixels (px).

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

commit 6d9a6f12b3
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Tue Jul 7 10:06:14 2020 +0200

    Make deps: Fix compilation error of Python on macOS

    The configuration was confused about gettext installed via Homebrew
    and isysroot passed to Python's compilation but not to test programs.

    After this change `import gettext` still works, but it is unclear how
    to test it further,

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

commit 955abbeff2
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 09:01:01 2020 +0200

    Fix sign conversion error

commit e233ee1c1f
Author: Philipp Oeser <info@graphics-engineer.com>
Date:   Thu Jun 25 14:37:22 2020 +0200

    Fix T78186: Dyntopo panel error with tools that dont have a brush

    Maniphest Tasks: T78186

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

commit 19d4e265b6
Author: Jacques Lucke <jacques@blender.org>
Date:   Tue Jul 7 10:35:28 2020 +0200

    Cleanup: remove redundant comments

    Searching in these files for "_as" will reveal a comment at the
    top, that explains what these methods are for. There is no need
    to duplicate that knowledge all over the place.

commit 6e609f0eb0
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 17:50:33 2020 +1000

    Cleanup: use doxy comments

commit 62774baded
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 16:06:05 2020 +1000

    UI: add merge/split menus

    This makes the menus and keymap match the edit-mesh
    (M for merge, Alt-M for split).

commit d212b3dc43
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Mon Jul 6 15:28:19 2020 +0200

    Make deps: Fixes for macOS platform

    Set of fixes which had to be made in order to have dependencies built
    on own laptop:

    - Require bison as a dependent software. It is required by ISPC.

      On macOS it is required to be installed via Homebrew. This is because
      Bison from Xcode toolchain is too old.

    - Made sure Boost is compiled using clang.

      Without this gcc was used, and some unsupported command line argument
      was passed to it.

    - Modify OGG in a way which does in fact pull fixed sized types.
      They are defined in stdint.h.

      Without this fix FFmpeg will not detect presence of OGG because the
      test program fails to compile.

    - Force disable zstd compression and make wepb optional for the TIFF
      library. Without this TIFF might pick up development libraries from
      Homebrew.

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

commit b28683b8b5
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 16:03:26 2020 +1000

    Cleanup: remove unused arguments

commit 0c58970da7
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 12:44:47 2020 +1000

    Cleanup: spelling

commit ad0edc626d
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Tue Jul 7 12:43:45 2020 +1000

    Cleanup: unused World struct members linfac, logfac

commit e20171e59f
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 16:39:28 2020 -0400

    Fix build error with tests for removed functions

    These GHash functions were removed in 12817083ec,
    so the tests should be removed too.

commit d557f05502
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 16:07:54 2020 -0400

    Cleanup: Use bool instead of int

commit 053e0c0af3
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 15:35:21 2020 -0400

    UI: Add shortcuts for shader effect panels

    Only the delete shortcut applies here, although the move up and down
    operators can optionally be assigned in the keymap.

    See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the
    grease pencil modifier panel implementation, which is the same.

commit 12817083ec
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 6 14:44:30 2020 -0300

    Cleanup: Use the BLI_edgehash API in the sewing simulation of cloths

    Also remove the code in the ghash that is no longer used.

    This change simplifies the existing code.

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

commit a856de700b
Author: Hans Goudey <h.goudey@me.com>
Date:   Mon Jul 6 13:17:07 2020 -0400

    Fix T77730: ShaderFx Missing Update Notifier

    This adds a notification type for shaderfx so the properties editor can
    be properly notified to redraw.

    Another possible solution would be to also redraw the shaderfx tab
     with a ND_MODIFIER update, but this solution allows us to avoid
     some unecessary redraws too. There were no existing cases of
    ND_OBJECT | NC_MODIFIER updates, so those cases were
    removed from buttons_area_listener.

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

commit f6f4043924
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 17:59:04 2020 +0200

    BLI: add methods to lookup a stored key in a set

commit 1562c9f031
Author: Patrick Mours <pmours@nvidia.com>
Date:   Mon Jul 6 17:32:32 2020 +0200

    Fix OptiX viewport denoising not working when rendering scene (without OptiX) that uses unsupported features

    Denoising devices do not need to load the full feature set of kernels, so only activate the denoising
    feature for them (so that it is possible to use features that are supported by the render devices, but
    not the denoising devices).

commit aabfd2fb9b
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 6 16:55:00 2020 +0200

    Cleanup: readfile: remove old deprecated OldNewMap for runtime caches.

commit ee3eba902a
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 6 16:21:41 2020 +0200

    Runtime cache preservation during undo: add support for nodes and embedded IDs.

commit bfc644dcfb
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Mon Jul 6 16:52:28 2020 +0200

    Reduce `DupliObject::persistent_id` from 16 to 8 items

    For historical reasons, `DupliObject::persistent_id` was of size
    `2*MAX_DUPLI_RECUR`. These reasons are now gone, and the persistent ID
    always gets exactly one array element for every dupli-recursion.

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

    Reviewed by: brecht

commit 0b07f9b717
Author: Bastien Montagne <bastien@blender.org>
Date:   Mon Jul 6 15:07:12 2020 +0200

    Fix T78608: Memory leak in Material properties: "Data from SCE".

    Caused by recent own refactor of cache presevation handling in readfile,
    EEVEE's lightcache are weird birds that can also be saved in .blend
    files, need a special handling for those 'persistent' caches...

commit 99feb10b8b
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 23:01:36 2020 +1000

    Cleanup: warning, spelling

commit 20446f07f6
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 22:52:29 2020 +1000

    Docs: reference bl_rna_get_subclass_py instead of bl_rna_get_subclass

    bl_rna_get_subclass only works for Nodes at the moment.

commit ffaf294c3f
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Mon Jul 6 14:53:39 2020 +0200

    Fix alignment/size issue on ARM/RPi architecture

    Addresses 964305 from Debian bug tracker.

commit 924578ce19
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 6 09:49:00 2020 -0300

    Optimization: Don't compute the snap to face on the knife tool twice

    Both `knife_find_closest_vert` and `knife_find_closest_edge` call
    `knife_find_closest_face`. Thus, running the raycast twice and setting
    values like `kcd->curr.bmface` and `kcd->curr.is_space` repeatedly.

    So:
    - separate `knife_find_closest_face` from `knife_find_closest_vert` and `knife_find_closest_edge`.
    - rename `knife_find_closest_vert` to `knife_find_closest_vert_of_face`
    - rename `knife_find_closest_edge `to `knife_find_closest_edge_of_face`.
    - do not set parameters previously set.

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

commit 073c426900
Author: Germano Cavalcante <germano.costa@ig.com.br>
Date:   Mon Jul 6 09:03:33 2020 -0300

    Fix faces disappearing when AutoMerge & Split

commit c632cf9ccd
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 21:23:35 2020 +1000

    Fix UV select separate not refreshing the display

commit 2c0cab03ca
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 21:14:12 2020 +1000

    UV: add rip region to toolbar

commit dbe171fb26
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 21:03:45 2020 +1000

    Cleanup: spelling, comments

commit 18b6c49a90
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 12:37:11 2020 +0200

    Cleanup: rename namespace TimeIt to timeit

    According to our style guide, namespaces should have
    lower case names.

commit 572c48cf98
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 09:08:53 2020 +0200

    BLI: improve exception safety of memory utils

    Even if we do not use exception in many places in Blender, our core C++ library
    should become exception safe. Otherwise, we don't even have the option
    to work with exceptions if we decide to do so.

commit 703a73fa84
Author: Jacques Lucke <jacques@blender.org>
Date:   Mon Jul 6 10:56:26 2020 +0200

    BLI: refactor how buffers for small object optimization are stored

    Previously, there was an error when operator-> was returning an
    invalid type. See error C2839.

commit 80393a0eba
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:41:36 2020 +1000

    UV: add rip tool

    New rip tool matching edit-mesh rip functionality.

    Useful as disconnecting UV's, especially for loops is inconvenient
    without this.

    This uses 'V' to rip, changing stitch to 'Alt-V'.

commit 9353477383
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:41:17 2020 +1000

    BMesh: add BM_face_calc_uv_cross

commit b51b893df8
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:40:55 2020 +1000

    BMesh: add BM_loop_other_vert_loop_by_edge

commit 705015e0a4
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 6 10:21:14 2020 +0200

    Fix T78481: Workbench Shadow effects XRay

    When in XRay some effects (shadow, cavity & depth of field) aren't supported.
    This patch makes sure that these effects aren't enabled.

commit 4f3045999d
Author: Campbell Barton <ideasman42@gmail.com>
Date:   Mon Jul 6 17:35:41 2020 +1000

    Cleanup: warnings, spelling

commit 0f617cd67e
Author: Jeroen Bakker <j.bakker@atmind.nl>
Date:   Mon Jul 6 07:45:10 2020 +0200

    GPU: Remove local shaders workaround for Intel/Windows

    It has been tested that local shaders workaround isn't needed for the
    latest Windows/Intel 6xx GPU's.

    Currently the local shaders workaround doesn't work anymore during the
    investigation it was detected that the intel drivers didn't need it
    anymore.

    Local shaders should still be fixed as it is also used for some legacy
    iGPU's. The current work around crashes when doing preview renders in
    EEVEE as the default materials aren't available but for the work around
    they should. (See T77346 for more information)

commit baf124c753
Author: Aaron Carlisle <carlisle.b3d@gmail.com>
Date:   Sun Jul 5 16:45:56 2020 -0400

    RNA Manual Reference: Update links

commit 247a28f242
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 5 15:08:26 2020 +0200

    Revert "BLI: refactor how buffers for small object optimization are stored"

    This reverts commit 5d79f9f276.

    This was introducing build errors in windows. Need a bit more time to check it.

commit 5d79f9f276
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jul 5 16:30:26 2020 +0200

    BLI: refactor how buffers for small object optimization are stored

commit 464aaf2701
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 4 17:31:02 2020 +0200

    Fix T78603: GPencil Noise modifier Vertex Group influence filter missing

    This was removed by error during the last refactor of modiifers.

commit 169bb4b9ce
Author: Jacques Lucke <jacques@blender.org>
Date:   Sat Jul 4 17:28:05 2020 +0200

    BLI: fix mistake in move constructor of Stack

commit 8e97694c8a
Author: Julian Eisel <julian@blender.org>
Date:   Sat Jul 4 17:06:57 2020 +0200

    Fix T78588: Material preview not visible in selection list

    Logic to determine if the library icon should be used was too general.

commit 9168ea8aab
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 4 11:15:11 2020 +0200

    Cleanup: Fix small typo error

commit 17603816f2
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Sat Jul 4 11:04:21 2020 +0200

    GPencil: Cleanup some comments typo

commit b0da78084b
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Sat Jul 4 01:27:12 2020 +0200

    UI: Attempt to fix OSX widget shader issue

    Some OSX GL driver implementation needs a dummy vbo read. This fixed issues
    with the Hair shaders in the past.

    Related to T78307

commit cad98923d0
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Sat Jul 4 01:02:54 2020 +0200

    Cleanup: spelling

commit ea65c6a153
Author: Richard Antalik <richardantalik@gmail.com>
Date:   Sat Jul 4 00:59:09 2020 +0200

    Fix T78433: Adding Fade Generates Python Exception

    This was caused by typo in rB67a822e08684.

commit 4bf56b37ca
Author: Nathan Craddock <nzcraddock@gmail.com>
Date:   Fri Jul 3 13:31:42 2020 -0600

    Cleanup: Use C-style comments in outliner files

    No functional changes. Convert all C++ style comments to C comments.
    Also capitalize and add full stops.

    The comments themselves were not cleaned up. Some could be removed or
    reworded.

commit 59ef43147e
Author: Nathan Craddock <nzcraddock@gmail.com>
Date:   Fri Jul 3 12:48:00 2020 -0600

    Cleanup: Remove unused outliner activation code

    No functional changes. Remove commented calls to extern_set_butspace
    and unused text activation code.

commit 57a48bd0ca
Author: Nathan Craddock <nzcraddock@gmail.com>
Date:   Fri Jul 3 12:36:09 2020 -0600

    Cleanup: Use _fn suffix for outliner button callbacks

    No functional changes. Use _fn instead of _cb.

commit d7dbf90a02
Author: Sebastian Parborg <darkdefende@gmail.com>
Date:   Fri Jul 3 21:22:41 2020 +0200

    Clang-tidy: Enable braces-around-statements warning

commit 185fe9cd8b
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 3 18:55:32 2020 +0200

    Cleanup: compiler warning

commit 46fcc12e83
Author: Brecht Van Lommel <brecht@blender.org>
Date:   Fri Jul 3 18:54:04 2020 +0200

    Fix error in new Hair data type file reading

commit d2db481dc7
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 18:04:40 2020 +0200

    Cleanup: Blendkernel, Clang-Tidy else-after-return fixes (incomplete)

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/blenkernel` module. Not all warnings are
    addressed in this commit.

    No functional changes.

commit a21cb22f8b
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 11:58:43 2020 -0400

    Cleanup: Deduplicate code for finding context object

    Instead of manually checking the pinned object, use the existing
    ED_object_active_context function. This requires adding const
    to the context in that function.

commit 33a74941c5
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:30:31 2020 +0200

    Cleanup: Editors, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors` module.

    No functional changes.

commit 367034f210
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:30:09 2020 +0200

    Cleanup: Editors/Space/UV-Edit, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/uv_edit` module.

    No functional changes.

commit 651d1aa7c8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:25:04 2020 +0200

    Cleanup: Editors/Transform, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/transform` module.

    No functional changes.

commit 35ce16939c
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:58 2020 +0200

    Cleanup: Editors/Space/sequencer, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_sequencer` module.

    No functional changes.

commit a201020cd3
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:41 2020 +0200

    Cleanup: Editors/Space/Clip, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_clip` module.

    No functional changes.

commit f254f66587
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:22 2020 +0200

    Cleanup: Editors/Space/Outliner, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_outliner` module.

    No functional changes.

commit 3aa53b361d
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:20:08 2020 +0200

    Cleanup: Editors/Space/Node, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_node` module.

    No functional changes.

commit bf532b1106
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:19:13 2020 +0200

    Cleanup: Editors/Space/Text, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_text` module.

    No functional changes.

commit 2f6fc5a7e8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 17:18:56 2020 +0200

    Cleanup: Editors/Space/View3D, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/space_view3d` module.

    No functional changes.

commit b61ecb785c
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 16:34:57 2020 +0200

    Cleanup: Explicit return in each `else if` block in `buttons_context()`

    This is a similar change as in rB4283da83cc9.

    No functional changes.

commit f43fedd400
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 17:35:31 2020 +0200

    Cleanup: remove side effect in assertion

commit 4a48939f04
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 11:18:24 2020 -0400

    UI: Fix bevel modifier not showing vertex group

commit cad2d32be6
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 17:09:24 2020 +0200

    Clang-Tidy: Enable bugprone-misplaced-widening-cast

commit 4a5389816b
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 17:07:01 2020 +0200

    Clang-Tidy: enable readability-named-parameter

commit fac2e63bc0
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 16:57:55 2020 +0200

    Fix utterly broken code regarding GPUtextures of MovieClip in readfile.c

    Treat those as pure runtime code, reset to NULL by reading code, for
    now.

    Think those could be handled like Image gputextures (i.e. considered
    runtime cache and preserved across undo steps), but probably not
    critical for now.

commit 1bdabd7b4f
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 16:55:13 2020 +0200

    Move MovieClip to new undo cache management system.

commit 1019c9f582
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 16:54:08 2020 +0200

    Clang-Tidy: enable bugprone-too-small-loop-variable

commit 883f9dd6e5
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 16:48:04 2020 +0200

    Clang-Tidy: enable bugprone-assert-side-effect

    Looks like we have no assertions with side effects.

commit 9739fc4d1b
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 16:44:46 2020 +0200

    Clang-Tidy: More fixed of redundant check before delete

    For some reason got unnoticed in the original cleanup pass.

commit 14fd91e7e8
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 16:38:01 2020 +0200

    Clang-Tidy: enable bugprone-argument-comment

    It was called `inverted` in the header.

commit f4fdb8efc5
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:38:49 2020 -0400

    Cleanup: Remove redundant logic

commit f66aafa391
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:37:58 2020 -0400

    Fix memory leak when dragging shaderfx

commit f891d4e2ad
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 16:32:12 2020 +0200

    Clang-Tidy: Fix readability-delete-null-pointer warnings

    Also enable it in the configuration.

commit 53d41e1a6f
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:28:13 2020 -0400

    UI: Use sliders and [0, 1] ranges in ocean modifier

    The ocean modifier has two properties that use a [0, 10] hard min and
    hard max. The values act as factors though, so it makes more sense to
    use sliders and a 0 to 1 range.

    This commit also bumps the file subversion to avoid repeatedly applying
    the change to the properties' range.

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

commit 2a39b34a09
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 16:09:51 2020 +0200

    Cleanup: Editors/Sculpt/Paint, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/sculpt_paint` module.

    No functional changes.

commit fd5b093f84
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 16:01:15 2020 +0200

    Cleanup: Editors/Screen, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/screen` module.

    No functional changes.

commit 4283da83cc
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 15:59:48 2020 +0200

    Cleanup: Explicit return in each `else if` block in `ed_screen_context()`

    The `ed_screen_context()` function is approximately 700 lines long, and
    its main structure is a huge chain of `else if` statements. Some of the
    bodies did not return, but rather fell through and relied on the `return
    -1;` at the bottom of the function. This means that in order to truly
    understand what is going on in one of those `else if` blocks, it could
    be required to scroll past all the following `else if` blocks,
    double-checking that they all had an `else`, and then see what happens
    below.

    By adding explicit `return -1;` everywhere this happened, this is all
    avoided, increasing local understandability of the code. Furthermore, it
    makes the upcoming cleanup with the Clang-Tidy rule
    `readability-else-after-return` a lot easier to do.

    No functional changes.

commit de7c9f41e6
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 15:42:22 2020 +0200

    Cleanup: Editors/Object, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/object` module.

    No functional changes.

commit 19483125f8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 15:19:52 2020 +0200

    Cleanup: Editors/Mesh, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/mesh` module.

    No functional changes.

commit 7d0a0b8a6d
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 14:52:32 2020 +0200

    Cleanup: Editors/Armature, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/armature` module.

    No functional changes.

commit f82e52ebc8
Author: Sybren A. Stüvel <sybren@blender.org>
Date:   Fri Jul 3 14:51:19 2020 +0200

    Cleanup: Editors/Animation, Clang-Tidy else-after-return fixes

    This addresses warnings from Clang-Tidy's `readability-else-after-return`
    rule in the `source/blender/editors/animation` module.

    No functional changes.

commit 17ba566018
Author: Pablo Dobarro <pablodp606@gmail.com>
Date:   Fri Jul 3 02:15:54 2020 +0200

    Fix Pose Brush crashing after disabling connected only in FK mode

    This function was returning the ik_chain before disabling the
    fake_neighbors, so when the brush was used again with fake neighbors
    disabled after rebuilding the PBVH and free them, they were still
    enabled in the SculptSession, causing a the crash.

    Reviewed By: sergey

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

commit 3a59c184b9
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 16:09:58 2020 +0200

    Move Scene's cache management during undo to new system.

commit a33756d783
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:09:19 2020 -0400

    Cleanup: Unused variables in non-debug build

commit 6a58e15548
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 10:03:16 2020 -0400

    Cleanup: Remove obsolete code in interface_panel.c

    Some code delt with panel merging in earlier versions of Blender,
    which is no longer needed. Other code delt with controls that aren't
    used anymore, and in some cases have region-level equivalents.

    There's a surprising amount of this unused code in this file, so removing it
    will be helpful for the future.

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

commit 88d358902f
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 15:54:55 2020 +0200

    Clang-Tidy: Enable readability-redundant-string-cstr

commit 405e6c6cc9
Author: Antonio Vazquez <blendergit@gmail.com>
Date:   Fri Jul 3 15:53:44 2020 +0200

    Fix T78555: GPencil bake animation operator loose frame setting

    The values were reset for each run

commit 19ff145e66
Author: Hans Goudey <h.goudey@me.com>
Date:   Fri Jul 3 09:41:55 2020 -0400

    Clang-Tidy: Enable readability-redundant-control-flow

commit ffef562bf7
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date:   Fri Jul 3 15:31:23 2020 +0200

    Disable clang-tidy for code-generated RNA files

    This needs some extra care, which is probably easier once the initial
    pass over integration is done.

commit c9975088a9
Author: Bastien Montagne <bastien@blender.org>
Date:   Fri Jul 3 15:27:12 2020 +0200

    Move volume to new cache management system for undo.

commit 1e255ce031
Author: Jacques Lucke <jacques@blender.org>
Date:   Fri Jul 3 15:27:02 2020 +0200

    Fix T72214: Fluids: noise does not work with negative frame numbers

    The issue is duplicated code. There are two functions that zero-fill
    the frame number. They worked the same for positive frames numbers, but
    behaved differently for negative ones.

    On frame `-100`, `BLI_path_frame` outputs `-0100` and
    `fluid_cache_get_framenr_formatted_$ID$` outputted `-100`.

    I changed the behavior of the latter, because we depend on the behavior
    of the former for much longer already.

    Reviewers: sebbas

    Differential Revision: https://developer.blender.org/D8107
2020-07-12 21:12:27 -04:00
74c56382b8 A large refactor of newboolean to perpare for performance tuning.
Many changes aimed at, broadly, more sharing and less copying;
and having coordinates stored simultaneously in double and multiprecision,
as that will be needed for floating predicate filtering.
Biggest change is that faces are represented by arrays of pointers to
Verts instead of as integer indices into a vertex array.
2020-07-12 16:27:57 -04:00
ad3dcb7bb9 Got rid of clang-tidy errors. 2020-07-03 13:31:01 -04:00
e459c26413 Fixed violations of new Blender C++ style rules. 2020-07-03 11:03:26 -04:00
141d3400a7 Merge branch 'master' into newboolean 2020-07-03 09:08:26 -04:00
15ebad8c6e Added two more tests for boolean. 2020-07-02 12:55:05 -04:00
6633d6d7d0 Made two functions static to silence a warning. 2020-07-02 11:15:28 -04:00
956005f9dd First coplanar boolean test passes.
Implemented sorting of coplanar triangles.
Also, make format.
2020-07-02 10:13:19 -04:00
7776909026 Change boolean blenlib interface to be purely C++. 2020-07-01 12:42:04 -04:00
590ce6817d Change bmesh_boolean.c into a C++ file and start using PolyMesh interface.
Also, use BLI_math_mpq.hh everywhere instead of gmpxx.h.
2020-07-01 09:15:17 -04:00
a62bca844c Fix problem after master merge with Optional -> optional migration.
On Mac, there's an error re using the value() member of std::optional.
Working around it for now.
2020-06-30 15:31:00 -04:00
028f8b5b64 Merge branch 'master' into newboolean 2020-06-30 14:54:19 -04:00
66f511018e Dissolving triangulation edges and verts passes first test. 2020-06-30 14:46:08 -04:00
4d58e68565 First test with dissolve of triangulation edges is passing.
Still lots to do. And this includes a horribly inefficient way
of finding which edges are dissolvable -- to be fixed later.
2020-06-28 18:47:08 -04:00
ce37092668 Merge branch 'master' into newboolean 2020-06-26 08:36:23 -04:00
f80378cc66 Continued work on getting triangulation edges removed from output. 2020-06-19 15:53:56 -04:00
59805fa7e0 Merge branch 'master' into newboolean 2020-06-17 08:58:20 -04:00
d40819946b Start of PolyMesh interface for boolean.
Also refactored delaunay to put the 2d mesh representation into
an externally visible CDTArrangement class. Not sure yet whether
I will use this; if I end up not using it, will move that part of
the header back into the implementation file.
2020-06-17 08:55:05 -04:00
95da735c59 Fixed bug for some binary boolean ops. Fixed a memory leak.
Now the basic binary booleans work from the tool (not the modifier).
Still to do: (1) coplanar and non-connected-component cases;
(2) dissolve triangulation lines and new verts due only to them;
(3) properly transfer mesh attributes from old to new;
(4) hook up to modifier;
(5) attention to and tuning of performance.
2020-06-14 07:58:31 -04:00
7a775b8088 Made binary version of boolean and hooked up to Boolean tool.
Union seems to work. Other ops are flaky because I haven't
quite got the winding number propagation right yet.
2020-06-13 19:54:17 -04:00
2307f4f05d More boolean tests pass.
Fixed bug re confusion of how to sort triangles around an edge.
Fixed bug in first tettet test (inconsistent normals in input).
2020-06-13 11:11:02 -04:00
b0f9d093a6 Proper implementation of finding ambient cell.
Also fixed bug in boolean test where passed wrong output
to the obj writer.
2020-06-12 10:50:08 -04:00
cd6447fe03 First real boolean union output test works. 2020-06-11 20:37:17 -04:00
5cc3f006b5 Quient some warnings on Linux. 2020-06-11 18:46:02 -04:00
3917661753 After merge from master, updated for changes to BLI.
Mainly namespace changes, BLI -> blender, so I changed my
own namespaces to follow that pattern.
ArrayRef -> Span.
Now can have hash() as member of data structures rather
that having to make a DefaultHash for them.
Fixed a bad assumption about Arrays of bool being initialized to false.
2020-06-11 13:47:20 -04:00
d7b3d0aa27 Merge branch 'master' into newboolean 2020-06-11 05:44:10 -04:00
f1e7f42f9d Format previous commit. 2020-06-11 05:41:43 -04:00
16e3e9f3e2 A lot of progress towards working boolean library function.
The code to partition space into cells is mostly done.
The code to propagate winding numbers and flag cells according to the
boolean function is mostly done.
Only final extraction code is left, and a few other things.
2020-06-10 22:00:08 -04:00
9105af1b39 Added code that partitions triangle mesh into patches.
A patch is a set of triangles connected only by manifold edges.
Each patch will either appear or not appear in the boolean output
as a whole.
2020-06-07 16:19:44 -04:00
d985aa7117 Ran make format. 2020-06-07 06:02:01 -04:00
e4c25b0ab7 Move to exact arithmetic for new boolean implementation.
This is a regression in functionality from the previous version,
as I have not yet got anything beyond intersection working (and
that only for triangulated meshes). But want to get this into
the repository now while I continue to work on the functionality,
and then, the performance.
2020-06-06 18:46:06 -04:00
61ae661103 Merge branch 'master' into newboolean. 2020-06-06 18:31:12 -04:00
3353d6f8ee Merge branch 'master' into newboolean 2020-04-21 08:39:02 -04:00
1b93b09f6d Fixed Newboolean bug: how face sides were tracked.
Also, being more paranoid about new BMesh elements changing
positions in their tables after creating new elements, so
copying them all first.
2020-04-20 17:38:09 -04:00
3622e831ba Merge branch 'master' into newboolean 2020-04-04 15:26:14 -04:00
7a6224f76c Fix crash in debug newboolean due to repeated vertex. 2020-03-11 08:06:21 -04:00
73a0368d19 Boolean: fixed case where example came from new edge.
The code keeps track of which edges are to be used for examples,
and missed a case where the split edge was a new one so shouldn't
have an example.
2020-03-08 15:32:35 -04:00
5fdada4019 Merge branch 'master' into newboolean 2020-03-08 11:06:47 -04:00
bd59ad1602 Turn off debug in repository for newboolean. 2020-03-03 09:08:45 -05:00
6237dc70b3 Merge branch 'master' into newboolean 2020-03-03 08:46:30 -05:00
f747651698 Merge branch 'master' into newboolean 2020-03-01 19:11:59 -05:00
dfcb2a8865 Silence some unused warnings. 2020-03-01 10:54:24 -05:00
43051e5770 Update for new flag needed for BLI_delaunay_2d_cdt_calc, 2020-02-29 16:12:03 -05:00
e19aa157cd Merge branch 'master' into newboolean 2020-02-29 15:49:58 -05:00
9c6c299c7f Merge branch 'master' into newboolean 2020-01-28 12:20:20 -05:00
22faf7696c Merge branch 'master' into newboolean 2019-12-16 07:41:17 -05:00
d7b36d55d4 More consistent face-face intersections.
Changed the part-part intersect algorithm so that the same calculation
is done whenever a particular edge intersects a plane.
2019-12-12 14:19:54 -05:00
6724aa5478 Merge branch 'master' into newboolean 2019-12-06 07:02:31 -05:00
8009ff01db Removed #pragma marks -- didn't work on Windows.
Also a few tweaks to debugging output.
2019-12-06 06:48:36 -05:00
fed631a2d2 Merge branch 'master' into newboolean 2019-12-03 07:00:31 -05:00
dd3ea78bc8 Some fixes for some small epsilon cases.
Also changed default epsilon to 1e-5 from 1e-6, as the latter
is too close to hairy edge and anyway produceds really tiny faces
and edges that I doubt users really want. There's even a case for
it being 1e-4 by default.
2019-12-02 08:29:28 -05:00
b877aff607 Initial work on making modifier work. Debugging still. 2019-12-02 07:15:59 -05:00
c1c6eb15c9 Use arrays in MeshAdd for faster access. 2019-12-02 07:15:59 -05:00
20748f1639 Added stuff to make MeshAdd access faster. 2019-12-02 07:15:59 -05:00
19b1c64459 Faster find_coplanar_parts. 2019-12-02 07:15:59 -05:00
70f2025e9b Fixed memory leak of bvh trees. 2019-12-02 07:15:59 -05:00
ff4f28e15d Use BVH for partset pair intersection tests.
All regression tests pass.
2019-12-02 07:15:59 -05:00
b24e83be74 Added kdtree for faster coplanar. 2019-12-02 07:15:59 -05:00
97ac88df51 Stashing progress. 2019-12-02 07:15:59 -05:00
27f1452d0a Fixed gwn (atan2 instead of atan), and some perf speedups. 2019-12-02 07:15:59 -05:00
a3ca50c7b3 Boolean coplanar cone-on-cube works.
Needed some work on coplanar faces that may have
reversed normals from projection.
2019-12-02 07:15:59 -05:00
1632e55b11 Attempt to do boolean with coplanar faces - doesn't work yet. 2019-12-02 07:15:59 -05:00
aae3b4b67a Forgot to initialize an intset. 2019-12-02 07:15:59 -05:00
d3a8855da3 Plumbed through faces that are on both sides of boolean op. 2019-12-02 07:15:59 -05:00
6945602ae3 Keep track of other orig faces besides eg for a face. 2019-12-02 07:15:59 -05:00
8ea588043c Regression tests 0-25 all pass.
Code was working but had commented out actual apply of meshchange.
2019-12-02 07:15:59 -05:00
65021f8746 clang-format 2019-12-02 07:15:59 -05:00
9c4b18597d Most regression tests now pass.
Put in option checkbox in UI so can choose old or new method.
2019-12-02 07:15:59 -05:00
f5622630c2 Stash changes. 2019-12-02 07:15:59 -05:00
230ff38946 Coplanar case works except CDT makes a face with repeated vert. 2019-12-02 07:15:59 -05:00
c66cfa01a9 Changes to master for this branch. 2019-12-02 07:15:59 -05:00
e4b24e6e0c All tri-tri non-coplanar tests work. 2019-12-02 07:15:59 -05:00
2995 changed files with 75547 additions and 56490 deletions

View File

@@ -238,6 +238,7 @@ ForEachMacros:
- LISTBASE_FOREACH_BACKWARD
- LISTBASE_FOREACH_MUTABLE
- LISTBASE_FOREACH_BACKWARD_MUTABLE
- LISTBASE_FOREACH_INDEX
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
@@ -252,8 +253,8 @@ ForEachMacros:
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
- SEQP_BEGIN
- SEQ_BEGIN
- SEQ_ALL_BEGIN
- SEQ_CURRENT_BEGIN
- SURFACE_QUAD_ITER_BEGIN
- foreach
- ED_screen_areas_iter

View File

@@ -12,12 +12,8 @@ Checks: >
-readability-misleading-indentation,
-readability-else-after-return,
-readability-inconsistent-declaration-parameter-name,
-readability-redundant-preprocessor,
-readability-function-size,
-readability-function-size,
-readability-redundant-string-init,
-readability-redundant-member-init,
-readability-const-return-type,
-readability-static-accessed-through-instance,
@@ -35,11 +31,6 @@ Checks: >
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-incorrect-roundings,
-bugprone-suspicious-string-compare,
-bugprone-not-null-terminated-result,
-bugprone-suspicious-missing-comma,
-bugprone-parent-virtual-call,
-bugprone-infinite-loop,
-bugprone-copy-constructor-init,
WarningsAsErrors: '*'

View File

@@ -41,7 +41,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
endif()
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)
# Prever LEGACY OpenGL to eb compatible with all the existing releases and
# platforms which don't hare GLVND yet. Only do it if preference was not set
@@ -102,6 +102,11 @@ if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
endif()
# find_package() uses <PackageName>_ROOT variables.
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
#-----------------------------------------------------------------------------
# Load some macros.
include(build_files/cmake/macros.cmake)
@@ -183,6 +188,7 @@ if(APPLE)
else()
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" ON)
endif()
option(WITH_GMP "Enable features depending on GMP (Exact Boolean)" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
@@ -214,6 +220,8 @@ if(WITH_GHOST_X11)
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
endif()
option(WITH_GMP "Use the gmp library for more accurate booleans" OFF)
# Misc...
option(WITH_HEADLESS "Build without graphical support (renderfarm, server mode only)" OFF)
mark_as_advanced(WITH_HEADLESS)
@@ -428,6 +436,10 @@ if(WIN32)
option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ON)
endif()
# This should be turned off when Blender enter beta/rc/release
option(WITH_EXPERIMENTAL_FEATURES "Enable experimental features (still need to enable them in the user preferences)" ON)
mark_as_advanced(WITH_EXPERIMENTAL_FEATURES)
# Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
@@ -1560,6 +1572,12 @@ endif()
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
# Make MSVC properly report the value of the __cplusplus preprocessor macro
# Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
# of the C++ standard chosen above
if(MSVC_VERSION GREATER 1913)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
endif()
elseif(
CMAKE_COMPILER_IS_GNUCC OR
CMAKE_C_COMPILER_ID MATCHES "Clang" OR
@@ -1722,6 +1740,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_QUADRIFLOW)
info_cfg_option(WITH_USD)
info_cfg_option(WITH_TBB)
info_cfg_option(WITH_GMP)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)

View File

@@ -57,7 +57,6 @@ include(cmake/zlib.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
include(cmake/boost.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/openexr.cmake)
@@ -89,6 +88,8 @@ include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/numpy.cmake)
include(cmake/usd.cmake)
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
@@ -117,7 +118,9 @@ if(WIN32)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/gmp.cmake)
include(cmake/openjpeg.cmake)
include(cmake/gmp.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)

View File

@@ -19,17 +19,6 @@
set(BOOST_ADDRESS_MODEL 64)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
@@ -60,6 +49,21 @@ else()
endif()
endif()
if(WITH_BOOST_PYTHON)
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
set(BOOST_PYTHON_OPTIONS
--with-python
--user-config=${JAM_FILE}
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(BOOST_PYTHON_OPTIONS
${BOOST_PYTHON_OPTIONS}
define=BOOST_DEBUG_PYTHON
)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
@@ -76,6 +80,7 @@ set(BOOST_OPTIONS
-sNO_LZMA=1
-sNO_ZSTD=1
${BOOST_TOOLSET}
${BOOST_PYTHON_OPTIONS}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
@@ -92,3 +97,11 @@ ExternalProject_Add(external_boost
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WITH_BOOST_PYTHON)
add_dependencies(
external_boost
external_python
external_numpy
)
endif()

View File

@@ -95,8 +95,6 @@ ExternalProject_Add(external_ffmpeg
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport

View File

@@ -0,0 +1,88 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GMP_EXTRA_ARGS -enable-cxx)
if(WIN32)
# Shared for windows because static libs will drag in a libgcc dependency.
set(GMP_OPTIONS --disable-static --enable-shared --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
else()
set(GMP_OPTIONS --enable-static --disable-shared )
endif()
ExternalProject_Add(external_gmp
URL ${GMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmp
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make install
INSTALL_DIR ${LIBDIR}/gmp
)
if(MSVC)
set_target_properties(external_gmp PROPERTIES FOLDER Mingw)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
DEPENDEES install
)
endif()
if(WIN32)
# gmpxx is somewhat special, it builds on top of the C style gmp library but exposes C++ bindings
# given the C++ ABI between MSVC and mingw is not compatible, we need to build the bindings
# with MSVC, while GMP can only be build with mingw.
ExternalProject_Add(external_gmpxx
URL ${GMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmpxx
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_gmpxx.txt ${BUILD_DIR}/gmpxx/src/external_gmpxx/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/config_gmpxx.h ${BUILD_DIR}/gmpxx/src/external_gmpxx/config.h
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
INSTALL_DIR ${LIBDIR}/gmpxx
)
set_target_properties(external_gmpxx PROPERTIES FOLDER Mingw)
add_dependencies(
external_gmpxx
external_gmp
)
ExternalProject_Add_Step(external_gmpxx after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmpxx/ ${HARVEST_TARGET}/gmp
DEPENDEES install
)
endif()

View File

@@ -89,6 +89,8 @@ harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(glew/include glew/include "*.h")
harvest(glew/lib glew/lib "*.a")
harvest(gmp/include gmp/include "*.h")
harvest(gmp/lib gmp/lib "*.a")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")

View File

@@ -73,4 +73,3 @@ if(WIN32)
external_flexbison
)
endif()

View File

@@ -20,6 +20,14 @@ if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
if(WIN32)
set(OPENVDB_SHARED ON)
set(OPENVDB_STATIC OFF)
else()
set(OPENVDB_SHARED OFF)
set(OPENVDB_STATIC ON)
endif()
set(OPENVDB_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
@@ -42,8 +50,10 @@ set(OPENVDB_EXTRA_ARGS
-DOPENEXR_LIBRARYDIR=${LIBDIR}/openexr/lib
# All libs live in openexr, even the ilmbase ones
-DILMBASE_LIBRARYDIR=${LIBDIR}/openexr/lib
-DOPENVDB_CORE_SHARED=Off
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
-DOPENVDB_BUILD_BINARIES=Off
-DCMAKE_DEBUG_POSTFIX=_d
)
if(WIN32)
@@ -87,13 +97,15 @@ if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb_d.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb_d.dll ${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
DEPENDEES install
)
endif()

View File

@@ -20,6 +20,7 @@ if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
@@ -194,18 +195,6 @@ set(DEFAULT_CMAKE_FLAGS
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
# We need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})

View File

@@ -42,7 +42,7 @@ if(WIN32)
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)

View File

@@ -312,6 +312,11 @@ set(NASM_HASH f4fd1329b1713e1ccd34b2fc121c4bcd278c9f91cc4cb205ae8fcd2e4728dd14)
set(XR_OPENXR_SDK_VERSION 1.0.8)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07)
set(ISPC_VERSION v1.13.0)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
set(ISPC_HASH 4bf5e8d0020c4b9980faa702c1a6f25f)
set(GMP_VERSION 6.2.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1)

View File

@@ -374,71 +374,96 @@ NO_BUILD=false
NO_CONFIRM=false
USE_CXX11=true
# Note about versions: Min is inclusive, Max is exclusive (i.e. XXX_VERSION_MIN <= ACTUAL_VERSION < XXX_VERSION_MAX)
# XXX_VERSION is officially supported/used version in official builds.
# XXX_VERSION_SHORT is used for various things, like preferred version (when distribution provides several of them),
# and to name shortcuts to built libraries' installation directories...
CLANG_FORMAT_VERSION_MIN="6.0"
CLANG_FORMAT_VERSION_MAX="10.0"
PYTHON_VERSION="3.7.7"
PYTHON_VERSION_SHORT="3.7"
PYTHON_VERSION_MIN="3.7"
PYTHON_VERSION_MAX="3.9"
PYTHON_VERSION_INSTALLED=$PYTHON_VERSION_MIN
PYTHON_FORCE_BUILD=false
PYTHON_FORCE_REBUILD=false
PYTHON_SKIP=false
NUMPY_VERSION="1.17.0"
NUMPY_VERSION="1.17.5"
NUMPY_VERSION_SHORT="1.17"
NUMPY_VERSION_MIN="1.8"
NUMPY_VERSION_MAX="2.0"
NUMPY_FORCE_BUILD=false
NUMPY_FORCE_REBUILD=false
NUMPY_SKIP=false
BOOST_VERSION="1.70.0"
BOOST_VERSION_SHORT="1.70"
BOOST_VERSION_MIN="1.49"
BOOST_VERSION_MAX="2.0"
BOOST_FORCE_BUILD=false
BOOST_FORCE_REBUILD=false
BOOST_SKIP=false
TBB_VERSION="2019"
TBB_VERSION_SHORT="2019"
TBB_VERSION_UPDATE="_U9" # Used for source packages...
TBB_VERSION_MIN="2018"
TBB_VERSION_MAX="2021"
TBB_FORCE_BUILD=false
TBB_FORCE_REBUILD=false
TBB_SKIP=false
OCIO_VERSION="1.1.0"
OCIO_VERSION="1.1.1"
OCIO_VERSION_SHORT="1.1"
OCIO_VERSION_MIN="1.0"
OCIO_VERSION_MAX="1.2"
OCIO_FORCE_BUILD=false
OCIO_FORCE_REBUILD=false
OCIO_SKIP=false
OPENEXR_VERSION="2.4.0"
OPENEXR_VERSION_SHORT="2.4"
OPENEXR_VERSION_MIN="2.3"
OPENEXR_VERSION_MAX="3.0"
OPENEXR_FORCE_BUILD=false
OPENEXR_FORCE_REBUILD=false
OPENEXR_SKIP=false
_with_built_openexr=false
OIIO_VERSION="1.8.13"
OIIO_VERSION_MIN="1.8.13"
OIIO_VERSION_MAX="99.99.0" # UNKNOWN currently # Not supported by current OSL...
OIIO_VERSION="2.1.15.0"
OIIO_VERSION_SHORT="2.1"
OIIO_VERSION_MIN="1.8"
OIIO_VERSION_MAX="3.0"
OIIO_FORCE_BUILD=false
OIIO_FORCE_REBUILD=false
OIIO_SKIP=false
LLVM_VERSION="9.0.1"
LLVM_VERSION_SHORT="9.0"
LLVM_VERSION_MIN="6.0"
LLVM_VERSION_MAX="11.0"
LLVM_VERSION_FOUND=""
LLVM_FORCE_BUILD=false
LLVM_FORCE_REBUILD=false
LLVM_SKIP=false
# OSL needs to be compiled for now!
OSL_VERSION="1.10.9"
OSL_VERSION_MIN=$OSL_VERSION
OSL_VERSION="1.10.10"
OSL_VERSION_SHORT="1.10"
OSL_VERSION_MIN="1.10"
OSL_VERSION_MAX="2.0"
OSL_FORCE_BUILD=false
OSL_FORCE_REBUILD=false
OSL_SKIP=false
# OpenSubdiv needs to be compiled for now
OSD_VERSION="3.4.3"
OSD_VERSION_MIN=$OSD_VERSION
OSD_VERSION_SHORT="3.4"
OSD_VERSION_MIN="3.4"
OSD_VERSION_MAX="4.0"
OSD_FORCE_BUILD=false
OSD_FORCE_REBUILD=false
OSD_SKIP=false
@@ -447,46 +472,69 @@ OSD_SKIP=false
OPENVDB_BLOSC_VERSION="1.5.0"
OPENVDB_VERSION="7.0.0"
OPENVDB_VERSION_MIN=$OPENVDB_VERSION
OPENVDB_VERSION_SHORT="7.0"
OPENVDB_VERSION_MIN="7.0"
OPENVDB_VERSION_MAX="8.0"
OPENVDB_FORCE_BUILD=false
OPENVDB_FORCE_REBUILD=false
OPENVDB_SKIP=false
# Alembic needs to be compiled for now
ALEMBIC_VERSION="1.7.12"
ALEMBIC_VERSION_MIN=$ALEMBIC_VERSION
ALEMBIC_VERSION_SHORT="1.7"
ALEMBIC_VERSION_MIN="1.7"
ALEMBIC_VERSION_MAX="2.0"
ALEMBIC_FORCE_BUILD=false
ALEMBIC_FORCE_REBUILD=false
ALEMBIC_SKIP=false
USD_VERSION="20.05"
USD_VERSION_SHORT="20.05"
USD_VERSION_MIN="20.05"
USD_VERSION_MAX="20.06"
USD_FORCE_BUILD=false
USD_FORCE_REBUILD=false
USD_SKIP=false
OPENCOLLADA_VERSION="1.6.68"
OPENCOLLADA_VERSION_SHORT="1.6"
OPENCOLLADA_VERSION_MIN="1.6.68"
OPENCOLLADA_VERSION_MAX="1.7"
OPENCOLLADA_FORCE_BUILD=false
OPENCOLLADA_FORCE_REBUILD=false
OPENCOLLADA_SKIP=false
EMBREE_VERSION="3.10.0"
EMBREE_VERSION_SHORT="3.10"
EMBREE_VERSION_MIN="3.10"
EMBREE_VERSION_MAX="4.0"
EMBREE_FORCE_BUILD=false
EMBREE_FORCE_REBUILD=false
EMBREE_SKIP=false
OIDN_VERSION="1.0.0"
OIDN_VERSION="1.2.1"
OIDN_VERSION_SHORT="1.2"
OIDN_VERSION_MIN="1.2.0"
OIDN_VERSION_MAX="1.3"
OIDN_FORCE_BUILD=false
OIDN_FORCE_REBUILD=false
OIDN_SKIP=false
ISPC_VERSION="1.14.0"
FFMPEG_VERSION="4.2.3"
FFMPEG_VERSION_MIN="2.8.4"
FFMPEG_VERSION_SHORT="4.2"
FFMPEG_VERSION_MIN="3.0"
FFMPEG_VERSION_MAX="5.0"
FFMPEG_FORCE_BUILD=false
FFMPEG_FORCE_REBUILD=false
FFMPEG_SKIP=false
_ffmpeg_list_sep=";"
XR_OPENXR_VERSION="1.0.8"
XR_OPENXR_VERSION_SHORT="1.0"
XR_OPENXR_VERSION_MIN="1.0.8"
XR_OPENXR_VERSION_MAX="2.0"
XR_OPENXR_FORCE_BUILD=false
XR_OPENXR_FORCE_REBUILD=false
XR_OPENXR_SKIP=false
@@ -634,36 +682,43 @@ while true; do
--ver-ocio)
OCIO_VERSION="$2"
OCIO_VERSION_MIN=$OCIO_VERSION
OCIO_VERSION_SHORT=$OCIO_VERSION
shift; shift; continue
;;
--ver-oiio)
OIIO_VERSION="$2"
OIIO_VERSION_MIN=$OIIO_VERSION
OIIO_VERSION_SHORT=$OIIO_VERSION
shift; shift; continue
;;
--ver-llvm)
LLVM_VERSION="$2"
LLVM_VERSION_MIN=$LLVM_VERSION
LLVM_VERSION_SHORT=$LLVM_VERSION
shift; shift; continue
;;
--ver-osl)
OSL_VERSION="$2"
OSL_VERSION_MIN=$OSL_VERSION
OSL_VERSION_SHORT=$OSL_VERSION
shift; shift; continue
;;
--ver-osd)
OSD_VERSION="$2"
OSD_VERSION_MIN=$OSD_VERSION
OSD_VERSION_SHORT=$OSD_VERSION
shift; shift; continue
;;
--ver-openvdb)
OPENVDB_VERSION="$2"
OPENVDB_VERSION_MIN=$OPENVDB_VERSION
OPENVDB_VERSION_SHORT=$OPENVDB_VERSION
shift; shift; continue
;;
--ver-xr-openxr)
XR_OPENXR_VERSION="$2"
XR_OPENXR_VERSION_MIN=$XR_OPENXR_VERSION
XR_OPENXR_VERSION_SHORT=$XR_OPENXR_VERSION
shift; shift; continue
;;
--build-all)
@@ -1005,6 +1060,8 @@ OIDN_SOURCE=( "https://github.com/OpenImageDenoise/oidn/releases/download/v${OID
#~ OIDN_REPO_UID="dabfd9c80101edae9d25a710160d12d6d963c591"
#~ OIDN_REPO_BRANCH="master"
ISPC_BINARY=( "https://github.com/ispc/ispc/releases/download/v${ISPC_VERSION}/ispc-v${ISPC_VERSION}-linux.tar.gz" )
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
XR_OPENXR_USE_REPO=false
@@ -1030,7 +1087,7 @@ Those libraries should be available as packages in all recent distributions (opt
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
* libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp.
* libsdl2, libglew, [libglewmx].\""
* libsdl2, libglew, [libgmp], [libglewmx], fontconfig.\""
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
@@ -1270,7 +1327,7 @@ _init_python() {
_src=$SRC/Python-$PYTHON_VERSION
_git=false
_inst=$INST/python-$PYTHON_VERSION
_inst_shortcut=$INST/python-$PYTHON_VERSION_MIN
_inst_shortcut=$INST/python-$PYTHON_VERSION_SHORT
}
_update_deps_python() {
@@ -1345,7 +1402,7 @@ compile_Python() {
INFO "If you want to force rebuild of this lib, use the --force-python option."
fi
run_ldconfig "python-$PYTHON_VERSION_MIN"
run_ldconfig "python-$PYTHON_VERSION_SHORT"
}
# ----------------------------------------------------------------------------
@@ -1355,8 +1412,8 @@ _init_numpy() {
_src=$SRC/numpy-$NUMPY_VERSION
_git=false
_inst=$INST/numpy-$NUMPY_VERSION
_python=$INST/python-$PYTHON_VERSION
_site=lib/python$PYTHON_VERSION_MIN/site-packages
_python=$INST/python-$PYTHON_VERSION_SHORT
_site=lib/python$PYTHON_VERSION_SHORT/site-packages
_inst_shortcut=$_python/$_site/numpy
}
@@ -1435,7 +1492,7 @@ compile_Numpy() {
_init_boost() {
_src=$SRC/boost-$BOOST_VERSION
_git=false
_inst=$INST/boost-$BOOST_VERSION
_inst=$INST/boost-$BOOST_VERSION_SHORT
_inst_shortcut=$INST/boost
}
@@ -1528,7 +1585,7 @@ compile_Boost() {
_init_tbb() {
_src=$SRC/TBB-$TBB_VERSION
_git=false
_inst=$INST/tbb-$TBB_VERSION
_inst=$INST/tbb-$TBB_VERSION_SHORT
_inst_shortcut=$INST/tbb
}
@@ -1656,7 +1713,7 @@ _init_ocio() {
else
_git=false
fi
_inst=$INST/ocio-$OCIO_VERSION
_inst=$INST/ocio-$OCIO_VERSION_SHORT
_inst_shortcut=$INST/ocio
}
@@ -1781,7 +1838,7 @@ compile_OCIO() {
_init_openexr() {
_src=$SRC/OpenEXR-$OPENEXR_VERSION
_git=false
_inst=$INST/openexr-$OPENEXR_VERSION
_inst=$INST/openexr-$OPENEXR_VERSION_SHORT
_inst_shortcut=$INST/openexr
}
@@ -1911,7 +1968,7 @@ compile_OPENEXR() {
_init_oiio() {
_src=$SRC/OpenImageIO-$OIIO_VERSION
_git=true
_inst=$INST/oiio-$OIIO_VERSION
_inst=$INST/oiio-$OIIO_VERSION_SHORT
_inst_shortcut=$INST/oiio
}
@@ -2066,7 +2123,7 @@ _init_llvm() {
_src=$SRC/LLVM-$LLVM_VERSION
_src_clang=$SRC/CLANG-$LLVM_VERSION
_git=false
_inst=$INST/llvm-$LLVM_VERSION
_inst=$INST/llvm-$LLVM_VERSION_SHORT
_inst_shortcut=$INST/llvm
}
@@ -2178,7 +2235,7 @@ compile_LLVM() {
_init_osl() {
_src=$SRC/OpenShadingLanguage-$OSL_VERSION
_git=true
_inst=$INST/osl-$OSL_VERSION
_inst=$INST/osl-$OSL_VERSION_SHORT
_inst_shortcut=$INST/osl
}
@@ -2323,7 +2380,7 @@ compile_OSL() {
_init_osd() {
_src=$SRC/OpenSubdiv-$OSD_VERSION
_git=true
_inst=$INST/osd-$OSD_VERSION
_inst=$INST/osd-$OSD_VERSION_SHORT
_inst_shortcut=$INST/osd
}
@@ -2537,7 +2594,7 @@ compile_BLOSC() {
_init_openvdb() {
_src=$SRC/openvdb-$OPENVDB_VERSION
_git=false
_inst=$INST/openvdb-$OPENVDB_VERSION
_inst=$INST/openvdb-$OPENVDB_VERSION_SHORT
_inst_shortcut=$INST/openvdb
}
@@ -2655,7 +2712,7 @@ compile_OPENVDB() {
_init_alembic() {
_src=$SRC/alembic-$ALEMBIC_VERSION
_git=false
_inst=$INST/alembic-$ALEMBIC_VERSION
_inst=$INST/alembic-$ALEMBIC_VERSION_SHORT
_inst_shortcut=$INST/alembic
}
@@ -2760,7 +2817,7 @@ compile_ALEMBIC() {
_init_usd() {
_src=$SRC/USD-$USD_VERSION
_git=false
_inst=$INST/usd-$USD_VERSION
_inst=$INST/usd-$USD_VERSION_SHORT
_inst_shortcut=$INST/usd
}
@@ -2859,7 +2916,7 @@ compile_USD() {
_init_opencollada() {
_src=$SRC/OpenCOLLADA-$OPENCOLLADA_VERSION
_git=true
_inst=$INST/opencollada-$OPENCOLLADA_VERSION
_inst=$INST/opencollada-$OPENCOLLADA_VERSION_SHORT
_inst_shortcut=$INST/opencollada
}
@@ -2965,7 +3022,7 @@ compile_OpenCOLLADA() {
_init_embree() {
_src=$SRC/embree-$EMBREE_VERSION
_git=true
_inst=$INST/embree-$EMBREE_VERSION
_inst=$INST/embree-$EMBREE_VERSION_SHORT
_inst_shortcut=$INST/embree
}
@@ -3075,10 +3132,83 @@ compile_Embree() {
# ----------------------------------------------------------------------------
# Build OpenImageDenoise
_init_ispc() {
_src=$SRC/ispc-v$ISPC_VERSION
_inst=$INST/ispc-v$ISPC_VERSION
_inst_shortcut=$INST/ispc
}
_update_deps_ispc() {
OIDN_FORCE_REBUILD=true
if [ "$_is_building" = true ]; then
OIDN_FORCE_BUILD=true
fi
}
clean_ispc() {
_init_ispc
if [ -d $_inst ]; then
_update_deps_ispc
fi
_clean
}
install_ISPC() {
# To be changed each time we make edits that would modify the compiled results!
ispc_magic=0
_init_ispc
# Clean install if needed!
magic_compile_check ispc-$ISPC_VERSION $ispc_magic
if [ $? -eq 1 ]; then
clean_ispc
fi
if [ ! -d $_inst ]; then
INFO "Installing Implicit SPMD Program Compiler v$ISPC_VERSION"
_is_building=true
# Rebuild dependencies as well!
_update_deps_ispc
prepare_opt
if [ ! -d $_src ]; then
mkdir -p $SRC
download ISPC_BINARY[@] "$_src.tar.gz"
INFO "Unpacking ISPC-v$ISPC_VERSION"
tar -C $SRC --transform "s,(.*/?)ispc-v$ISPC_VERSION-linux[^/]*(.*),\1ispc-v$ISPC_VERSION\2,x" \
-xf $_src.tar.gz
fi
mkdir -p $_inst
cp -r $_src/bin $_inst/bin
if [ -d $_inst ]; then
_create_inst_shortcut
else
ERROR "ISPC-v$ISPC_VERSION failed to install, exiting"
exit 1
fi
magic_compile_set ispc-$ISPC_VERSION $ispc_magic
cd $CWD
INFO "Done compiling ISPC-v$ISPC_VERSION!"
_is_building=false
else
INFO "Own ISPC-v$ISPC_VERSION is up to date, nothing to do!"
fi
_ispc_path_bin=$_inst/bin
run_ldconfig "ispc"
}
_init_oidn() {
_src=$SRC/oidn-$OIDN_VERSION
_git=true
_inst=$INST/oidn-$OIDN_VERSION
_inst=$INST/oidn-$OIDN_VERSION_SHORT
_inst_shortcut=$INST/oidn
}
@@ -3100,6 +3230,9 @@ compile_OIDN() {
return
fi
# Latest OIDN requires ISPC compiler tool...
install_ISPC
# To be changed each time we make edits that would modify the compiled results!
oidn_magic=9
_init_oidn
@@ -3152,6 +3285,7 @@ compile_OIDN() {
cmake_d="$cmake_d -D WITH_EXAMPLE=OFF"
cmake_d="$cmake_d -D WITH_TEST=OFF"
cmake_d="$cmake_d -D OIDN_STATIC_LIB=ON"
cmake_d="$cmake_d -D ISPC_DIR_HINT=$_ispc_path_bin"
if [ -d $INST/tbb ]; then
make_d="$make_d TBB_ROOT=$INST/tbb"
@@ -3187,7 +3321,7 @@ compile_OIDN() {
_init_ffmpeg() {
_src=$SRC/ffmpeg-$FFMPEG_VERSION
_inst=$INST/ffmpeg-$FFMPEG_VERSION
_inst=$INST/ffmpeg-$FFMPEG_VERSION_SHORT
_inst_shortcut=$INST/ffmpeg
}
@@ -3316,7 +3450,7 @@ compile_FFmpeg() {
_init_xr_openxr_sdk() {
_src=$SRC/XR-OpenXR-SDK-$XR_OPENXR_VERSION
_git=true
_inst=$INST/xr-openxr-sdk-$XR_OPENXR_VERSION
_inst=$INST/xr-openxr-sdk-$XR_OPENXR_VERSION_SHORT
_inst_shortcut=$INST/xr-openxr-sdk
}
@@ -3520,11 +3654,12 @@ install_DEB() {
THEORA_DEV="libtheora-dev"
_packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \
git libfreetype6-dev libx11-dev flex bison libxxf86vm-dev \
git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev"
libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \
libgmp-dev"
# libglewmx-dev (broken in deb testing currently...)
VORBIS_USE=true
@@ -3554,13 +3689,18 @@ install_DEB() {
PRINT ""
CLANG_FORMAT="clang-format"
check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION
if [ $? -eq 0 ]; then
_packages="$_packages $CLANG_FORMAT"
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
if [ $? -eq 0 ]; then
_packages="$_packages $CLANG_FORMAT"
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
fi
fi
if [ "$WITH_JACK" = true ]; then
@@ -3675,7 +3815,7 @@ install_DEB() {
INFO "Forced Python/NumPy building, as requested..."
_do_compile_python=true
else
check_package_version_ge_DEB python3-dev $PYTHON_VERSION_MIN
check_package_version_ge_lt_DEB python3-dev $PYTHON_VERSION_MIN $PYTHON_VERSION_MAX
if [ $? -eq 0 ]; then
PYTHON_VERSION_INSTALLED=$(echo `get_package_version_DEB python3-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
@@ -3717,7 +3857,7 @@ install_DEB() {
INFO "Forced Boost building, as requested..."
compile_Boost
else
check_package_version_ge_DEB libboost-dev $BOOST_VERSION_MIN
check_package_version_ge_lt_DEB libboost-dev $BOOST_VERSION_MIN $BOOST_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB libboost-dev
@@ -3738,7 +3878,7 @@ install_DEB() {
INFO "Forced TBB building, as requested..."
compile_TBB
else
check_package_version_ge_DEB libtbb-dev $TBB_VERSION_MIN
check_package_version_ge_lt_DEB libtbb-dev $TBB_VERSION_MIN $TBB_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB libtbb-dev
clean_TBB
@@ -3755,14 +3895,13 @@ install_DEB() {
INFO "Forced OpenColorIO building, as requested..."
compile_OCIO
else
# XXX Always force build of own OCIO, until linux distro guys update their package to default libyaml-cpp ver (0.5)!
#check_package_version_ge_DEB libopencolorio-dev $OCIO_VERSION_MIN
#if [ $? -eq 0 ]; then
#install_packages_DEB libopencolorio-dev
#clean_OCIO
#else
check_package_version_ge_lt_DEB libopencolorio-dev $OCIO_VERSION_MIN $OCIO_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB libopencolorio-dev
clean_OCIO
else
compile_OCIO
#fi
fi
fi
@@ -3773,7 +3912,7 @@ install_DEB() {
INFO "Forced ILMBase/OpenEXR building, as requested..."
compile_OPENEXR
else
check_package_version_ge_DEB libopenexr-dev $OPENEXR_VERSION_MIN
check_package_version_ge_lt_DEB libopenexr-dev $OPENEXR_VERSION_MIN $OPENEXR_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB libopenexr-dev
OPENEXR_VERSION=`get_package_version_DEB libopenexr-dev`
@@ -3792,14 +3931,13 @@ install_DEB() {
INFO "Forced OpenImageIO building, as requested..."
compile_OIIO
else
# XXX Debian Testing / Ubuntu 16.04 pulls in WAY too many deps (gtk2/opencv ?!) incl. OCIO build against libyaml-cpp0.3 so build for now...
#check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX
#if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then
# install_packages_DEB libopenimageio-dev
# clean_OIIO
#else
check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX
if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then
install_packages_DEB libopenimageio-dev
clean_OIIO
else
compile_OIIO
#fi
fi
fi
@@ -3813,11 +3951,12 @@ install_DEB() {
INFO "Forced LLVM building, as requested..."
_do_compile_llvm=true
else
check_package_DEB clang-$LLVM_VERSION_MIN
check_package_version_ge_lt_DEB llvm-dev $LLVM_VERSION_MIN $LLVM_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB llvm-$LLVM_VERSION_MIN-dev clang-$LLVM_VERSION_MIN
install_packages_DEB llvm-dev clang
have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION_MIN
LLVM_VERSION=`get_package_version_DEB llvm-dev`
LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM
else
_do_compile_llvm=true
@@ -3843,8 +3982,13 @@ install_DEB() {
INFO "Forced OpenShadingLanguage building, as requested..."
_do_compile_osl=true
else
# No package currently!
_do_compile_osl=true
check_package_version_ge_lt_DEB libopenshadinglanguage-dev $OSL_VERSION_MIN $OSL_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB libopenshadinglanguage-dev
clean_OSL
else
_do_compile_osl=true
fi
fi
if [ "$_do_compile_osl" = true ]; then
@@ -3876,7 +4020,7 @@ install_DEB() {
INFO "Forced OpenVDB building, as requested..."
compile_OPENVDB
else
check_package_version_ge_DEB libopenvdb-dev $OPENVDB_VERSION_MIN
check_package_version_ge_lt_DEB libopenvdb-dev $OPENVDB_VERSION_MIN $OPENVDB_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB libopenvdb-dev libblosc-dev
clean_OPENVDB
@@ -3937,8 +4081,14 @@ install_DEB() {
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
else
# No package currently!
_do_compile_embree=true
# There is a package, but it does not provide everything that Blender needs...
#~ check_package_version_ge_lt_DEB libembree-dev $EMBREE_VERSION_MIN $EMBREE_VERSION_MAX
#~ if [ $? -eq 0 ]; then
#~ install_packages_DEB libembree-dev
#~ clean_Embree
#~ else
_do_compile_embree=true
#~ fi
fi
if [ "$_do_compile_embree" = true ]; then
@@ -3974,7 +4124,7 @@ install_DEB() {
# XXX Debian Testing / Ubuntu 16.04 finally includes FFmpeg, so check as usual
check_package_DEB ffmpeg
if [ $? -eq 0 ]; then
check_package_version_ge_DEB ffmpeg $FFMPEG_VERSION_MIN
check_package_version_ge_lt_DEB ffmpeg $FFMPEG_VERSION_MIN $FFMPEG_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_DEB libavdevice-dev
clean_FFmpeg
@@ -4170,12 +4320,12 @@ install_RPM() {
OGG_DEV="libogg-devel"
THEORA_DEV="libtheora-devel"
_packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison \
_packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \
libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \
libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \
libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel"
libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel gmp-devel"
OPENJPEG_USE=true
VORBIS_USE=true
@@ -4298,7 +4448,7 @@ install_RPM() {
INFO "Forced Python/NumPy building, as requested..."
_do_compile_python=true
else
check_package_version_ge_RPM python3-devel $PYTHON_VERSION_MIN
check_package_version_ge_lt_RPM python3-devel $PYTHON_VERSION_MIN $PYTHON_VERSION_MAX
if [ $? -eq 0 ]; then
PYTHON_VERSION_INSTALLED=$(echo `get_package_version_RPM python3-devel` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
@@ -4308,7 +4458,7 @@ install_RPM() {
if [ "$NUMPY_SKIP" = true ]; then
WARNING "Skipping NumPy installation, as requested..."
else
check_package_version_ge_RPM python3-numpy $NUMPY_VERSION_MIN
check_package_version_ge_lt_RPM python3-numpy $NUMPY_VERSION_MIN $NUMPY_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM python3-numpy
else
@@ -4341,7 +4491,7 @@ install_RPM() {
INFO "Forced Boost building, as requested..."
_do_compile_boost=true
else
check_package_version_ge_RPM boost-devel $BOOST_VERSION_MIN
check_package_version_ge_lt_RPM boost-devel $BOOST_VERSION_MIN $BOOST_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM boost-devel
clean_Boost
@@ -4368,7 +4518,7 @@ install_RPM() {
INFO "Forced TBB building, as requested..."
compile_TBB
else
check_package_version_ge_RPM tbb-devel $TBB_VERSION_MIN
check_package_version_ge_lt_RPM tbb-devel $TBB_VERSION_MIN $TBB_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM tbb-devel
clean_TBB
@@ -4386,7 +4536,7 @@ install_RPM() {
compile_OCIO
else
if [ "$RPM" = "SUSE" ]; then
check_package_version_ge_RPM OpenColorIO-devel $OCIO_VERSION_MIN
check_package_version_ge_lt_RPM OpenColorIO-devel $OCIO_VERSION_MIN $OCIO_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM OpenColorIO-devel
clean_OCIO
@@ -4406,7 +4556,7 @@ install_RPM() {
INFO "Forced ILMBase/OpenEXR building, as requested..."
compile_OPENEXR
else
check_package_version_ge_RPM openexr-devel $OPENEXR_VERSION_MIN
check_package_version_ge_lt_RPM openexr-devel $OPENEXR_VERSION_MIN $OPENEXR_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM openexr-devel
OPENEXR_VERSION=`get_package_version_RPM openexr-devel`
@@ -4424,7 +4574,6 @@ install_RPM() {
INFO "Forced OpenImageIO building, as requested..."
compile_OIIO
else
# XXX RPM distros pulls in too much and depends on old libs, so better to build for now...
#check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX
#if [ $? -eq 0 -a $_with_built_openexr == false ]; then
# install_packages_RPM OpenImageIO-devel
@@ -4450,10 +4599,11 @@ install_RPM() {
else
CLANG_DEV="clang-devel"
fi
check_package_version_match_RPM $CLANG_DEV $LLVM_VERSION
check_package_version_ge_lt_RPM llvm-devel $LLVM_VERSION_MIN $LLVM_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM llvm-devel $CLANG_DEV
have_llvm=true
LLVM_VERSION=`get_package_version_RPM llvm-devel`
LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM
else
@@ -4480,8 +4630,18 @@ install_RPM() {
INFO "Forced OpenShadingLanguage building, as requested..."
_do_compile_osl=true
else
# No package currently!
_do_compile_osl=true
if [ "$RPM" = "SUSE" ]; then
OSL_DEV="OpenShadingLanguage-devel"
else
OSL_DEV="openshadinglanguage-devel"
fi
check_package_version_ge_lt_RPM $OSL_DEV $OSL_VERSION_MIN $OSL_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM $OSL_DEV
clean_OSL
else
_do_compile_osl=true
fi
fi
if [ "$_do_compile_osl" = true ]; then
@@ -4569,8 +4729,14 @@ install_RPM() {
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
else
# No package...
_do_compile_embree=true
# There is a package, but it does not provide everything that Blender needs...
#~ check_package_version_ge_lt_RPM embree-devel $EMBREE_VERSION_MIN $EMBREE_VERSION_MAX
#~ if [ $? -eq 0 ]; then
#~ install_packages_RPM embree-devel
#~ clean_Embree
#~ else
_do_compile_embree=true
#~ fi
fi
if [ "$_do_compile_embree" = true ]; then
@@ -4603,7 +4769,7 @@ install_RPM() {
INFO "Forced FFMpeg building, as requested..."
compile_FFmpeg
else
check_package_version_ge_RPM ffmpeg-devel $FFMPEG_VERSION_MIN
check_package_version_ge_lt_RPM ffmpeg-devel $FFMPEG_VERSION_MIN $FFMPEG_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_RPM ffmpeg ffmpeg-devel
clean_FFmpeg
@@ -4732,10 +4898,10 @@ install_ARCH() {
BASE_DEVEL=`pacman -Sgq base-devel | sed -e 's/^gcc$/gcc-multilib/g' | paste -s -d' '`
fi
_packages="$BASE_DEVEL git cmake \
_packages="$BASE_DEVEL git cmake fontconfig \
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl2 fftw \
libxml2 yaml-cpp tinyxml python-requests jemalloc"
libxml2 yaml-cpp tinyxml python-requests jemalloc gmp"
OPENJPEG_USE=true
VORBIS_USE=true
@@ -4823,7 +4989,7 @@ install_ARCH() {
INFO "Forced Python/NumPy building, as requested..."
_do_compile_python=true
else
check_package_version_ge_ARCH python $PYTHON_VERSION_MIN
check_package_version_ge_lt_ARCH python $PYTHON_VERSION_MIN $PYTHON_VERSION_MAX
if [ $? -eq 0 ]; then
PYTHON_VERSION_INSTALLED=$(echo `get_package_version_ARCH python` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
@@ -4833,7 +4999,7 @@ install_ARCH() {
if [ "$NUMPY_SKIP" = true ]; then
WARNING "Skipping NumPy installation, as requested..."
else
check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN
check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN $NUMPY_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH python-numpy
else
@@ -4865,7 +5031,7 @@ install_ARCH() {
INFO "Forced Boost building, as requested..."
compile_Boost
else
check_package_version_ge_ARCH boost $BOOST_VERSION_MIN
check_package_version_ge_lt_ARCH boost $BOOST_VERSION_MIN $BOOST_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH boost
clean_Boost
@@ -4882,7 +5048,7 @@ install_ARCH() {
INFO "Forced TBB building, as requested..."
compile_TBB
else
check_package_version_ge_ARCH intel-tbb $TBB_VERSION_MIN
check_package_version_ge_lt_ARCH intel-tbb $TBB_VERSION_MIN $TBB_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH intel-tbb
clean_TBB
@@ -4899,7 +5065,7 @@ install_ARCH() {
INFO "Forced OpenColorIO building, as requested..."
compile_OCIO
else
check_package_version_ge_ARCH opencolorio $OCIO_VERSION_MIN
check_package_version_ge_lt_ARCH opencolorio $OCIO_VERSION_MIN $OCIO_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH opencolorio
clean_OCIO
@@ -4916,7 +5082,7 @@ install_ARCH() {
INFO "Forced ILMBase/OpenEXR building, as requested..."
compile_OPENEXR
else
check_package_version_ge_ARCH openexr $OPENEXR_VERSION_MIN
check_package_version_ge_lt_ARCH openexr $OPENEXR_VERSION_MIN $OPENEXR_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH openexr
OPENEXR_VERSION=`get_package_version_ARCH openexr`
@@ -4955,7 +5121,7 @@ install_ARCH() {
INFO "Forced LLVM building, as requested..."
_do_compile_llvm=true
else
check_package_version_match_ARCH llvm $LLVM_VERSION_MIN
check_package_version_ge_lt_ARCH llvm $LLVM_VERSION_MIN $LLVM_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH llvm clang
have_llvm=true
@@ -4986,14 +5152,13 @@ install_ARCH() {
INFO "Forced OpenShadingLanguage building, as requested..."
_do_compile_osl=true
else
# XXX Compile for now due to requirement of LLVM 3.4 ...
#check_package_version_ge_ARCH openshadinglanguage $OSL_VERSION_MIN
#if [ $? -eq 0 ]; then
# install_packages_ARCH openshadinglanguage
# clean_OSL
#else
check_package_version_ge_lt_ARCH openshadinglanguage $OSL_VERSION_MIN $OSL_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH openshadinglanguage
clean_OSL
else
_do_compile_osl=true
#fi
fi
fi
if [ "$_do_compile_osl" = true ]; then
@@ -5013,7 +5178,7 @@ install_ARCH() {
INFO "Forced OpenSubdiv building, as requested..."
compile_OSD
else
check_package_version_ge_ARCH opensubdiv $OSD_VERSION_MIN
check_package_version_ge_lt_ARCH opensubdiv $OSD_VERSION_MIN $OSD_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH opensubdiv
clean_OSD
@@ -5030,7 +5195,7 @@ install_ARCH() {
INFO "Forced OpenVDB building, as requested..."
compile_OPENVDB
else
check_package_version_ge_ARCH openvdb $OPENVDB_VERSION_MIN
check_package_version_ge_lt_ARCH openvdb $OPENVDB_VERSION_MIN $OPENVDB_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH openvdb
clean_OPENVDB
@@ -5095,13 +5260,14 @@ install_ARCH() {
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
else
check_package_ARCH embree
if [ $? -eq 0 ]; then
install_packages_ARCH embree
clean_Embree
else
# There is a package, but it does not provide everything that Blender needs...
#~ check_package_version_ge_lt_ARCH embree $EMBREE_VERSION_MIN $EMBREE_VERSION_MAX
#~ if [ $? -eq 0 ]; then
#~ install_packages_ARCH embree
#~ clean_Embree
#~ else
_do_compile_embree=true
fi
#~ fi
fi
if [ "$_do_compile_embree" = true ]; then
@@ -5134,7 +5300,7 @@ install_ARCH() {
INFO "Forced FFMpeg building, as requested..."
compile_FFmpeg
else
check_package_version_ge_ARCH ffmpeg $FFMPEG_VERSION_MIN
check_package_version_ge_lt_ARCH ffmpeg $FFMPEG_VERSION_MIN $FFMPEG_VERSION_MAX
if [ $? -eq 0 ]; then
install_packages_ARCH ffmpeg
clean_FFmpeg
@@ -5411,7 +5577,8 @@ print_info() {
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*"
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
_buildargs="$_buildargs -U *EMBREE* -U *OPENIMAGEDENOISE* -U *OPENXR*"
_1="-D WITH_CODEC_SNDFILE=ON"
PRINT " $_1"

View File

@@ -0,0 +1,4 @@
using python : @PYTHON_SHORT_VERSION@ : @PYTHON_BINARY@
: @LIBDIR@/python/include @LIBDIR@/python/include/python@PYTHON_SHORT_VERSION@m/
: @LIBDIR@/python/libs
;

View File

@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.1)
project(libgmpxx)
include_directories(. cxx ${GMP_INCLUDE_DIR})
add_definitions(-D__GMP_WITHIN_GMPXX)
add_library(libgmpxx SHARED
cxx/dummy.cc
cxx/isfuns.cc
cxx/ismpf.cc
cxx/ismpq.cc
cxx/ismpz.cc
cxx/ismpznw.cc
cxx/limits.cc
cxx/osdoprnti.cc
cxx/osfuns.cc
cxx/osmpf.cc
cxx/osmpq.cc
cxx/osmpz.cc
)
target_link_libraries(libgmpxx ${GMP_LIBRARY})
install(TARGETS libgmpxx DESTINATION lib)

View File

@@ -0,0 +1,668 @@
/* config.h. Generated from config.in by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/*
Copyright 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
it under the terms of either:
* the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your
option) any later version.
or
* the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any
later version.
or both in parallel, as here.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received copies of the GNU General Public License and the
GNU Lesser General Public License along with the GNU MP Library. If not,
see https://www.gnu.org/licenses/.
*/
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* The gmp-mparam.h file (a string) the tune program should suggest updating.
*/
#define GMP_MPARAM_H_SUGGEST "./mpn/x86_64/coreisbr/gmp-mparam.h"
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
/* Define to 1 if alloca() works (via gmp-impl.h). */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */
//#define HAVE_ATTRIBUTE_CONST 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */
//#define HAVE_ATTRIBUTE_MALLOC 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX)))
*/
//#define HAVE_ATTRIBUTE_MODE 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */
//#define HAVE_ATTRIBUTE_NORETURN 1
/* Define to 1 if you have the `attr_get' function. */
/* #undef HAVE_ATTR_GET */
/* Define to 1 if tests/libtests has calling conventions checking for the CPU
*/
/* #undef HAVE_CALLING_CONVENTIONS */
/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1
/* Define to 1 if you have the `clock_gettime' function */
/* #undef HAVE_CLOCK_GETTIME */
/* Define to 1 if you have the `cputime' function. */
/* #undef HAVE_CPUTIME */
/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't.
*/
#define HAVE_DECL_FGETC 1
/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't.
*/
#define HAVE_DECL_FSCANF 1
/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
*/
#define HAVE_DECL_OPTARG 1
/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you
don't. */
#define HAVE_DECL_SYS_ERRLIST 0
/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you
don't. */
#define HAVE_DECL_SYS_NERR 0
/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't.
*/
#define HAVE_DECL_UNGETC 1
/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you
don't. */
#define HAVE_DECL_VFPRINTF 1
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define one of the following to 1 for the format of a `double'.
If your format is not among these choices, or you don't know what it is,
then leave all undefined.
IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves
swapped, as used by ARM CPUs in little endian mode. */
/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */
#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1
/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */
/* #undef HAVE_DOUBLE_VAX_D */
/* #undef HAVE_DOUBLE_VAX_G */
/* #undef HAVE_DOUBLE_CRAY_CFP */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getrusage' function. */
/* #undef HAVE_GETRUSAGE */
/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((visibility))
and __attribute__ ((alias)) */
#define HAVE_HIDDEN_ALIAS 1
/* Define one of these to 1 for the host CPU family.
If your CPU is not in any of these families, leave all undefined.
For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */
/* #undef HAVE_HOST_CPU_FAMILY_alpha */
/* #undef HAVE_HOST_CPU_FAMILY_m68k */
/* #undef HAVE_HOST_CPU_FAMILY_power */
/* #undef HAVE_HOST_CPU_FAMILY_powerpc */
/* #undef HAVE_HOST_CPU_FAMILY_x86 */
#define HAVE_HOST_CPU_FAMILY_x86_64 1
/* Define one of the following to 1 for the host CPU, as per the output of
./config.guess. If your CPU is not listed here, leave all undefined. */
/* #undef HAVE_HOST_CPU_alphaev67 */
/* #undef HAVE_HOST_CPU_alphaev68 */
/* #undef HAVE_HOST_CPU_alphaev7 */
/* #undef HAVE_HOST_CPU_m68020 */
/* #undef HAVE_HOST_CPU_m68030 */
/* #undef HAVE_HOST_CPU_m68040 */
/* #undef HAVE_HOST_CPU_m68060 */
/* #undef HAVE_HOST_CPU_m68360 */
/* #undef HAVE_HOST_CPU_powerpc604 */
/* #undef HAVE_HOST_CPU_powerpc604e */
/* #undef HAVE_HOST_CPU_powerpc750 */
/* #undef HAVE_HOST_CPU_powerpc7400 */
/* #undef HAVE_HOST_CPU_supersparc */
/* #undef HAVE_HOST_CPU_i386 */
/* #undef HAVE_HOST_CPU_i586 */
/* #undef HAVE_HOST_CPU_i686 */
/* #undef HAVE_HOST_CPU_pentium */
/* #undef HAVE_HOST_CPU_pentiummmx */
/* #undef HAVE_HOST_CPU_pentiumpro */
/* #undef HAVE_HOST_CPU_pentium2 */
/* #undef HAVE_HOST_CPU_pentium3 */
/* #undef HAVE_HOST_CPU_pentium4 */
/* #undef HAVE_HOST_CPU_core2 */
/* #undef HAVE_HOST_CPU_nehalem */
/* #undef HAVE_HOST_CPU_westmere */
/* #undef HAVE_HOST_CPU_sandybridge */
#define HAVE_HOST_CPU_ivybridge 1
/* #undef HAVE_HOST_CPU_haswell */
/* #undef HAVE_HOST_CPU_broadwell */
/* #undef HAVE_HOST_CPU_skylake */
/* #undef HAVE_HOST_CPU_silvermont */
/* #undef HAVE_HOST_CPU_goldmont */
/* #undef HAVE_HOST_CPU_k8 */
/* #undef HAVE_HOST_CPU_k10 */
/* #undef HAVE_HOST_CPU_bulldozer */
/* #undef HAVE_HOST_CPU_piledriver */
/* #undef HAVE_HOST_CPU_steamroller */
/* #undef HAVE_HOST_CPU_excavator */
/* #undef HAVE_HOST_CPU_zen */
/* #undef HAVE_HOST_CPU_bobcat */
/* #undef HAVE_HOST_CPU_jaguar */
/* #undef HAVE_HOST_CPU_s390_z900 */
/* #undef HAVE_HOST_CPU_s390_z990 */
/* #undef HAVE_HOST_CPU_s390_z9 */
/* #undef HAVE_HOST_CPU_s390_z10 */
/* #undef HAVE_HOST_CPU_s390_z196 */
/* Define to 1 iff we have a s390 with 64-bit registers. */
/* #undef HAVE_HOST_CPU_s390_zarch */
/* Define to 1 if the system has the type `intmax_t'. */
#define HAVE_INTMAX_T 1
/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <invent.h> header file. */
/* #undef HAVE_INVENT_H */
/* Define to 1 if you have the <langinfo.h> header file. */
/* #undef HAVE_LANGINFO_H */
/* Define one of these to 1 for the endianness of `mp_limb_t'.
If the endianness is not a simple big or little, or you don't know what
it is, then leave both undefined. */
/* #undef HAVE_LIMB_BIG_ENDIAN */
#define HAVE_LIMB_LITTLE_ENDIAN 1
/* Define to 1 if you have the `localeconv' function. */
#define HAVE_LOCALECONV 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if the system has the type `long double'. */
#define HAVE_LONG_DOUBLE 1
/* Define to 1 if the system has the type `long long'. */
#define HAVE_LONG_LONG 1
/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mmap' function. */
/* #undef HAVE_MMAP */
/* Define to 1 if you have the `mprotect' function. */
#define HAVE_MPROTECT 1
/* Define to 1 each of the following for which a native (ie. CPU specific)
implementation of the corresponding routine exists. */
#define HAVE_NATIVE_mpn_add_n 1
/* #undef HAVE_NATIVE_mpn_add_n_sub_n */
#define HAVE_NATIVE_mpn_add_nc 1
/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */
#define HAVE_NATIVE_mpn_addlsh1_n 1
#define HAVE_NATIVE_mpn_addlsh2_n 1
#define HAVE_NATIVE_mpn_addlsh_n 1
#define HAVE_NATIVE_mpn_addlsh1_nc 1
#define HAVE_NATIVE_mpn_addlsh2_nc 1
#define HAVE_NATIVE_mpn_addlsh_nc 1
/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addmul_1c */
#define HAVE_NATIVE_mpn_addmul_2 1
/* #undef HAVE_NATIVE_mpn_addmul_3 */
/* #undef HAVE_NATIVE_mpn_addmul_4 */
/* #undef HAVE_NATIVE_mpn_addmul_5 */
/* #undef HAVE_NATIVE_mpn_addmul_6 */
/* #undef HAVE_NATIVE_mpn_addmul_7 */
/* #undef HAVE_NATIVE_mpn_addmul_8 */
/* #undef HAVE_NATIVE_mpn_addmul_2s */
#define HAVE_NATIVE_mpn_and_n 1
#define HAVE_NATIVE_mpn_andn_n 1
#define HAVE_NATIVE_mpn_bdiv_dbm1c 1
#define HAVE_NATIVE_mpn_bdiv_q_1 1
#define HAVE_NATIVE_mpn_pi1_bdiv_q_1 1
#define HAVE_NATIVE_mpn_cnd_add_n 1
#define HAVE_NATIVE_mpn_cnd_sub_n 1
#define HAVE_NATIVE_mpn_com 1
#define HAVE_NATIVE_mpn_copyd 1
#define HAVE_NATIVE_mpn_copyi 1
/* #undef HAVE_NATIVE_mpn_div_qr_1n_pi1 */
/* #undef HAVE_NATIVE_mpn_div_qr_2 */
#define HAVE_NATIVE_mpn_divexact_1 1
/* #undef HAVE_NATIVE_mpn_divexact_by3c */
#define HAVE_NATIVE_mpn_divrem_1 1
/* #undef HAVE_NATIVE_mpn_divrem_1c */
#define HAVE_NATIVE_mpn_divrem_2 1
/* #undef HAVE_NATIVE_mpn_gcd_1 */
#define HAVE_NATIVE_mpn_gcd_11 1
/* #undef HAVE_NATIVE_mpn_gcd_22 */
#define HAVE_NATIVE_mpn_hamdist 1
#define HAVE_NATIVE_mpn_invert_limb 1
#define HAVE_NATIVE_mpn_ior_n 1
#define HAVE_NATIVE_mpn_iorn_n 1
#define HAVE_NATIVE_mpn_lshift 1
#define HAVE_NATIVE_mpn_lshiftc 1
/* #undef HAVE_NATIVE_mpn_lshsub_n */
/* #undef HAVE_NATIVE_mpn_mod_1 */
#define HAVE_NATIVE_mpn_mod_1_1p 1
/* #undef HAVE_NATIVE_mpn_mod_1c */
#define HAVE_NATIVE_mpn_mod_1s_2p 1
#define HAVE_NATIVE_mpn_mod_1s_4p 1
#define HAVE_NATIVE_mpn_mod_34lsub1 1
#define HAVE_NATIVE_mpn_modexact_1_odd 1
#define HAVE_NATIVE_mpn_modexact_1c_odd 1
#define HAVE_NATIVE_mpn_mul_1 1
#define HAVE_NATIVE_mpn_mul_1c 1
#define HAVE_NATIVE_mpn_mul_2 1
/* #undef HAVE_NATIVE_mpn_mul_3 */
/* #undef HAVE_NATIVE_mpn_mul_4 */
/* #undef HAVE_NATIVE_mpn_mul_5 */
/* #undef HAVE_NATIVE_mpn_mul_6 */
#define HAVE_NATIVE_mpn_mul_basecase 1
#define HAVE_NATIVE_mpn_mullo_basecase 1
#define HAVE_NATIVE_mpn_nand_n 1
#define HAVE_NATIVE_mpn_nior_n 1
#define HAVE_NATIVE_mpn_popcount 1
#define HAVE_NATIVE_mpn_preinv_divrem_1 1
/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */
#define HAVE_NATIVE_mpn_redc_1 1
/* #undef HAVE_NATIVE_mpn_redc_2 */
#define HAVE_NATIVE_mpn_rsblsh1_n 1
#define HAVE_NATIVE_mpn_rsblsh2_n 1
#define HAVE_NATIVE_mpn_rsblsh_n 1
#define HAVE_NATIVE_mpn_rsblsh1_nc 1
/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */
/* #undef HAVE_NATIVE_mpn_rsblsh_nc */
#define HAVE_NATIVE_mpn_rsh1add_n 1
#define HAVE_NATIVE_mpn_rsh1add_nc 1
#define HAVE_NATIVE_mpn_rsh1sub_n 1
#define HAVE_NATIVE_mpn_rsh1sub_nc 1
#define HAVE_NATIVE_mpn_rshift 1
/* #undef HAVE_NATIVE_mpn_sbpi1_bdiv_r */
#define HAVE_NATIVE_mpn_sqr_basecase 1
/* #undef HAVE_NATIVE_mpn_sqr_diagonal */
#define HAVE_NATIVE_mpn_sqr_diag_addlsh1 1
#define HAVE_NATIVE_mpn_sub_n 1
#define HAVE_NATIVE_mpn_sub_nc 1
#define HAVE_NATIVE_mpn_sublsh1_n 1
#define HAVE_NATIVE_mpn_sublsh2_n 1
/* #undef HAVE_NATIVE_mpn_sublsh_n */
/* #undef HAVE_NATIVE_mpn_sublsh1_nc */
/* #undef HAVE_NATIVE_mpn_sublsh2_nc */
/* #undef HAVE_NATIVE_mpn_sublsh_nc */
/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_submul_1c */
/* #undef HAVE_NATIVE_mpn_tabselect */
/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */
/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */
/* #undef HAVE_NATIVE_mpn_umul_ppmm */
/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */
#define HAVE_NATIVE_mpn_xor_n 1
#define HAVE_NATIVE_mpn_xnor_n 1
/* Define to 1 if you have the `nl_langinfo' function. */
/* #undef HAVE_NL_LANGINFO */
/* Define to 1 if you have the <nl_types.h> header file. */
/* #undef HAVE_NL_TYPES_H */
/* Define to 1 if you have the `obstack_vprintf' function. */
/* #undef HAVE_OBSTACK_VPRINTF */
/* Define to 1 if you have the `popen' function. */
#define HAVE_POPEN 1
/* Define to 1 if you have the `processor_info' function. */
/* #undef HAVE_PROCESSOR_INFO */
/* Define to 1 if <sys/pstat.h> `struct pst_processor' exists and contains
`psp_iticksperclktick'. */
/* #undef HAVE_PSP_ITICKSPERCLKTICK */
/* Define to 1 if you have the `pstat_getprocessor' function. */
/* #undef HAVE_PSTAT_GETPROCESSOR */
/* Define to 1 if the system has the type `ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1
/* Define to 1 if the system has the type `quad_t'. */
/* #undef HAVE_QUAD_T */
/* Define to 1 if you have the `raise' function. */
#define HAVE_RAISE 1
/* Define to 1 if you have the `read_real_time' function. */
/* #undef HAVE_READ_REAL_TIME */
/* Define to 1 if you have the `sigaction' function. */
/* #undef HAVE_SIGACTION */
/* Define to 1 if you have the `sigaltstack' function. */
/* #undef HAVE_SIGALTSTACK */
/* Define to 1 if you have the `sigstack' function. */
/* #undef HAVE_SIGSTACK */
/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */
#define HAVE_SPEED_CYCLECOUNTER 2
/* Define to 1 if you have the <sstream> header file. */
#define HAVE_SSTREAM 1
/* Define to 1 if the system has the type `stack_t'. */
/* #undef HAVE_STACK_T */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if the system has the type `std::locale'. */
#define HAVE_STD__LOCALE 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strnlen' function. */
#define HAVE_STRNLEN 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the `sysconf' function. */
/* #undef HAVE_SYSCONF */
/* Define to 1 if you have the `sysctl' function. */
/* #undef HAVE_SYSCTL */
/* Define to 1 if you have the `sysctlbyname' function. */
/* #undef HAVE_SYSCTLBYNAME */
/* Define to 1 if you have the `syssgi' function. */
/* #undef HAVE_SYSSGI */
/* Define to 1 if you have the <sys/attributes.h> header file. */
/* #undef HAVE_SYS_ATTRIBUTES_H */
/* Define to 1 if you have the <sys/iograph.h> header file. */
/* #undef HAVE_SYS_IOGRAPH_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef HAVE_SYS_MMAN_H */
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/processor.h> header file. */
/* #undef HAVE_SYS_PROCESSOR_H */
/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
/* #undef HAVE_SYS_RESOURCE_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* #undef HAVE_SYS_SYSCTL_H */
/* Define to 1 if you have the <sys/sysinfo.h> header file. */
/* #undef HAVE_SYS_SYSINFO_H */
/* Define to 1 if you have the <sys/syssgi.h> header file. */
/* #undef HAVE_SYS_SYSSGI_H */
/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */
/* Define to 1 if you have the <sys/times.h> header file. */
/* #undef HAVE_SYS_TIMES_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `times' function. */
/* #undef HAVE_TIMES */
/* Define to 1 if the system has the type `uint_least32_t'. */
#define HAVE_UINT_LEAST32_T 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vsnprintf' function and it works properly. */
/* #undef HAVE_VSNPRINTF */
/* Define to 1 for Windos/64 */
#define HOST_DOS64 1
/* Assembler local label prefix */
#define LSYM_PREFIX "L"
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Define to 1 to disable the use of inline assembly */
/* #undef NO_ASM */
/* Name of package */
#define PACKAGE "gmp"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU MP"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "GNU MP 6.2.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gmp"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "6.2.0"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* The size of `mp_limb_t', as computed by sizeof. */
#define SIZEOF_MP_LIMB_T 8
/* The size of `unsigned', as computed by sizeof. */
#define SIZEOF_UNSIGNED 4
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
/* The size of `unsigned short', as computed by sizeof. */
#define SIZEOF_UNSIGNED_SHORT 2
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* Define to 1 if sscanf requires writable inputs */
/* #undef SSCANF_WRITABLE_INPUT */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */
/* #undef TUNE_SQR_TOOM2_MAX */
/* Version number of package */
#define VERSION "6.2.0"
/* Define to 1 to enable ASSERT checking, per --enable-assert */
/* #undef WANT_ASSERT */
/* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */
/* #undef WANT_FAKE_CPUID */
/* Define to 1 when building a fat binary. */
/* #undef WANT_FAT_BINARY */
/* Define to 1 to enable FFTs for multiplication, per --enable-fft */
#define WANT_FFT 1
/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per
--enable-old-fft-full */
/* #undef WANT_OLD_FFT_FULL */
/* Define to 1 if --enable-profiling=gprof */
/* #undef WANT_PROFILING_GPROF */
/* Define to 1 if --enable-profiling=instrument */
/* #undef WANT_PROFILING_INSTRUMENT */
/* Define to 1 if --enable-profiling=prof */
/* #undef WANT_PROFILING_PROF */
/* Define one of these to 1 for the desired temporary memory allocation
method, per --enable-alloca. */
#define WANT_TMP_ALLOCA 1
/* #undef WANT_TMP_REENTRANT */
/* #undef WANT_TMP_NOTREENTRANT */
/* #undef WANT_TMP_DEBUG */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Define to 1 if the assembler understands the mulx instruction */
/* #undef X86_ASM_MULX */
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
/* #undef YYTEXT_POINTER */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#define restrict __restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */

View File

@@ -1,6 +1,6 @@
diff -Naur orig/cmake/FindIlmBase.cmake openvdb/cmake/FindIlmBase.cmake
--- orig/cmake/FindIlmBase.cmake 2019-12-06 13:11:33 -0700
+++ openvdb/cmake/FindIlmBase.cmake 2020-01-16 09:06:32 -0700
--- orig/cmake/FindIlmBase.cmake 2019-12-06 12:11:33 -0700
+++ openvdb/cmake/FindIlmBase.cmake 2020-08-12 12:48:44 -0600
@@ -225,6 +225,12 @@
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
"-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.lib"
@@ -15,8 +15,8 @@ diff -Naur orig/cmake/FindIlmBase.cmake openvdb/cmake/FindIlmBase.cmake
if(ILMBASE_USE_STATIC_LIBS)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
diff -Naur orig/cmake/FindOpenEXR.cmake openvdb/cmake/FindOpenEXR.cmake
--- orig/cmake/FindOpenEXR.cmake 2019-12-06 13:11:33 -0700
+++ openvdb/cmake/FindOpenEXR.cmake 2020-01-16 09:06:39 -0700
--- orig/cmake/FindOpenEXR.cmake 2019-12-06 12:11:33 -0700
+++ openvdb/cmake/FindOpenEXR.cmake 2020-08-12 12:48:44 -0600
@@ -218,6 +218,12 @@
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
"-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.lib"
@@ -31,9 +31,20 @@ diff -Naur orig/cmake/FindOpenEXR.cmake openvdb/cmake/FindOpenEXR.cmake
if(OPENEXR_USE_STATIC_LIBS)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
diff -Naur orig/openvdb/CMakeLists.txt openvdb/openvdb/CMakeLists.txt
--- orig/openvdb/CMakeLists.txt 2019-12-06 13:11:33 -0700
+++ openvdb/openvdb/CMakeLists.txt 2020-01-16 08:56:25 -0700
@@ -193,11 +193,12 @@
--- orig/openvdb/CMakeLists.txt 2019-12-06 12:11:33 -0700
+++ openvdb/openvdb/CMakeLists.txt 2020-08-12 14:12:26 -0600
@@ -105,7 +105,9 @@
# http://boost.2283326.n4.nabble.com/CMake-config-scripts-broken-in-1-70-td4708957.html
# https://github.com/boostorg/boost_install/commit/160c7cb2b2c720e74463865ef0454d4c4cd9ae7c
set(BUILD_SHARED_LIBS ON)
- set(Boost_USE_STATIC_LIBS OFF)
+ if(NOT WIN32) # blender links boost statically on windows
+ set(Boost_USE_STATIC_LIBS OFF)
+ endif()
endif()
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS iostreams system)
@@ -193,6 +195,7 @@
if(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()
@@ -41,33 +52,69 @@ diff -Naur orig/openvdb/CMakeLists.txt openvdb/openvdb/CMakeLists.txt
endif()
# @todo Should be target definitions
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB)
@@ -383,7 +386,12 @@
# imported targets.
if(OPENVDB_CORE_SHARED)
- add_library(openvdb_shared SHARED ${OPENVDB_LIBRARY_SOURCE_FILES})
+ if(WIN32)
+ configure_file(version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
+ add_library(openvdb_shared SHARED ${OPENVDB_LIBRARY_SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
+ else()
+ add_library(openvdb_shared SHARED ${OPENVDB_LIBRARY_SOURCE_FILES})
+ endif()
endif()
##### Core library configuration
diff -Naur orig/openvdb/cmd/CMakeLists.txt openvdb/openvdb/cmd/CMakeLists.txt
--- orig/openvdb/cmd/CMakeLists.txt 2019-12-06 13:11:33 -0700
+++ openvdb/openvdb/cmd/CMakeLists.txt 2020-01-16 08:56:25 -0700
@@ -53,7 +53,7 @@
endif()
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB)
endif()
# rpath handling
diff -Naur orig/openvdb/unittest/CMakeLists.txt openvdb/openvdb/unittest/CMakeLists.txt
--- orig/openvdb/unittest/CMakeLists.txt 2019-12-06 13:11:33 -0700
+++ openvdb/openvdb/unittest/CMakeLists.txt 2020-01-16 08:56:25 -0700
@@ -49,7 +49,7 @@
endif()
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB)
endif()
##### VDB unit tests
if(OPENVDB_CORE_STATIC)
diff -Naur orig/openvdb/version.rc.in openvdb/openvdb/version.rc.in
--- orig/openvdb/version.rc.in 1969-12-31 17:00:00 -0700
+++ openvdb/openvdb/version.rc.in 2020-08-12 14:15:01 -0600
@@ -0,0 +1,48 @@
+#include <winver.h>
+
+#define VER_FILEVERSION @OpenVDB_MAJOR_VERSION@,@OpenVDB_MINOR_VERSION@,@OpenVDB_PATCH_VERSION@,0
+#define VER_FILEVERSION_STR "@OpenVDB_MAJOR_VERSION@.@OpenVDB_MINOR_VERSION@.@OpenVDB_PATCH_VERSION@.0\0"
+
+#define VER_PRODUCTVERSION @OpenVDB_MAJOR_VERSION@,@OpenVDB_MINOR_VERSION@,@OpenVDB_PATCH_VERSION@,0
+#define VER_PRODUCTVERSION_STR "@OpenVDB_MAJOR_VERSION@.@OpenVDB_MINOR_VERSION@\0"
+
+#ifndef DEBUG
+#define VER_DEBUG 0
+#else
+#define VER_DEBUG VS_FF_DEBUG
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION VER_FILEVERSION
+PRODUCTVERSION VER_PRODUCTVERSION
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+FILEFLAGS (VER_DEBUG)
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_DLL
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "FileDescription", "OpenVDB"
+ VALUE "FileVersion", VER_FILEVERSION_STR
+ VALUE "InternalName", "OpenVDB"
+ VALUE "ProductName", "OpenVDB"
+ VALUE "ProductVersion", VER_PRODUCTVERSION_STR
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ /* The following line should only be modified for localized versions. */
+ /* It consists of any number of WORD,WORD pairs, with each pair */
+ /* describing a language,codepage combination supported by the file. */
+ /* */
+ /* For example, a file might have values "0x409,1252" indicating that it */
+ /* supports English language (0x409) in the Windows ANSI codepage (1252). */
+
+ VALUE "Translation", 0x409, 1252
+
+ END
+END

View File

@@ -33,10 +33,11 @@ def is_tool(name):
return which(name) is not None
class Builder:
def __init__(self, name, branch):
def __init__(self, name, branch, codesign):
self.name = name
self.branch = branch
self.is_release_branch = re.match("^blender-v(.*)-release$", branch) is not None
self.codesign = codesign
# Buildbot runs from build/ directory
self.blender_dir = os.path.abspath(os.path.join('..', 'blender.git'))
@@ -67,8 +68,9 @@ def create_builder_from_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('builder_name')
parser.add_argument('branch', default='master', nargs='?')
parser.add_argument("--codesign", action="store_true")
args = parser.parse_args()
return Builder(args.builder_name, args.branch)
return Builder(args.builder_name, args.branch, args.codesign)
class VersionInfo:

View File

@@ -82,6 +82,10 @@ def create_argument_parser():
type=Path,
help="Optional path to applescript to set up folder looks of DMG."
"If not provided default Blender's one is used.")
parser.add_argument(
'--codesign',
action="store_true",
help="Code sign and notarize DMG contents.")
return parser
@@ -395,7 +399,8 @@ def create_final_dmg(app_bundles: List[Path],
dmg_filepath: Path,
background_image_filepath: Path,
volume_name: str,
applescript: Path) -> None:
applescript: Path,
codesign: bool) -> None:
"""
Create DMG with all app bundles
@@ -421,7 +426,8 @@ def create_final_dmg(app_bundles: List[Path],
#
# This allows to recurs into the content of bundles without worrying about
# possible interfereice of Application symlink.
codesign_app_bundles_in_dmg(mount_directory)
if codesign:
codesign_app_bundles_in_dmg(mount_directory)
copy_background_if_needed(background_image_filepath, mount_directory)
create_applications_link(mount_directory)
@@ -434,7 +440,8 @@ def create_final_dmg(app_bundles: List[Path],
compress_dmg(writable_dmg_filepath, dmg_filepath)
writable_dmg_filepath.unlink()
codesign_and_notarize_dmg(dmg_filepath)
if codesign:
codesign_and_notarize_dmg(dmg_filepath)
def ensure_dmg_extension(filepath: Path) -> Path:
@@ -521,6 +528,7 @@ def main():
source_dir = args.source_dir.absolute()
background_image_filepath = get_background_image(args.background_image)
applescript = get_applescript(args.applescript)
codesign = args.codesign
app_bundles = collect_and_log_app_bundles(source_dir)
if not app_bundles:
@@ -535,7 +543,8 @@ def main():
dmg_filepath,
background_image_filepath,
volume_name,
applescript)
applescript,
codesign)
if __name__ == "__main__":

View File

@@ -24,7 +24,7 @@ import shutil
import buildbot_utils
def get_cmake_options(builder):
post_install_script = os.path.join(
codesign_script = os.path.join(
builder.blender_dir, 'build_files', 'buildbot', 'worker_codesign.cmake')
config_file = "build_files/cmake/config/blender_release.cmake"
@@ -36,7 +36,8 @@ def get_cmake_options(builder):
options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
elif builder.platform == 'win':
options.extend(['-G', 'Visual Studio 16 2019', '-A', 'x64'])
options.extend(['-DPOSTINSTALL_SCRIPT:PATH=' + post_install_script])
if builder.codesign:
options.extend(['-DPOSTINSTALL_SCRIPT:PATH=' + codesign_script])
elif builder.platform == 'linux':
config_file = "build_files/buildbot/config/blender_linux.cmake"

View File

@@ -117,6 +117,8 @@ def pack_mac(builder):
if info.is_development_build:
background_image = os.path.join(release_dir, 'buildbot', 'background.tif')
command += ['--background-image', background_image]
if builder.codesign:
command += ['--codesign']
command += [builder.install_dir]
buildbot_utils.call(command)
@@ -150,7 +152,8 @@ def pack_win(builder):
package_filename = package_name + '.msi'
package_filepath = os.path.join(builder.build_dir, package_filename)
sign_file_or_directory(package_filepath)
if builder.codesign:
sign_file_or_directory(package_filepath)
package_files += [(package_filepath, package_filename)]

View File

@@ -12,12 +12,8 @@
#=============================================================================
# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If ALEMBIC_ROOT_DIR was defined in the environment, use it.
@@ -51,7 +47,7 @@ FIND_LIBRARY(ALEMBIC_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set ALEMBIC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALEMBIC DEFAULT_MSG ALEMBIC_LIBRARY ALEMBIC_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Alembic DEFAULT_MSG ALEMBIC_LIBRARY ALEMBIC_INCLUDE_DIR)
IF(ALEMBIC_FOUND)
SET(ALEMBIC_LIBRARIES ${ALEMBIC_LIBRARY})

View File

@@ -11,6 +11,13 @@
# AUDASPACE_PY_INCLUDE_DIRS - the audaspace's python binding include directories
# AUDASPACE_PY_LIBRARIES - link these to use audaspace's python binding
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
IF(NOT AUDASPACE_ROOT_DIR AND NOT $ENV{AUDASPACE_ROOT_DIR} STREQUAL "")
SET(AUDASPACE_ROOT_DIR $ENV{AUDASPACE_ROOT_DIR})
ENDIF()

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2018 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If BLOSC_ROOT_DIR was defined in the environment, use it.
@@ -53,7 +49,7 @@ FIND_LIBRARY(BLOSC_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Blosc DEFAULT_MSG
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
IF(BLOSC_FOUND)

View File

@@ -17,12 +17,8 @@
#=============================================================================
# Copyright 2020 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If CLANG_TIDY_ROOT_DIR was defined in the environment, use it.

View File

@@ -10,12 +10,8 @@
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If EIGEN3_ROOT_DIR was defined in the environment, use it.

View File

@@ -7,19 +7,12 @@
# EMBREE_ROOT_DIR, The base directory to search for Embree.
# This can also be an environment variable.
# EMBREEFOUND, If false, do not try to use Embree.
#
# also defined, but not for general use are
# EMBREE_LIBRARY, where to find the Embree library.
#=============================================================================
# Copyright 2018 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If EMBREE_ROOT_DIR was defined in the environment, use it.
@@ -66,19 +59,18 @@ FOREACH(COMPONENT ${_embree_FIND_COMPONENTS})
PATH_SUFFIXES
lib64 lib
)
IF (NOT EMBREE_${UPPERCOMPONENT}_LIBRARY)
IF (EMBREE_EMBREE3_LIBRARY)
# If we can't find all the static libraries, try to fall back to the shared library if found.
# This allows building with a shared embree library
SET(_embree_LIBRARIES ${EMBREE_EMBREE3_LIBRARY})
BREAK()
ENDIF ()
ENDIF ()
LIST(APPEND _embree_LIBRARIES "${EMBREE_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
FIND_LIBRARY(EMBREE_LIBRARY
NAMES
libembree3
HINTS
${_embree_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set EMBREE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If FFTW3_ROOT_DIR was defined in the environment, use it.

View File

@@ -13,12 +13,8 @@
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If GLEW_ROOT_DIR was defined in the environment, use it.
@@ -51,7 +47,7 @@ FIND_LIBRARY(GLEW_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glew DEFAULT_MSG
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW DEFAULT_MSG
GLEW_LIBRARY GLEW_INCLUDE_DIR)
IF(GLEW_FOUND)

View File

@@ -0,0 +1,92 @@
# - Find GMP library
# Find the native GMP includes and library
# This module defines
# GMP_INCLUDE_DIRS, where to find gmp.h, Set when
# GMP_INCLUDE_DIR is found.
# GMP_LIBRARIES, libraries to link against to use GMP.
# GMP_ROOT_DIR, The base directory to search for GMP.
# This can also be an environment variable.
# GMP_FOUND, If false, do not try to use GMP.
#
# also defined, but not for general use are
# GMP_LIBRARY, where to find the GMP library.
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If GMP_ROOT_DIR was defined in the environment, use it.
IF(NOT GMP_ROOT_DIR AND NOT $ENV{GMP_ROOT_DIR} STREQUAL "")
SET(GMP_ROOT_DIR $ENV{GMP_ROOT_DIR})
ENDIF()
SET(_gmp_SEARCH_DIRS
${GMP_ROOT_DIR}
/opt/lib/gmp
)
FIND_PATH(GMP_INCLUDE_DIR
NAMES
gmp.h
HINTS
${_gmp_SEARCH_DIRS}
PATH_SUFFIXES
include/gmp
)
FIND_PATH(GMPXX_INCLUDE_DIR
NAMES
gmpxx.h
HINTS
${_gmp_SEARCH_DIRS}
PATH_SUFFIXES
include/gmp
)
FIND_LIBRARY(GMP_LIBRARY
NAMES
gmp
HINTS
${_gmp_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
FIND_LIBRARY(GMPXX_LIBRARY
NAMES
gmpxx
HINTS
${_gmp_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
if(GMP_INCLUDE_DIR)
SET(_version_regex "^#define[ \t]+__GNU_MP_VERSION[ \t]+\"([^\"]+)\".*")
file(STRINGS "${GMP_INCLUDE_DIR}/gmp.h"
GMP_VERSION REGEX "${_version_regex}")
string(REGEX REPLACE "${_version_regex}" "\\1"
GMP_VERSION "${GMP_VERSION}")
unset(_version_regex)
endif()
# handle the QUIETLY and REQUIRED arguments and set GMP_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG
GMP_LIBRARY GMPXX_LIBRARY GMP_INCLUDE_DIR GMPXX_INCLUDE_DIR)
IF(GMP_FOUND)
SET(GMP_LIBRARIES ${GMP_LIBRARY} ${GMPXX_LIBRARY})
SET(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR} ${GMPXX_INCLUDE_DIR})
ENDIF(GMP_FOUND)
MARK_AS_ADVANCED(
GMP_INCLUDE_DIR
GMP_LIBRARY
GMPXX_INCLUDE_DIR
GMPXX_LIBRARY
)

View File

@@ -12,12 +12,8 @@
#=============================================================================
# Copyright 2012 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If ICU_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If JACK_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If JEMALLOC_ROOT_DIR was defined in the environment, use it.

View File

@@ -13,12 +13,8 @@
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
if(LLVM_ROOT_DIR)

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If LZO_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OSL_ROOT_DIR was defined in the environment, use it.

View File

@@ -7,19 +7,12 @@
# OPENCOLLADA_ROOT_DIR, The base directory to search for OpenCOLLADA.
# This can also be an environment variable.
# OPENCOLLADA_FOUND, If false, do not try to use OpenCOLLADA.
#
# also defined, but not for general use are
# OPENCOLLADA_LIBRARY, where to find the OpenCOLLADA library.
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# note about include paths, there are 2 ways includes are set

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2012 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENCOLORIO_ROOT_DIR was defined in the environment, use it.

View File

@@ -21,12 +21,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENEXR_ROOT_DIR was defined in the environment, use it.

View File

@@ -10,6 +10,13 @@
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
# OPENGLES_INCLUDES - all includes needed for OpenGLES
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENGLES_ROOT_DIR was defined in the environment, use it.
IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "")
SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR})

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2019 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENIMAGEDENOISE_ROOT_DIR was defined in the environment, use it.

View File

@@ -16,12 +16,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENIMAGEIO_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENJPEG_ROOT_DIR was defined in the environment, use it.

View File

@@ -7,19 +7,12 @@
# OPENSUBDIV_ROOT_DIR, the base directory to search for OpenSubdiv.
# This can also be an environment variable.
# OPENSUBDIV_FOUND, if false, do not try to use OpenSubdiv.
#
# also defined, but not for general use are
# OPENSUBDIV_LIBRARY, where to find the OpenSubdiv library.
#=============================================================================
# Copyright 2013 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENSUBDIV_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPENVDB_ROOT_DIR was defined in the environment, use it.
@@ -53,7 +49,7 @@ FIND_LIBRARY(OPENVDB_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set OPENVDB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENVDB DEFAULT_MSG
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenVDB DEFAULT_MSG
OPENVDB_LIBRARY OPENVDB_INCLUDE_DIR)
IF(OPENVDB_FOUND)

View File

@@ -10,12 +10,8 @@
#=============================================================================
# Copyright 2019 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If OPTIX_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If PCRE_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If PUGIXML_ROOT_DIR was defined in the environment, use it.

View File

@@ -25,12 +25,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If PYTHON_ROOT_DIR was defined in the environment, use it.

View File

@@ -13,12 +13,8 @@
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If SDL2_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If LIBSNDFILE_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If SPACENAV_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If TBB_ROOT_DIR was defined in the environment, use it.

View File

@@ -12,12 +12,8 @@
#=============================================================================
# Copyright 2019 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If USD_ROOT_DIR was defined in the environment, use it.

View File

@@ -14,12 +14,8 @@
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If XML2_ROOT_DIR was defined in the environment, use it.

View File

@@ -20,12 +20,8 @@
# XR_OPENXR_SDK_LOADER_LIBRARY, where to find the OpenXR-SDK loader library.
#=============================================================================
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If XR_OPENXR_SDK_ROOT_DIR was defined in the environment, use it.
@@ -59,7 +55,7 @@ FIND_LIBRARY(XR_OPENXR_SDK_LOADER_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set XR_OPENXR_SDK_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XR_OPENXR_SDK DEFAULT_MSG
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XR_OpenXR_SDK DEFAULT_MSG
XR_OPENXR_SDK_LOADER_LIBRARY XR_OPENXR_SDK_INCLUDE_DIR)
IF(XR_OPENXR_SDK_FOUND)

View File

@@ -0,0 +1,550 @@
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#[=======================================================================[.rst:
GoogleTest
----------
.. versionadded:: 3.9
This module defines functions to help use the Google Test infrastructure. Two
mechanisms for adding tests are provided. :command:`gtest_add_tests` has been
around for some time, originally via ``find_package(GTest)``.
:command:`gtest_discover_tests` was introduced in CMake 3.10.
The (older) :command:`gtest_add_tests` scans source files to identify tests.
This is usually effective, with some caveats, including in cross-compiling
environments, and makes setting additional properties on tests more convenient.
However, its handling of parameterized tests is less comprehensive, and it
requires re-running CMake to detect changes to the list of tests.
The (newer) :command:`gtest_discover_tests` discovers tests by asking the
compiled test executable to enumerate its tests. This is more robust and
provides better handling of parameterized tests, and does not require CMake
to be re-run when tests change. However, it may not work in a cross-compiling
environment, and setting test properties is less convenient.
More details can be found in the documentation of the respective functions.
Both commands are intended to replace use of :command:`add_test` to register
tests, and will create a separate CTest test for each Google Test test case.
Note that this is in some cases less efficient, as common set-up and tear-down
logic cannot be shared by multiple test cases executing in the same instance.
However, it provides more fine-grained pass/fail information to CTest, which is
usually considered as more beneficial. By default, the CTest test name is the
same as the Google Test name (i.e. ``suite.testcase``); see also
``TEST_PREFIX`` and ``TEST_SUFFIX``.
.. command:: gtest_add_tests
Automatically add tests with CTest by scanning source code for Google Test
macros::
gtest_add_tests(TARGET target
[SOURCES src1...]
[EXTRA_ARGS arg1...]
[WORKING_DIRECTORY dir]
[TEST_PREFIX prefix]
[TEST_SUFFIX suffix]
[SKIP_DEPENDENCY]
[TEST_LIST outVar]
)
``gtest_add_tests`` attempts to identify tests by scanning source files.
Although this is generally effective, it uses only a basic regular expression
match, which can be defeated by atypical test declarations, and is unable to
fully "split" parameterized tests. Additionally, it requires that CMake be
re-run to discover any newly added, removed or renamed tests (by default,
this means that CMake is re-run when any test source file is changed, but see
``SKIP_DEPENDENCY``). However, it has the advantage of declaring tests at
CMake time, which somewhat simplifies setting additional properties on tests,
and always works in a cross-compiling environment.
The options are:
``TARGET target``
Specifies the Google Test executable, which must be a known CMake
executable target. CMake will substitute the location of the built
executable when running the test.
``SOURCES src1...``
When provided, only the listed files will be scanned for test cases. If
this option is not given, the :prop_tgt:`SOURCES` property of the
specified ``target`` will be used to obtain the list of sources.
``EXTRA_ARGS arg1...``
Any extra arguments to pass on the command line to each test case.
``WORKING_DIRECTORY dir``
Specifies the directory in which to run the discovered test cases. If this
option is not provided, the current binary directory is used.
``TEST_PREFIX prefix``
Specifies a ``prefix`` to be prepended to the name of each discovered test
case. This can be useful when the same source files are being used in
multiple calls to ``gtest_add_test()`` but with different ``EXTRA_ARGS``.
``TEST_SUFFIX suffix``
Similar to ``TEST_PREFIX`` except the ``suffix`` is appended to the name of
every discovered test case. Both ``TEST_PREFIX`` and ``TEST_SUFFIX`` may
be specified.
``SKIP_DEPENDENCY``
Normally, the function creates a dependency which will cause CMake to be
re-run if any of the sources being scanned are changed. This is to ensure
that the list of discovered tests is updated. If this behavior is not
desired (as may be the case while actually writing the test cases), this
option can be used to prevent the dependency from being added.
``TEST_LIST outVar``
The variable named by ``outVar`` will be populated in the calling scope
with the list of discovered test cases. This allows the caller to do
things like manipulate test properties of the discovered tests.
.. code-block:: cmake
include(GoogleTest)
add_executable(FooTest FooUnitTest.cxx)
gtest_add_tests(TARGET FooTest
TEST_SUFFIX .noArgs
TEST_LIST noArgsTests
)
gtest_add_tests(TARGET FooTest
EXTRA_ARGS --someArg someValue
TEST_SUFFIX .withArgs
TEST_LIST withArgsTests
)
set_tests_properties(${noArgsTests} PROPERTIES TIMEOUT 10)
set_tests_properties(${withArgsTests} PROPERTIES TIMEOUT 20)
For backward compatibility, the following form is also supported::
gtest_add_tests(exe args files...)
``exe``
The path to the test executable or the name of a CMake target.
``args``
A ;-list of extra arguments to be passed to executable. The entire
list must be passed as a single argument. Enclose it in quotes,
or pass ``""`` for no arguments.
``files...``
A list of source files to search for tests and test fixtures.
Alternatively, use ``AUTO`` to specify that ``exe`` is the name
of a CMake executable target whose sources should be scanned.
.. code-block:: cmake
include(GoogleTest)
set(FooTestArgs --foo 1 --bar 2)
add_executable(FooTest FooUnitTest.cxx)
gtest_add_tests(FooTest "${FooTestArgs}" AUTO)
.. command:: gtest_discover_tests
Automatically add tests with CTest by querying the compiled test executable
for available tests::
gtest_discover_tests(target
[EXTRA_ARGS arg1...]
[WORKING_DIRECTORY dir]
[TEST_PREFIX prefix]
[TEST_SUFFIX suffix]
[NO_PRETTY_TYPES] [NO_PRETTY_VALUES]
[PROPERTIES name1 value1...]
[TEST_LIST var]
[DISCOVERY_TIMEOUT seconds]
[XML_OUTPUT_DIR dir]
[DISCOVERY_MODE <POST_BUILD|PRE_TEST>]
)
``gtest_discover_tests()`` sets up a post-build command on the test executable
that generates the list of tests by parsing the output from running the test
with the ``--gtest_list_tests`` argument. Compared to the source parsing
approach of :command:`gtest_add_tests`, this ensures that the full list of
tests, including instantiations of parameterized tests, is obtained. Since
test discovery occurs at build time, it is not necessary to re-run CMake when
the list of tests changes.
However, it requires that :prop_tgt:`CROSSCOMPILING_EMULATOR` is properly set
in order to function in a cross-compiling environment.
Additionally, setting properties on tests is somewhat less convenient, since
the tests are not available at CMake time. Additional test properties may be
assigned to the set of tests as a whole using the ``PROPERTIES`` option. If
more fine-grained test control is needed, custom content may be provided
through an external CTest script using the :prop_dir:`TEST_INCLUDE_FILES`
directory property. The set of discovered tests is made accessible to such a
script via the ``<target>_TESTS`` variable.
The options are:
``target``
Specifies the Google Test executable, which must be a known CMake
executable target. CMake will substitute the location of the built
executable when running the test.
``EXTRA_ARGS arg1...``
Any extra arguments to pass on the command line to each test case.
``WORKING_DIRECTORY dir``
Specifies the directory in which to run the discovered test cases. If this
option is not provided, the current binary directory is used.
``TEST_PREFIX prefix``
Specifies a ``prefix`` to be prepended to the name of each discovered test
case. This can be useful when the same test executable is being used in
multiple calls to ``gtest_discover_tests()`` but with different
``EXTRA_ARGS``.
``TEST_SUFFIX suffix``
Similar to ``TEST_PREFIX`` except the ``suffix`` is appended to the name of
every discovered test case. Both ``TEST_PREFIX`` and ``TEST_SUFFIX`` may
be specified.
``NO_PRETTY_TYPES``
By default, the type index of type-parameterized tests is replaced by the
actual type name in the CTest test name. If this behavior is undesirable
(e.g. because the type names are unwieldy), this option will suppress this
behavior.
``NO_PRETTY_VALUES``
By default, the value index of value-parameterized tests is replaced by the
actual value in the CTest test name. If this behavior is undesirable
(e.g. because the value strings are unwieldy), this option will suppress
this behavior.
``PROPERTIES name1 value1...``
Specifies additional properties to be set on all tests discovered by this
invocation of ``gtest_discover_tests()``.
``TEST_LIST var``
Make the list of tests available in the variable ``var``, rather than the
default ``<target>_TESTS``. This can be useful when the same test
executable is being used in multiple calls to ``gtest_discover_tests()``.
Note that this variable is only available in CTest.
``DISCOVERY_TIMEOUT num``
Specifies how long (in seconds) CMake will wait for the test to enumerate
available tests. If the test takes longer than this, discovery (and your
build) will fail. Most test executables will enumerate their tests very
quickly, but under some exceptional circumstances, a test may require a
longer timeout. The default is 5. See also the ``TIMEOUT`` option of
:command:`execute_process`.
.. note::
In CMake versions 3.10.1 and 3.10.2, this option was called ``TIMEOUT``.
This clashed with the ``TIMEOUT`` test property, which is one of the
common properties that would be set with the ``PROPERTIES`` keyword,
usually leading to legal but unintended behavior. The keyword was
changed to ``DISCOVERY_TIMEOUT`` in CMake 3.10.3 to address this
problem. The ambiguous behavior of the ``TIMEOUT`` keyword in 3.10.1
and 3.10.2 has not been preserved.
``XML_OUTPUT_DIR dir``
If specified, the parameter is passed along with ``--gtest_output=xml:``
to test executable. The actual file name is the same as the test target,
including prefix and suffix. This should be used instead of
``EXTRA_ARGS --gtest_output=xml`` to avoid race conditions writing the
XML result output when using parallel test execution.
``DISCOVERY_MODE``
Provides greater control over when ``gtest_discover_tests()`` performs test
discovery. By default, ``POST_BUILD`` sets up a post-build command
to perform test discovery at build time. In certain scenarios, like
cross-compiling, this ``POST_BUILD`` behavior is not desirable.
By contrast, ``PRE_TEST`` delays test discovery until just prior to test
execution. This way test discovery occurs in the target environment
where the test has a better chance at finding appropriate runtime
dependencies.
``DISCOVERY_MODE`` defaults to the value of the
``CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE`` variable if it is not
passed when calling ``gtest_discover_tests()``. This provides a mechanism
for globally selecting a preferred test discovery behavior without having
to modify each call site.
#]=======================================================================]
# Save project's policies
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
#------------------------------------------------------------------------------
function(gtest_add_tests)
if (ARGC LESS 1)
message(FATAL_ERROR "No arguments supplied to gtest_add_tests()")
endif()
set(options
SKIP_DEPENDENCY
)
set(oneValueArgs
TARGET
WORKING_DIRECTORY
TEST_PREFIX
TEST_SUFFIX
TEST_LIST
)
set(multiValueArgs
SOURCES
EXTRA_ARGS
)
set(allKeywords ${options} ${oneValueArgs} ${multiValueArgs})
unset(sources)
if("${ARGV0}" IN_LIST allKeywords)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(autoAddSources YES)
else()
# Non-keyword syntax, convert to keyword form
if (ARGC LESS 3)
message(FATAL_ERROR "gtest_add_tests() without keyword options requires at least 3 arguments")
endif()
set(ARGS_TARGET "${ARGV0}")
set(ARGS_EXTRA_ARGS "${ARGV1}")
if(NOT "${ARGV2}" STREQUAL "AUTO")
set(ARGS_SOURCES "${ARGV}")
list(REMOVE_AT ARGS_SOURCES 0 1)
endif()
endif()
# The non-keyword syntax allows the first argument to be an arbitrary
# executable rather than a target if source files are also provided. In all
# other cases, both forms require a target.
if(NOT TARGET "${ARGS_TARGET}" AND NOT ARGS_SOURCES)
message(FATAL_ERROR "${ARGS_TARGET} does not define an existing CMake target")
endif()
if(NOT ARGS_WORKING_DIRECTORY)
unset(workDir)
else()
set(workDir WORKING_DIRECTORY "${ARGS_WORKING_DIRECTORY}")
endif()
if(NOT ARGS_SOURCES)
get_property(ARGS_SOURCES TARGET ${ARGS_TARGET} PROPERTY SOURCES)
endif()
unset(testList)
set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*")
set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)")
foreach(source IN LISTS ARGS_SOURCES)
if(NOT ARGS_SKIP_DEPENDENCY)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source})
endif()
file(READ "${source}" contents)
string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests "${contents}")
foreach(hit ${found_tests})
string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
# Parameterized tests have a different signature for the filter
if("x${test_type}" STREQUAL "xTEST_P")
string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" gtest_test_name ${hit})
elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST")
string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" gtest_test_name ${hit})
elseif("x${test_type}" STREQUAL "xTYPED_TEST")
string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" gtest_test_name ${hit})
else()
message(WARNING "Could not parse GTest ${hit} for adding to CTest.")
continue()
endif()
# Make sure tests disabled in GTest get disabled in CTest
if(gtest_test_name MATCHES "(^|\\.)DISABLED_")
# Add the disabled test if CMake is new enough
# Note that this check is to allow backwards compatibility so this
# module can be copied locally in projects to use with older CMake
# versions
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.8.20170401)
string(REGEX REPLACE
"(^|\\.)DISABLED_" "\\1"
orig_test_name "${gtest_test_name}"
)
set(ctest_test_name
${ARGS_TEST_PREFIX}${orig_test_name}${ARGS_TEST_SUFFIX}
)
add_test(NAME ${ctest_test_name}
${workDir}
COMMAND ${ARGS_TARGET}
--gtest_also_run_disabled_tests
--gtest_filter=${gtest_test_name}
${ARGS_EXTRA_ARGS}
)
set_tests_properties(${ctest_test_name} PROPERTIES DISABLED TRUE)
list(APPEND testList ${ctest_test_name})
endif()
else()
set(ctest_test_name ${ARGS_TEST_PREFIX}${gtest_test_name}${ARGS_TEST_SUFFIX})
add_test(NAME ${ctest_test_name}
${workDir}
COMMAND ${ARGS_TARGET}
--gtest_filter=${gtest_test_name}
${ARGS_EXTRA_ARGS}
)
list(APPEND testList ${ctest_test_name})
endif()
endforeach()
endforeach()
if(ARGS_TEST_LIST)
set(${ARGS_TEST_LIST} ${testList} PARENT_SCOPE)
endif()
endfunction()
#------------------------------------------------------------------------------
function(gtest_discover_tests TARGET)
cmake_parse_arguments(
""
"NO_PRETTY_TYPES;NO_PRETTY_VALUES"
"TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST;DISCOVERY_TIMEOUT;XML_OUTPUT_DIR;DISCOVERY_MODE"
"EXTRA_ARGS;PROPERTIES"
${ARGN}
)
if(NOT _WORKING_DIRECTORY)
set(_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endif()
if(NOT _TEST_LIST)
set(_TEST_LIST ${TARGET}_TESTS)
endif()
if(NOT _DISCOVERY_TIMEOUT)
set(_DISCOVERY_TIMEOUT 5)
endif()
if(NOT _DISCOVERY_MODE)
if(NOT CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE)
set(CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE "POST_BUILD")
endif()
set(_DISCOVERY_MODE ${CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE})
endif()
get_property(
has_counter
TARGET ${TARGET}
PROPERTY CTEST_DISCOVERED_TEST_COUNTER
SET
)
if(has_counter)
get_property(
counter
TARGET ${TARGET}
PROPERTY CTEST_DISCOVERED_TEST_COUNTER
)
math(EXPR counter "${counter} + 1")
else()
set(counter 1)
endif()
set_property(
TARGET ${TARGET}
PROPERTY CTEST_DISCOVERED_TEST_COUNTER
${counter}
)
# Define rule to generate test list for aforementioned test executable
# Blender: use _ instead of [] to avoid problems with zsh regex.
set(ctest_file_base "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_${counter}_")
set(ctest_include_file "${ctest_file_base}_include.cmake")
set(ctest_tests_file "${ctest_file_base}_tests.cmake")
get_property(crosscompiling_emulator
TARGET ${TARGET}
PROPERTY CROSSCOMPILING_EMULATOR
)
if(_DISCOVERY_MODE STREQUAL "POST_BUILD")
add_custom_command(
TARGET ${TARGET} POST_BUILD
BYPRODUCTS "${ctest_tests_file}"
COMMAND "${CMAKE_COMMAND}"
-D "TEST_TARGET=${TARGET}"
-D "TEST_EXECUTABLE=$<TARGET_FILE:${TARGET}>"
-D "TEST_EXECUTOR=${crosscompiling_emulator}"
-D "TEST_WORKING_DIR=${_WORKING_DIRECTORY}"
-D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}"
-D "TEST_PROPERTIES=${_PROPERTIES}"
-D "TEST_PREFIX=${_TEST_PREFIX}"
-D "TEST_SUFFIX=${_TEST_SUFFIX}"
-D "NO_PRETTY_TYPES=${_NO_PRETTY_TYPES}"
-D "NO_PRETTY_VALUES=${_NO_PRETTY_VALUES}"
-D "TEST_LIST=${_TEST_LIST}"
-D "CTEST_FILE=${ctest_tests_file}"
-D "TEST_DISCOVERY_TIMEOUT=${_DISCOVERY_TIMEOUT}"
-D "TEST_XML_OUTPUT_DIR=${_XML_OUTPUT_DIR}"
-P "${_GOOGLETEST_DISCOVER_TESTS_SCRIPT}"
VERBATIM
)
file(WRITE "${ctest_include_file}"
"if(EXISTS \"${ctest_tests_file}\")\n"
" include(\"${ctest_tests_file}\")\n"
"else()\n"
" add_test(${TARGET}_NOT_BUILT ${TARGET}_NOT_BUILT)\n"
"endif()\n"
)
elseif(_DISCOVERY_MODE STREQUAL "PRE_TEST")
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL
PROPERTY GENERATOR_IS_MULTI_CONFIG
)
if(GENERATOR_IS_MULTI_CONFIG)
set(ctest_tests_file "${ctest_file_base}_tests-$<CONFIG>.cmake")
endif()
string(CONCAT ctest_include_content
"if(EXISTS \"$<TARGET_FILE:${TARGET}>\")" "\n"
" if(\"$<TARGET_FILE:${TARGET}>\" IS_NEWER_THAN \"${ctest_tests_file}\")" "\n"
" include(\"${_GOOGLETEST_DISCOVER_TESTS_SCRIPT}\")" "\n"
" gtest_discover_tests_impl(" "\n"
" TEST_EXECUTABLE" " [==[" "$<TARGET_FILE:${TARGET}>" "]==]" "\n"
" TEST_EXECUTOR" " [==[" "${crosscompiling_emulator}" "]==]" "\n"
" TEST_WORKING_DIR" " [==[" "${_WORKING_DIRECTORY}" "]==]" "\n"
" TEST_EXTRA_ARGS" " [==[" "${_EXTRA_ARGS}" "]==]" "\n"
" TEST_PROPERTIES" " [==[" "${_PROPERTIES}" "]==]" "\n"
" TEST_PREFIX" " [==[" "${_TEST_PREFIX}" "]==]" "\n"
" TEST_SUFFIX" " [==[" "${_TEST_SUFFIX}" "]==]" "\n"
" NO_PRETTY_TYPES" " [==[" "${_NO_PRETTY_TYPES}" "]==]" "\n"
" NO_PRETTY_VALUES" " [==[" "${_NO_PRETTY_VALUES}" "]==]" "\n"
" TEST_LIST" " [==[" "${_TEST_LIST}" "]==]" "\n"
" CTEST_FILE" " [==[" "${ctest_tests_file}" "]==]" "\n"
" TEST_DISCOVERY_TIMEOUT" " [==[" "${_DISCOVERY_TIMEOUT}" "]==]" "\n"
" TEST_XML_OUTPUT_DIR" " [==[" "${_XML_OUTPUT_DIR}" "]==]" "\n"
" )" "\n"
" endif()" "\n"
" include(\"${ctest_tests_file}\")" "\n"
"else()" "\n"
" add_test(${TARGET}_NOT_BUILT ${TARGET}_NOT_BUILT)" "\n"
"endif()" "\n"
)
if(GENERATOR_IS_MULTI_CONFIG)
foreach(_config ${CMAKE_CONFIGURATION_TYPES})
file(GENERATE OUTPUT "${ctest_file_base}_include-${_config}.cmake" CONTENT "${ctest_include_content}" CONDITION $<CONFIG:${_config}>)
endforeach()
file(WRITE "${ctest_include_file}" "include(\"${ctest_file_base}_include-\${CTEST_CONFIGURATION_TYPE}.cmake\")")
else()
file(GENERATE OUTPUT "${ctest_file_base}_include.cmake" CONTENT "${ctest_include_content}")
file(WRITE "${ctest_include_file}" "include(\"${ctest_file_base}_include.cmake\")")
endif()
else()
message(FATAL_ERROR "Unknown DISCOVERY_MODE: ${_DISCOVERY_MODE}")
endif()
# Add discovered tests to directory TEST_INCLUDE_FILES
set_property(DIRECTORY
APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
)
endfunction()
###############################################################################
set(_GOOGLETEST_DISCOVER_TESTS_SCRIPT
${CMAKE_CURRENT_LIST_DIR}/GTestAddTests.cmake
)
# Restore project's policies
cmake_policy(POP)

View File

@@ -0,0 +1,191 @@
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
# Blender: disable ASAN leak detection when trying to discover tests.
set(ENV{ASAN_OPTIONS} "detect_leaks=0")
cmake_minimum_required(VERSION ${CMAKE_VERSION})
# Overwrite possibly existing ${_CTEST_FILE} with empty file
set(flush_tests_MODE WRITE)
# Flushes script to ${_CTEST_FILE}
macro(flush_script)
file(${flush_tests_MODE} "${_CTEST_FILE}" "${script}")
set(flush_tests_MODE APPEND)
set(script "")
endmacro()
# Flushes tests_buffer to tests
macro(flush_tests_buffer)
list(APPEND tests "${tests_buffer}")
set(tests_buffer "")
endmacro()
macro(add_command NAME)
set(_args "")
foreach(_arg ${ARGN})
if(_arg MATCHES "[^-./:a-zA-Z0-9_]")
string(APPEND _args " [==[${_arg}]==]")
else()
string(APPEND _args " ${_arg}")
endif()
endforeach()
string(APPEND script "${NAME}(${_args})\n")
string(LENGTH "${script}" _script_len)
if(${_script_len} GREATER "50000")
flush_script()
endif()
# Unsets macro local variables to prevent leakage outside of this macro.
unset(_args)
unset(_script_len)
endmacro()
function(gtest_discover_tests_impl)
cmake_parse_arguments(
""
""
"NO_PRETTY_TYPES;NO_PRETTY_VALUES;TEST_EXECUTABLE;TEST_EXECUTOR;TEST_WORKING_DIR;TEST_PREFIX;TEST_SUFFIX;TEST_LIST;CTEST_FILE;TEST_DISCOVERY_TIMEOUT;TEST_XML_OUTPUT_DIR"
"TEST_EXTRA_ARGS;TEST_PROPERTIES"
${ARGN}
)
set(prefix "${_TEST_PREFIX}")
set(suffix "${_TEST_SUFFIX}")
set(extra_args ${_TEST_EXTRA_ARGS})
set(properties ${_TEST_PROPERTIES})
set(script)
set(suite)
set(tests)
set(tests_buffer)
# Run test executable to get list of available tests
if(NOT EXISTS "${_TEST_EXECUTABLE}")
message(FATAL_ERROR
"Specified test executable does not exist.\n"
" Path: '${_TEST_EXECUTABLE}'"
)
endif()
execute_process(
COMMAND ${_TEST_EXECUTOR} "${_TEST_EXECUTABLE}" --gtest_list_tests
WORKING_DIRECTORY "${_TEST_WORKING_DIR}"
TIMEOUT ${_TEST_DISCOVERY_TIMEOUT}
OUTPUT_VARIABLE output
RESULT_VARIABLE result
)
if(NOT ${result} EQUAL 0)
string(REPLACE "\n" "\n " output "${output}")
message(FATAL_ERROR
"Error running test executable.\n"
" Path: '${_TEST_EXECUTABLE}'\n"
" Result: ${result}\n"
" Output:\n"
" ${output}\n"
)
endif()
# Preserve semicolon in test-parameters
string(REPLACE [[;]] [[\;]] output "${output}")
string(REPLACE "\n" ";" output "${output}")
# Parse output
foreach(line ${output})
# Skip header
if(NOT line MATCHES "gtest_main\\.cc")
# Do we have a module name or a test name?
if(NOT line MATCHES "^ ")
# Module; remove trailing '.' to get just the name...
string(REGEX REPLACE "\\.( *#.*)?" "" suite "${line}")
if(line MATCHES "#" AND NOT _NO_PRETTY_TYPES)
string(REGEX REPLACE "/[0-9]\\.+ +#.*= +" "/" pretty_suite "${line}")
else()
set(pretty_suite "${suite}")
endif()
string(REGEX REPLACE "^DISABLED_" "" pretty_suite "${pretty_suite}")
else()
# Test name; strip spaces and comments to get just the name...
string(REGEX REPLACE " +" "" test "${line}")
if(test MATCHES "#" AND NOT _NO_PRETTY_VALUES)
string(REGEX REPLACE "/[0-9]+#GetParam..=" "/" pretty_test "${test}")
else()
string(REGEX REPLACE "#.*" "" pretty_test "${test}")
endif()
string(REGEX REPLACE "^DISABLED_" "" pretty_test "${pretty_test}")
string(REGEX REPLACE "#.*" "" test "${test}")
if(NOT "${_TEST_XML_OUTPUT_DIR}" STREQUAL "")
set(TEST_XML_OUTPUT_PARAM "--gtest_output=xml:${_TEST_XML_OUTPUT_DIR}/${prefix}${suite}.${test}${suffix}.xml")
else()
unset(TEST_XML_OUTPUT_PARAM)
endif()
# sanitize test name for further processing downstream
set(testname "${prefix}${pretty_suite}.${pretty_test}${suffix}")
# escape \
string(REPLACE [[\]] [[\\]] testname "${testname}")
# escape ;
string(REPLACE [[;]] [[\;]] testname "${testname}")
# escape $
string(REPLACE [[$]] [[\$]] testname "${testname}")
# ...and add to script
add_command(add_test
"${testname}"
${_TEST_EXECUTOR}
"${_TEST_EXECUTABLE}"
"--gtest_filter=${suite}.${test}"
"--gtest_also_run_disabled_tests"
${TEST_XML_OUTPUT_PARAM}
${extra_args}
)
if(suite MATCHES "^DISABLED" OR test MATCHES "^DISABLED")
add_command(set_tests_properties
"${testname}"
PROPERTIES DISABLED TRUE
)
endif()
add_command(set_tests_properties
"${testname}"
PROPERTIES
WORKING_DIRECTORY "${_TEST_WORKING_DIR}"
SKIP_REGULAR_EXPRESSION "\\\\[ SKIPPED \\\\]"
${properties}
)
list(APPEND tests_buffer "${testname}")
list(LENGTH tests_buffer tests_buffer_length)
if(${tests_buffer_length} GREATER "250")
flush_tests_buffer()
endif()
endif()
endif()
endforeach()
# Create a list of all discovered tests, which users may use to e.g. set
# properties on the tests
flush_tests_buffer()
add_command(set ${_TEST_LIST} ${tests})
# Write CTest script
flush_script()
endfunction()
if(CMAKE_SCRIPT_MODE_FILE)
gtest_discover_tests_impl(
NO_PRETTY_TYPES ${NO_PRETTY_TYPES}
NO_PRETTY_VALUES ${NO_PRETTY_VALUES}
TEST_EXECUTABLE ${TEST_EXECUTABLE}
TEST_EXECUTOR ${TEST_EXECUTOR}
TEST_WORKING_DIR ${TEST_WORKING_DIR}
TEST_PREFIX ${TEST_PREFIX}
TEST_SUFFIX ${TEST_SUFFIX}
TEST_LIST ${TEST_LIST}
CTEST_FILE ${CTEST_FILE}
TEST_DISCOVERY_TIMEOUT ${TEST_DISCOVERY_TIMEOUT}
TEST_XML_OUTPUT_DIR ${TEST_XML_OUTPUT_DIR}
TEST_EXTRA_ARGS ${TEST_EXTRA_ARGS}
TEST_PROPERTIES ${TEST_PROPERTIES}
)
endif()

View File

@@ -1,12 +1,8 @@
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#
# Inspired on the Testing.cmake from Libmv
#
@@ -74,6 +70,9 @@ macro(BLENDER_SRC_GTEST_EX)
if(WITH_TBB)
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
endif()
if(WITH_GMP)
target_link_libraries(${TARGET_NAME} ${GMP_LIBRARIES})
endif()
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)

View File

@@ -15,10 +15,12 @@ set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
set(WITH_DRACO ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_GMP OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GMP ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)

View File

@@ -20,10 +20,12 @@ set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEVICE_OPTIX OFF CACHE BOOL "" FORCE)
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_GMP OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
set(WITH_GMP OFF CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER OFF CACHE BOOL "" FORCE)
set(WITH_IK_ITASC OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_CINEON OFF CACHE BOOL "" FORCE)

View File

@@ -16,10 +16,12 @@ set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
set(WITH_DRACO ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_GMP OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GMP ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)

View File

@@ -169,6 +169,26 @@ function(blender_include_dirs_sys
include_directories(SYSTEM ${_ALL_INCS})
endfunction()
# Set include paths for header files included with "*.h" syntax.
# This enables auto-complete suggestions for user header files on Xcode.
# Build process is not affected since the include paths are the same
# as in HEADER_SEARCH_PATHS.
function(blender_user_header_search_paths
name
includes
)
if(XCODE)
set(_ALL_INCS "")
foreach(_INC ${includes})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
# _ALL_INCS is a space-separated string of file paths in quotes.
set(_ALL_INCS "${_ALL_INCS} \"${_ABS_INC}\"")
endforeach()
set_target_properties(${name} PROPERTIES XCODE_ATTRIBUTE_USER_HEADER_SEARCH_PATHS "${_ALL_INCS}")
endif()
endfunction()
function(blender_source_group
name
sources
@@ -317,6 +337,7 @@ function(blender_add_lib__impl
# works fine without having the includes
# listed is helpful for IDE's (QtCreator/MSVC)
blender_source_group("${name}" "${sources}")
blender_user_header_search_paths("${name}" "${includes}")
list_assert_duplicates("${sources}")
list_assert_duplicates("${includes}")
@@ -397,7 +418,7 @@ function(setup_heavy_lib_pool)
list(APPEND _HEAVY_LIBS "cycles_device" "cycles_kernel")
endif()
if(WITH_LIBMV)
list(APPEND _HEAVY_LIBS "bf_intern_libmv")
list(APPEND _HEAVY_LIBS "extern_ceres" "bf_intern_libmv")
endif()
if(WITH_OPENVDB)
list(APPEND _HEAVY_LIBS "bf_intern_openvdb")
@@ -475,6 +496,10 @@ function(SETUP_LIBDIRS)
link_directories(${ALEMBIC_LIBPATH})
endif()
if(WITH_GMP)
link_directories(${GMP_LIBPATH})
endif()
if(WITH_GHOST_WAYLAND)
link_directories(
${wayland-client_LIBRARY_DIRS}

View File

@@ -373,8 +373,9 @@ if(WITH_CYCLES_OSL)
list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
find_path(OSL_SHADER_DIR NAMES stdosl.h PATHS ${CYCLES_OSL}/shaders)
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER AND OSL_SHADER_DIR)
set(OSL_FOUND TRUE)
else()
message(STATUS "OSL not found")
@@ -406,6 +407,15 @@ if(WITH_TBB)
find_package(TBB)
endif()
if(WITH_GMP)
find_package(GMP)
if(NOT GMP_FOUND)
set(WITH_GMP OFF)
message(STATUS "GMP not found")
endif()
endif()
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
if(WITH_OPENMP)
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
@@ -430,13 +440,21 @@ if(WITH_OPENMP)
endif()
if(WITH_XR_OPENXR)
find_package(OpenXR-SDK)
if(NOT OPENXR_SDK_FOUND)
find_package(XR_OpenXR_SDK)
if(NOT XR_OPENXR_SDK_FOUND)
message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR")
set(WITH_XR_OPENXR OFF)
endif()
endif()
if(WITH_GMP)
find_package(GMP)
if(NOT GMP_FOUND)
message(WARNING "GMP not found, disabling WITH_GMP")
set(WITH_GMP OFF)
endif()
endif()
set(EXETYPE MACOSX_BUNDLE)
set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")

View File

@@ -36,6 +36,11 @@ if(NOT DEFINED LIBDIR)
elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
set(LIBDIR ${LIBDIR_CENTOS7_ABI})
set(WITH_CXX11_ABI OFF)
if(CMAKE_COMPILER_IS_GNUCC AND
CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3)
message(FATAL_ERROR "GCC version must be at least 9.3 for precompiled libraries, found ${CMAKE_C_COMPILER_VERSION}")
endif()
endif()
# Avoid namespace pollustion.
@@ -229,10 +234,10 @@ endif()
if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
if(NOT OSL_ROOT)
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
set(OSL_ROOT ${CYCLES_OSL})
endif()
find_package_wrapper(OpenShadingLanguage)
find_package_wrapper(OSL)
if(OSL_FOUND)
if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")
# Note: --whole-archive is needed to force loading of all symbols in liboslexec,
@@ -422,14 +427,31 @@ if(WITH_TBB)
find_package_wrapper(TBB)
endif()
if(WITH_GMP)
find_package(GMP)
if(NOT GMP_FOUND)
set(WITH_GMP OFF)
message(STATUS "GMP not found")
endif()
endif()
if(WITH_XR_OPENXR)
find_package(XR-OpenXR-SDK)
find_package(XR_OpenXR_SDK)
if(NOT XR_OPENXR_SDK_FOUND)
message(WARNING "OpenXR-SDK not found, disabling WITH_XR_OPENXR")
set(WITH_XR_OPENXR OFF)
endif()
endif()
if(WITH_GMP)
find_package_wrapper(GMP)
if(NOT GMP_FOUND)
message(WARNING "GMP not found, disabling WITH_GMP")
set(WITH_GMP OFF)
endif()
endif()
if(EXISTS ${LIBDIR})
without_system_libs_end()
endif()
@@ -577,6 +599,14 @@ endif()
if(CMAKE_COMPILER_IS_GNUCC)
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
# `maybe-uninitialized` is unreliable in release builds, but fine in debug builds.
set(GCC_EXTRA_FLAGS_RELEASE "-Wno-maybe-uninitialized")
set(CMAKE_C_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
set(CMAKE_CXX_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
unset(GCC_EXTRA_FLAGS_RELEASE)
if(WITH_LINKER_GOLD)
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version

View File

@@ -136,6 +136,13 @@ add_definitions(
# MSVC11 needs _ALLOW_KEYWORD_MACROS to build
add_definitions(-D_ALLOW_KEYWORD_MACROS)
# RTTI is on by default even without this switch
# however having it in the CXX Flags makes it difficult
# to remove for individual files that want to disable it
# using the /GR- flag without generating a build warning
# that both /GR and /GR- are specified.
remove_cc_flag("/GR")
# We want to support Windows 7 level ABI
add_definitions(-D_WIN32_WINNT=0x601)
include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
@@ -416,9 +423,6 @@ if(WITH_BOOST)
if(WITH_INTERNATIONAL)
list(APPEND boost_extra_libs locale)
endif()
if(WITH_OPENVDB)
list(APPEND boost_extra_libs iostreams)
endif()
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
set(Boost_USE_MULTITHREADED ON) # suffix -mt
set(Boost_USE_STATIC_LIBS ON) # suffix -s
@@ -524,12 +528,11 @@ if(WITH_OPENCOLORIO)
endif()
if(WITH_OPENVDB)
set(BLOSC_LIBRARIES optimized ${LIBDIR}/blosc/lib/libblosc.lib debug ${LIBDIR}/blosc/lib/libblosc_d.lib)
set(OPENVDB ${LIBDIR}/openVDB)
set(OPENVDB_LIBPATH ${OPENVDB}/lib)
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
set(OPENVDB_LIBRARIES optimized ${OPENVDB_LIBPATH}/openvdb.lib debug ${OPENVDB_LIBPATH}/openvdb_d.lib ${BLOSC_LIBRARIES})
set(OPENVDB_DEFINITIONS -DNOMINMAX -DOPENVDB_STATICLIB -D_USE_MATH_DEFINES)
set(OPENVDB_LIBRARIES optimized ${OPENVDB_LIBPATH}/openvdb.lib debug ${OPENVDB_LIBPATH}/openvdb_d.lib )
set(OPENVDB_DEFINITIONS -DNOMINMAX -D_USE_MATH_DEFINES)
endif()
if(WITH_OPENIMAGEDENOISE)
@@ -750,3 +753,10 @@ if(WITH_XR_OPENXR)
set(WITH_XR_OPENXR OFF)
endif()
endif()
if(WITH_GMP)
set(GMP_INCLUDE_DIRS ${LIBDIR}/gmp/include)
set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/libgmp-10.lib optimized ${LIBDIR}/gmp/lib/libgmpxx.lib debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib)
set(GMP_ROOT_DIR ${LIBDIR}/gmp)
set(GMP_FOUND On)
endif()

View File

@@ -0,0 +1,26 @@
BSD 3-Clause License
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -20,6 +20,7 @@ from gpu_extras.presets import draw_circle_2d
offscreen = gpu.types.GPUOffScreen(512, 512)
with offscreen.bind():
bgl.glClearColor(0.0, 0.0, 0.0, 0.0)
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
with gpu.matrix.push_pop():
# reset matrices -> use normalized device coordinates [-1, 1]

View File

@@ -25,6 +25,7 @@ RING_AMOUNT = 10
offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)
with offscreen.bind():
bgl.glClearColor(0.0, 0.0, 0.0, 0.0)
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
with gpu.matrix.push_pop():
# reset matrices -> use normalized device coordinates [-1, 1]

File diff suppressed because it is too large Load Diff

View File

@@ -696,13 +696,11 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
doc = undocumented_message(module_name, type_name, identifier)
if type(descr) == GetSetDescriptorType:
fw(ident + ".. attribute:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
fw(ident + ".. attribute:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) == MemberDescriptorType: # same as above but use 'data'
fw(ident + ".. data:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
fw(ident + ".. data:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) in {MethodDescriptorType, ClassMethodDescriptorType}:
@@ -742,14 +740,11 @@ def pyprop2sphinx(ident, fw, identifier, py_prop):
'''
# readonly properties use "data" directive, variables use "attribute" directive
if py_prop.fset is None:
fw(ident + ".. data:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
fw(ident + ".. data:: %s\n\n" % identifier)
else:
fw(ident + ".. attribute:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
fw(ident + ".. attribute:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, py_prop.__doc__)
if py_prop.fset is None:
fw("\n")
fw(ident + " (readonly)\n\n")
else:
fw("\n")
@@ -915,8 +910,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
elif issubclass(value_type, (bool, int, float, str, tuple)):
# constant, not much fun we can do here except to list it.
# TODO, figure out some way to document these!
fw(".. data:: %s\n" % attribute)
fw(" :noindex:\n\n")
fw(".. data:: %s\n\n" % attribute)
write_indented_lines(" ", fw, "constant value %s" % repr(value), False)
fw("\n")
else:
@@ -1126,8 +1120,7 @@ def pycontext2sphinx(basepath):
type_descr = prop.get_type_description(
class_fmt=":class:`bpy.types.%s`", collection_id=_BPY_PROP_COLLECTION_ID)
fw(".. data:: %s\n" % prop.identifier)
fw(" :noindex:\n\n")
fw(".. data:: %s\n\n" % prop.identifier)
if prop.description:
fw(" %s\n\n" % prop.description)
@@ -1172,8 +1165,7 @@ def pycontext2sphinx(basepath):
i = 0
while char_array[i] is not None:
member = ctypes.string_at(char_array[i]).decode(encoding="ascii")
fw(".. data:: %s\n" % member)
fw(" :noindex:\n\n")
fw(".. data:: %s\n\n" % member)
member_type, is_seq = context_type_map[member]
fw(" :type: %s :class:`bpy.types.%s`\n\n" % ("sequence of " if is_seq else "", member_type))
unique.add(member)
@@ -1379,11 +1371,9 @@ def pyrna2sphinx(basepath):
type_descr = prop.get_type_description(class_fmt=":class:`%s`", collection_id=_BPY_PROP_COLLECTION_ID)
# readonly properties use "data" directive, variables properties use "attribute" directive
if 'readonly' in type_descr:
fw(" .. data:: %s\n" % prop.identifier)
fw(" :noindex:\n\n")
fw(" .. data:: %s\n\n" % prop.identifier)
else:
fw(" .. attribute:: %s\n" % prop.identifier)
fw(" :noindex:\n\n")
fw(" .. attribute:: %s\n\n" % prop.identifier)
if prop.description:
fw(" %s\n\n" % prop.description)

View File

@@ -1395,9 +1395,9 @@ PyDoc_STRVAR(M_aud_Sound_threshold_doc,
" all between to 0.\n\n"
" :arg threshold: Threshold value over which an amplitude counts\n"
" non-zero.\n\n"
":type threshold: float\n"
":return: The created :class:`Sound` object.\n"
":rtype: :class:`Sound`");
" :type threshold: float\n"
" :return: The created :class:`Sound` object.\n"
" :rtype: :class:`Sound`");
static PyObject *
Sound_threshold(Sound* self, PyObject* args)

View File

@@ -119,8 +119,8 @@ void JOSResampleReader::updateBuffer(int size, double factor, int samplesize)
P = int_to_fp(m_L) - P;\
\
end = std::floor((m_len - 1) / double(m_L) + m_P) - 1;\
if(m_cache_valid - m_n - 2 < end)\
end = m_cache_valid - m_n - 2;\
if(m_cache_valid - int(m_n) - 2 < end)\
end = m_cache_valid - int(m_n) - 2;\
\
data = buf + (m_n + 2 + end) * m_channels - 1;\
l = fp_to_int(P);\
@@ -166,8 +166,8 @@ void JOSResampleReader::updateBuffer(int size, double factor, int samplesize)
P = 0 - P;\
\
end = (int_to_fp(m_len) - P) / P_increment - 1;\
if(m_cache_valid - m_n - 2 < end)\
end = m_cache_valid - m_n - 2;\
if(m_cache_valid - int(m_n) - 2 < end)\
end = m_cache_valid - int(m_n) - 2;\
\
P += P_increment * end;\
data = buf + (m_n + 2 + end) * m_channels - 1;\

View File

@@ -419,7 +419,8 @@ if(MSVC)
# bullet is responsible for quite a few silly warnings
# suppress all of them. Not great, but they really needed
# to sort that out themselves.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
remove_cc_flag("/W3")
add_c_flag("/W0")
endif()
blender_add_lib(extern_bullet "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")

View File

@@ -0,0 +1,41 @@
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
index 9095c592d87..b831e20c2f9 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
@@ -406,17 +406,17 @@ void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& ine
#ifndef __SPU__
//not yet, return box inertia
- btScalar margin = getMargin();
+ //btScalar margin = getMargin();
btTransform ident;
ident.setIdentity();
btVector3 aabbMin,aabbMax;
- getAabb(ident,aabbMin,aabbMax);
+ getAabb(ident,aabbMin,aabbMax); // This already contains the margin
btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5);
- btScalar lx=btScalar(2.)*(halfExtents.x()+margin);
- btScalar ly=btScalar(2.)*(halfExtents.y()+margin);
- btScalar lz=btScalar(2.)*(halfExtents.z()+margin);
+ btScalar lx=btScalar(2.)*(halfExtents.x());
+ btScalar ly=btScalar(2.)*(halfExtents.y());
+ btScalar lz=btScalar(2.)*(halfExtents.z());
const btScalar x2 = lx*lx;
const btScalar y2 = ly*ly;
const btScalar z2 = lz*lz;
@@ -476,10 +476,10 @@ void btPolyhedralConvexAabbCachingShape::recalcLocalAabb()
for ( int i = 0; i < 3; ++i )
{
- m_localAabbMax[i] = _supporting[i][i] + m_collisionMargin;
- m_localAabbMin[i] = _supporting[i + 3][i] - m_collisionMargin;
+ m_localAabbMax[i] = _supporting[i][i];
+ m_localAabbMin[i] = _supporting[i + 3][i];
}
-
+
#else
for (int i=0;i<3;i++)

View File

@@ -180,7 +180,7 @@ void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVect
localHalfExtents += btVector3(getMargin(),getMargin(),getMargin());
btMatrix3x3 abs_b = trans.getBasis().absolute();
btMatrix3x3 abs_b = trans.getBasis().absolute();
btVector3 center = trans(localCenter);

View File

@@ -406,17 +406,17 @@ void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& ine
#ifndef __SPU__
//not yet, return box inertia
btScalar margin = getMargin();
//btScalar margin = getMargin();
btTransform ident;
ident.setIdentity();
btVector3 aabbMin,aabbMax;
getAabb(ident,aabbMin,aabbMax);
getAabb(ident,aabbMin,aabbMax); // This already contains the margin
btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5);
btScalar lx=btScalar(2.)*(halfExtents.x()+margin);
btScalar ly=btScalar(2.)*(halfExtents.y()+margin);
btScalar lz=btScalar(2.)*(halfExtents.z()+margin);
btScalar lx=btScalar(2.)*(halfExtents.x());
btScalar ly=btScalar(2.)*(halfExtents.y());
btScalar lz=btScalar(2.)*(halfExtents.z());
const btScalar x2 = lx*lx;
const btScalar y2 = ly*ly;
const btScalar z2 = lz*lz;
@@ -476,10 +476,10 @@ void btPolyhedralConvexAabbCachingShape::recalcLocalAabb()
for ( int i = 0; i < 3; ++i )
{
m_localAabbMax[i] = _supporting[i][i] + m_collisionMargin;
m_localAabbMin[i] = _supporting[i + 3][i] - m_collisionMargin;
m_localAabbMax[i] = _supporting[i][i];
m_localAabbMin[i] = _supporting[i + 3][i];
}
#else
for (int i=0;i<3;i++)

View File

@@ -879,7 +879,7 @@ int cuewCompilerVersion(void) {
}
/* get --version output */
strncat(command, "\"", 1);
strcat(command, "\"");
strncat(command, path, sizeof(command) - 1);
strncat(command, "\" --version", sizeof(command) - strlen(path) - 1);
pipe = popen(command, "r");

View File

@@ -64,7 +64,6 @@ endif()
if(WITH_OPENVDB)
add_definitions(-DOPENVDB=1)
add_definitions(-DOPENVDB_STATICLIB)
endif()
if(WITH_OPENVDB_BLOSC)

View File

@@ -322,6 +322,7 @@ template<class T> int readPdataUni(const std::string &name, ParticleDataImpl<T>
UniPartHeader head;
assertMsg(gzread(gzf, &head, sizeof(UniPartHeader)) == sizeof(UniPartHeader),
"can't read file, no header present");
pdata->getParticleSys()->resize(head.dim); // ensure that parent particle system has same size
pdata->resize(head.dim);
assertMsg(head.dim == pdata->size(), "pdata size doesn't match");

View File

@@ -1,3 +1,3 @@
#define MANTA_GIT_VERSION "commit 3370c2014ad7192041cb4fbed19ed74ae9725fb5"
#define MANTA_GIT_VERSION "commit e2f6e59e3679f88e5100ae2145410cca4971b9df"

View File

@@ -355,6 +355,38 @@ class GridBase : public PbClass {
return isInBounds(Vec3i(i, j, k), bnd);
}
#ifdef BLENDER
//! expose name field to Python for Blender
void setName(const std::string &name)
{
mName = name;
}
static PyObject *_W_9(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
GridBase *pbo = dynamic_cast<GridBase *>(Pb::objFromPy(_self));
bool noTiming = _args.getOpt<bool>("notiming", -1, 0);
pbPreparePlugin(pbo->getParent(), "GridBase::setName", !noTiming);
PyObject *_retval = 0;
{
ArgLocker _lock;
const std::string &name = _args.get<std::string>("name", 0, &_lock);
pbo->_args.copy(_args);
_retval = getPyNone();
pbo->setName(name);
pbo->_args.check();
}
pbFinalizePlugin(pbo->getParent(), "GridBase::setName", !noTiming);
return _retval;
}
catch (std::exception &e) {
pbSetError("GridBase::setName", e.what());
return 0;
}
}
#endif
protected:
GridType mType;
Vec3i mSize;
@@ -373,7 +405,7 @@ template<class T> class Grid : public GridBase {
public:
//! init new grid, values are set to zero
Grid(FluidSolver *parent, bool show = true);
static int _W_9(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static int _W_10(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
PbClass *obj = Pb::objFromPy(_self);
if (obj)
@@ -410,7 +442,7 @@ template<class T> class Grid : public GridBase {
typedef GridBase BASETYPE_GRID;
int save(std::string name);
static PyObject *_W_10(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_11(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -435,7 +467,7 @@ template<class T> class Grid : public GridBase {
}
int load(std::string name);
static PyObject *_W_11(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_12(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -461,7 +493,7 @@ template<class T> class Grid : public GridBase {
//! set all cells to zero
void clear();
static PyObject *_W_12(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_13(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -588,7 +620,7 @@ template<class T> class Grid : public GridBase {
// Grid<T>& operator=(const Grid<T>& a);
//! copy content from other grid (use this one instead of operator= !)
Grid<T> &copyFrom(const Grid<T> &a, bool copyType = true);
static PyObject *_W_13(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_14(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -618,7 +650,7 @@ template<class T> class Grid : public GridBase {
//! get grid type
int getGridType();
static PyObject *_W_14(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_15(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -643,7 +675,7 @@ template<class T> class Grid : public GridBase {
//! add/subtract other grid
void add(const Grid<T> &a);
static PyObject *_W_15(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_16(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -669,7 +701,7 @@ template<class T> class Grid : public GridBase {
}
void sub(const Grid<T> &a);
static PyObject *_W_16(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_17(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -696,7 +728,7 @@ template<class T> class Grid : public GridBase {
//! set all cells to constant value
void setConst(T s);
static PyObject *_W_17(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_18(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -723,7 +755,7 @@ template<class T> class Grid : public GridBase {
//! add constant to all grid cells
void addConst(T s);
static PyObject *_W_18(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_19(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -750,7 +782,7 @@ template<class T> class Grid : public GridBase {
//! add scaled other grid to current one (note, only "Real" factor, "T" type not supported here!)
void addScaled(const Grid<T> &a, const T &factor);
static PyObject *_W_19(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_20(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -778,7 +810,7 @@ template<class T> class Grid : public GridBase {
//! multiply contents of grid
void mult(const Grid<T> &a);
static PyObject *_W_20(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_21(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -805,7 +837,7 @@ template<class T> class Grid : public GridBase {
//! multiply each cell by a constant scalar value
void multConst(T s);
static PyObject *_W_21(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_22(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -832,7 +864,7 @@ template<class T> class Grid : public GridBase {
//! safely divide contents of grid (with zero check)
Grid<T> &safeDivide(const Grid<T> &a);
static PyObject *_W_22(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_23(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -858,7 +890,7 @@ template<class T> class Grid : public GridBase {
//! clamp content to range (for vec3, clamps each component separately)
void clamp(Real min, Real max);
static PyObject *_W_23(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_24(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -886,7 +918,7 @@ template<class T> class Grid : public GridBase {
//! reduce small values to zero
void stomp(const T &threshold);
static PyObject *_W_24(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_25(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -913,7 +945,7 @@ template<class T> class Grid : public GridBase {
//! permute grid axes, e.g. switch y with z (0,2,1)
void permuteAxes(int axis0, int axis1, int axis2);
static PyObject *_W_25(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_26(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -942,7 +974,7 @@ template<class T> class Grid : public GridBase {
//! permute grid axes, e.g. switch y with z (0,2,1)
void permuteAxesCopyToGrid(int axis0, int axis1, int axis2, Grid<T> &out);
static PyObject *_W_26(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_27(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -972,7 +1004,7 @@ template<class T> class Grid : public GridBase {
//! join other grid by either keeping min or max value at cell
void join(const Grid<T> &a, bool keepMax = true);
static PyObject *_W_27(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_28(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1001,7 +1033,7 @@ template<class T> class Grid : public GridBase {
// common compound operators
//! get absolute max value in grid
Real getMaxAbs() const;
static PyObject *_W_28(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_29(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1026,7 +1058,7 @@ template<class T> class Grid : public GridBase {
//! get max value in grid
Real getMax() const;
static PyObject *_W_29(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_30(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1051,7 +1083,7 @@ template<class T> class Grid : public GridBase {
//! get min value in grid
Real getMin() const;
static PyObject *_W_30(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_31(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1076,7 +1108,7 @@ template<class T> class Grid : public GridBase {
//! calculate L1 norm of grid content
Real getL1(int bnd = 0);
static PyObject *_W_31(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_32(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1102,7 +1134,7 @@ template<class T> class Grid : public GridBase {
//! calculate L2 norm of grid content
Real getL2(int bnd = 0);
static PyObject *_W_32(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_33(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1128,7 +1160,7 @@ template<class T> class Grid : public GridBase {
//! set all boundary cells to constant value (Dirichlet)
void setBound(T value, int boundaryWidth = 1);
static PyObject *_W_33(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_34(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1156,7 +1188,7 @@ template<class T> class Grid : public GridBase {
//! set all boundary cells to last inner value (Neumann)
void setBoundNeumann(int boundaryWidth = 1);
static PyObject *_W_34(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_35(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1183,7 +1215,7 @@ template<class T> class Grid : public GridBase {
//! get data pointer of grid
std::string getDataPointer();
static PyObject *_W_35(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_36(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1208,7 +1240,7 @@ template<class T> class Grid : public GridBase {
//! debugging helper, print grid from python. skip boundary of width bnd
void printGrid(int zSlice = -1, bool printIndex = false, int bnd = 1);
static PyObject *_W_36(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_37(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1276,7 +1308,7 @@ class MACGrid : public Grid<Vec3> {
{
mType = (GridType)(TypeMAC | TypeVec3);
}
static int _W_37(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static int _W_38(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
PbClass *obj = Pb::objFromPy(_self);
if (obj)
@@ -1358,7 +1390,7 @@ class MACGrid : public Grid<Vec3> {
//! set all boundary cells of a MAC grid to certain value (Dirchlet). Respects staggered grid
//! locations optionally, only set normal components
void setBoundMAC(Vec3 value, int boundaryWidth, bool normalOnly = false);
static PyObject *_W_38(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_39(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1399,7 +1431,7 @@ class FlagGrid : public Grid<int> {
{
mType = (GridType)(TypeFlags | TypeInt);
}
static int _W_39(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static int _W_40(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
PbClass *obj = Pb::objFromPy(_self);
if (obj)
@@ -1579,7 +1611,7 @@ class FlagGrid : public Grid<int> {
const std::string &inflow = " ",
const std::string &outflow = " ",
Grid<Real> *phiWalls = 0x00);
static PyObject *_W_40(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_41(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1613,7 +1645,7 @@ class FlagGrid : public Grid<int> {
//! set fluid flags inside levelset (liquids)
void updateFromLevelset(LevelsetGrid &levelset);
static PyObject *_W_41(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_42(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1640,7 +1672,7 @@ class FlagGrid : public Grid<int> {
//! set all cells (except obs/in/outflow) to type (fluid by default)
void fillGrid(int type = TypeFluid);
static PyObject *_W_42(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_43(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1669,7 +1701,7 @@ class FlagGrid : public Grid<int> {
//! warning for large grids! only regular int returned (due to python interface)
//! optionally creates mask in RealGrid (1 where flag matches, 0 otherwise)
int countCells(int flag, int bnd = 0, Grid<Real> *mask = NULL);
static PyObject *_W_43(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
static PyObject *_W_44(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);

View File

@@ -8,103 +8,103 @@ namespace Manta {
#ifdef _C_FlagGrid
static const Pb::Register _R_26("FlagGrid", "FlagGrid", "Grid<int>");
template<> const char *Namify<FlagGrid>::S = "FlagGrid";
static const Pb::Register _R_27("FlagGrid", "FlagGrid", FlagGrid::_W_39);
static const Pb::Register _R_28("FlagGrid", "initDomain", FlagGrid::_W_40);
static const Pb::Register _R_29("FlagGrid", "updateFromLevelset", FlagGrid::_W_41);
static const Pb::Register _R_30("FlagGrid", "fillGrid", FlagGrid::_W_42);
static const Pb::Register _R_31("FlagGrid", "countCells", FlagGrid::_W_43);
static const Pb::Register _R_27("FlagGrid", "FlagGrid", FlagGrid::_W_40);
static const Pb::Register _R_28("FlagGrid", "initDomain", FlagGrid::_W_41);
static const Pb::Register _R_29("FlagGrid", "updateFromLevelset", FlagGrid::_W_42);
static const Pb::Register _R_30("FlagGrid", "fillGrid", FlagGrid::_W_43);
static const Pb::Register _R_31("FlagGrid", "countCells", FlagGrid::_W_44);
#endif
#ifdef _C_Grid
static const Pb::Register _R_32("Grid<int>", "Grid<int>", "GridBase");
template<> const char *Namify<Grid<int>>::S = "Grid<int>";
static const Pb::Register _R_33("Grid<int>", "Grid", Grid<int>::_W_9);
static const Pb::Register _R_34("Grid<int>", "save", Grid<int>::_W_10);
static const Pb::Register _R_35("Grid<int>", "load", Grid<int>::_W_11);
static const Pb::Register _R_36("Grid<int>", "clear", Grid<int>::_W_12);
static const Pb::Register _R_37("Grid<int>", "copyFrom", Grid<int>::_W_13);
static const Pb::Register _R_38("Grid<int>", "getGridType", Grid<int>::_W_14);
static const Pb::Register _R_39("Grid<int>", "add", Grid<int>::_W_15);
static const Pb::Register _R_40("Grid<int>", "sub", Grid<int>::_W_16);
static const Pb::Register _R_41("Grid<int>", "setConst", Grid<int>::_W_17);
static const Pb::Register _R_42("Grid<int>", "addConst", Grid<int>::_W_18);
static const Pb::Register _R_43("Grid<int>", "addScaled", Grid<int>::_W_19);
static const Pb::Register _R_44("Grid<int>", "mult", Grid<int>::_W_20);
static const Pb::Register _R_45("Grid<int>", "multConst", Grid<int>::_W_21);
static const Pb::Register _R_46("Grid<int>", "safeDivide", Grid<int>::_W_22);
static const Pb::Register _R_47("Grid<int>", "clamp", Grid<int>::_W_23);
static const Pb::Register _R_48("Grid<int>", "stomp", Grid<int>::_W_24);
static const Pb::Register _R_49("Grid<int>", "permuteAxes", Grid<int>::_W_25);
static const Pb::Register _R_50("Grid<int>", "permuteAxesCopyToGrid", Grid<int>::_W_26);
static const Pb::Register _R_51("Grid<int>", "join", Grid<int>::_W_27);
static const Pb::Register _R_52("Grid<int>", "getMaxAbs", Grid<int>::_W_28);
static const Pb::Register _R_53("Grid<int>", "getMax", Grid<int>::_W_29);
static const Pb::Register _R_54("Grid<int>", "getMin", Grid<int>::_W_30);
static const Pb::Register _R_55("Grid<int>", "getL1", Grid<int>::_W_31);
static const Pb::Register _R_56("Grid<int>", "getL2", Grid<int>::_W_32);
static const Pb::Register _R_57("Grid<int>", "setBound", Grid<int>::_W_33);
static const Pb::Register _R_58("Grid<int>", "setBoundNeumann", Grid<int>::_W_34);
static const Pb::Register _R_59("Grid<int>", "getDataPointer", Grid<int>::_W_35);
static const Pb::Register _R_60("Grid<int>", "printGrid", Grid<int>::_W_36);
static const Pb::Register _R_33("Grid<int>", "Grid", Grid<int>::_W_10);
static const Pb::Register _R_34("Grid<int>", "save", Grid<int>::_W_11);
static const Pb::Register _R_35("Grid<int>", "load", Grid<int>::_W_12);
static const Pb::Register _R_36("Grid<int>", "clear", Grid<int>::_W_13);
static const Pb::Register _R_37("Grid<int>", "copyFrom", Grid<int>::_W_14);
static const Pb::Register _R_38("Grid<int>", "getGridType", Grid<int>::_W_15);
static const Pb::Register _R_39("Grid<int>", "add", Grid<int>::_W_16);
static const Pb::Register _R_40("Grid<int>", "sub", Grid<int>::_W_17);
static const Pb::Register _R_41("Grid<int>", "setConst", Grid<int>::_W_18);
static const Pb::Register _R_42("Grid<int>", "addConst", Grid<int>::_W_19);
static const Pb::Register _R_43("Grid<int>", "addScaled", Grid<int>::_W_20);
static const Pb::Register _R_44("Grid<int>", "mult", Grid<int>::_W_21);
static const Pb::Register _R_45("Grid<int>", "multConst", Grid<int>::_W_22);
static const Pb::Register _R_46("Grid<int>", "safeDivide", Grid<int>::_W_23);
static const Pb::Register _R_47("Grid<int>", "clamp", Grid<int>::_W_24);
static const Pb::Register _R_48("Grid<int>", "stomp", Grid<int>::_W_25);
static const Pb::Register _R_49("Grid<int>", "permuteAxes", Grid<int>::_W_26);
static const Pb::Register _R_50("Grid<int>", "permuteAxesCopyToGrid", Grid<int>::_W_27);
static const Pb::Register _R_51("Grid<int>", "join", Grid<int>::_W_28);
static const Pb::Register _R_52("Grid<int>", "getMaxAbs", Grid<int>::_W_29);
static const Pb::Register _R_53("Grid<int>", "getMax", Grid<int>::_W_30);
static const Pb::Register _R_54("Grid<int>", "getMin", Grid<int>::_W_31);
static const Pb::Register _R_55("Grid<int>", "getL1", Grid<int>::_W_32);
static const Pb::Register _R_56("Grid<int>", "getL2", Grid<int>::_W_33);
static const Pb::Register _R_57("Grid<int>", "setBound", Grid<int>::_W_34);
static const Pb::Register _R_58("Grid<int>", "setBoundNeumann", Grid<int>::_W_35);
static const Pb::Register _R_59("Grid<int>", "getDataPointer", Grid<int>::_W_36);
static const Pb::Register _R_60("Grid<int>", "printGrid", Grid<int>::_W_37);
static const Pb::Register _R_61("Grid<Real>", "Grid<Real>", "GridBase");
template<> const char *Namify<Grid<Real>>::S = "Grid<Real>";
static const Pb::Register _R_62("Grid<Real>", "Grid", Grid<Real>::_W_9);
static const Pb::Register _R_63("Grid<Real>", "save", Grid<Real>::_W_10);
static const Pb::Register _R_64("Grid<Real>", "load", Grid<Real>::_W_11);
static const Pb::Register _R_65("Grid<Real>", "clear", Grid<Real>::_W_12);
static const Pb::Register _R_66("Grid<Real>", "copyFrom", Grid<Real>::_W_13);
static const Pb::Register _R_67("Grid<Real>", "getGridType", Grid<Real>::_W_14);
static const Pb::Register _R_68("Grid<Real>", "add", Grid<Real>::_W_15);
static const Pb::Register _R_69("Grid<Real>", "sub", Grid<Real>::_W_16);
static const Pb::Register _R_70("Grid<Real>", "setConst", Grid<Real>::_W_17);
static const Pb::Register _R_71("Grid<Real>", "addConst", Grid<Real>::_W_18);
static const Pb::Register _R_72("Grid<Real>", "addScaled", Grid<Real>::_W_19);
static const Pb::Register _R_73("Grid<Real>", "mult", Grid<Real>::_W_20);
static const Pb::Register _R_74("Grid<Real>", "multConst", Grid<Real>::_W_21);
static const Pb::Register _R_75("Grid<Real>", "safeDivide", Grid<Real>::_W_22);
static const Pb::Register _R_76("Grid<Real>", "clamp", Grid<Real>::_W_23);
static const Pb::Register _R_77("Grid<Real>", "stomp", Grid<Real>::_W_24);
static const Pb::Register _R_78("Grid<Real>", "permuteAxes", Grid<Real>::_W_25);
static const Pb::Register _R_79("Grid<Real>", "permuteAxesCopyToGrid", Grid<Real>::_W_26);
static const Pb::Register _R_80("Grid<Real>", "join", Grid<Real>::_W_27);
static const Pb::Register _R_81("Grid<Real>", "getMaxAbs", Grid<Real>::_W_28);
static const Pb::Register _R_82("Grid<Real>", "getMax", Grid<Real>::_W_29);
static const Pb::Register _R_83("Grid<Real>", "getMin", Grid<Real>::_W_30);
static const Pb::Register _R_84("Grid<Real>", "getL1", Grid<Real>::_W_31);
static const Pb::Register _R_85("Grid<Real>", "getL2", Grid<Real>::_W_32);
static const Pb::Register _R_86("Grid<Real>", "setBound", Grid<Real>::_W_33);
static const Pb::Register _R_87("Grid<Real>", "setBoundNeumann", Grid<Real>::_W_34);
static const Pb::Register _R_88("Grid<Real>", "getDataPointer", Grid<Real>::_W_35);
static const Pb::Register _R_89("Grid<Real>", "printGrid", Grid<Real>::_W_36);
static const Pb::Register _R_62("Grid<Real>", "Grid", Grid<Real>::_W_10);
static const Pb::Register _R_63("Grid<Real>", "save", Grid<Real>::_W_11);
static const Pb::Register _R_64("Grid<Real>", "load", Grid<Real>::_W_12);
static const Pb::Register _R_65("Grid<Real>", "clear", Grid<Real>::_W_13);
static const Pb::Register _R_66("Grid<Real>", "copyFrom", Grid<Real>::_W_14);
static const Pb::Register _R_67("Grid<Real>", "getGridType", Grid<Real>::_W_15);
static const Pb::Register _R_68("Grid<Real>", "add", Grid<Real>::_W_16);
static const Pb::Register _R_69("Grid<Real>", "sub", Grid<Real>::_W_17);
static const Pb::Register _R_70("Grid<Real>", "setConst", Grid<Real>::_W_18);
static const Pb::Register _R_71("Grid<Real>", "addConst", Grid<Real>::_W_19);
static const Pb::Register _R_72("Grid<Real>", "addScaled", Grid<Real>::_W_20);
static const Pb::Register _R_73("Grid<Real>", "mult", Grid<Real>::_W_21);
static const Pb::Register _R_74("Grid<Real>", "multConst", Grid<Real>::_W_22);
static const Pb::Register _R_75("Grid<Real>", "safeDivide", Grid<Real>::_W_23);
static const Pb::Register _R_76("Grid<Real>", "clamp", Grid<Real>::_W_24);
static const Pb::Register _R_77("Grid<Real>", "stomp", Grid<Real>::_W_25);
static const Pb::Register _R_78("Grid<Real>", "permuteAxes", Grid<Real>::_W_26);
static const Pb::Register _R_79("Grid<Real>", "permuteAxesCopyToGrid", Grid<Real>::_W_27);
static const Pb::Register _R_80("Grid<Real>", "join", Grid<Real>::_W_28);
static const Pb::Register _R_81("Grid<Real>", "getMaxAbs", Grid<Real>::_W_29);
static const Pb::Register _R_82("Grid<Real>", "getMax", Grid<Real>::_W_30);
static const Pb::Register _R_83("Grid<Real>", "getMin", Grid<Real>::_W_31);
static const Pb::Register _R_84("Grid<Real>", "getL1", Grid<Real>::_W_32);
static const Pb::Register _R_85("Grid<Real>", "getL2", Grid<Real>::_W_33);
static const Pb::Register _R_86("Grid<Real>", "setBound", Grid<Real>::_W_34);
static const Pb::Register _R_87("Grid<Real>", "setBoundNeumann", Grid<Real>::_W_35);
static const Pb::Register _R_88("Grid<Real>", "getDataPointer", Grid<Real>::_W_36);
static const Pb::Register _R_89("Grid<Real>", "printGrid", Grid<Real>::_W_37);
static const Pb::Register _R_90("Grid<Vec3>", "Grid<Vec3>", "GridBase");
template<> const char *Namify<Grid<Vec3>>::S = "Grid<Vec3>";
static const Pb::Register _R_91("Grid<Vec3>", "Grid", Grid<Vec3>::_W_9);
static const Pb::Register _R_92("Grid<Vec3>", "save", Grid<Vec3>::_W_10);
static const Pb::Register _R_93("Grid<Vec3>", "load", Grid<Vec3>::_W_11);
static const Pb::Register _R_94("Grid<Vec3>", "clear", Grid<Vec3>::_W_12);
static const Pb::Register _R_95("Grid<Vec3>", "copyFrom", Grid<Vec3>::_W_13);
static const Pb::Register _R_96("Grid<Vec3>", "getGridType", Grid<Vec3>::_W_14);
static const Pb::Register _R_97("Grid<Vec3>", "add", Grid<Vec3>::_W_15);
static const Pb::Register _R_98("Grid<Vec3>", "sub", Grid<Vec3>::_W_16);
static const Pb::Register _R_99("Grid<Vec3>", "setConst", Grid<Vec3>::_W_17);
static const Pb::Register _R_100("Grid<Vec3>", "addConst", Grid<Vec3>::_W_18);
static const Pb::Register _R_101("Grid<Vec3>", "addScaled", Grid<Vec3>::_W_19);
static const Pb::Register _R_102("Grid<Vec3>", "mult", Grid<Vec3>::_W_20);
static const Pb::Register _R_103("Grid<Vec3>", "multConst", Grid<Vec3>::_W_21);
static const Pb::Register _R_104("Grid<Vec3>", "safeDivide", Grid<Vec3>::_W_22);
static const Pb::Register _R_105("Grid<Vec3>", "clamp", Grid<Vec3>::_W_23);
static const Pb::Register _R_106("Grid<Vec3>", "stomp", Grid<Vec3>::_W_24);
static const Pb::Register _R_107("Grid<Vec3>", "permuteAxes", Grid<Vec3>::_W_25);
static const Pb::Register _R_108("Grid<Vec3>", "permuteAxesCopyToGrid", Grid<Vec3>::_W_26);
static const Pb::Register _R_109("Grid<Vec3>", "join", Grid<Vec3>::_W_27);
static const Pb::Register _R_110("Grid<Vec3>", "getMaxAbs", Grid<Vec3>::_W_28);
static const Pb::Register _R_111("Grid<Vec3>", "getMax", Grid<Vec3>::_W_29);
static const Pb::Register _R_112("Grid<Vec3>", "getMin", Grid<Vec3>::_W_30);
static const Pb::Register _R_113("Grid<Vec3>", "getL1", Grid<Vec3>::_W_31);
static const Pb::Register _R_114("Grid<Vec3>", "getL2", Grid<Vec3>::_W_32);
static const Pb::Register _R_115("Grid<Vec3>", "setBound", Grid<Vec3>::_W_33);
static const Pb::Register _R_116("Grid<Vec3>", "setBoundNeumann", Grid<Vec3>::_W_34);
static const Pb::Register _R_117("Grid<Vec3>", "getDataPointer", Grid<Vec3>::_W_35);
static const Pb::Register _R_118("Grid<Vec3>", "printGrid", Grid<Vec3>::_W_36);
static const Pb::Register _R_91("Grid<Vec3>", "Grid", Grid<Vec3>::_W_10);
static const Pb::Register _R_92("Grid<Vec3>", "save", Grid<Vec3>::_W_11);
static const Pb::Register _R_93("Grid<Vec3>", "load", Grid<Vec3>::_W_12);
static const Pb::Register _R_94("Grid<Vec3>", "clear", Grid<Vec3>::_W_13);
static const Pb::Register _R_95("Grid<Vec3>", "copyFrom", Grid<Vec3>::_W_14);
static const Pb::Register _R_96("Grid<Vec3>", "getGridType", Grid<Vec3>::_W_15);
static const Pb::Register _R_97("Grid<Vec3>", "add", Grid<Vec3>::_W_16);
static const Pb::Register _R_98("Grid<Vec3>", "sub", Grid<Vec3>::_W_17);
static const Pb::Register _R_99("Grid<Vec3>", "setConst", Grid<Vec3>::_W_18);
static const Pb::Register _R_100("Grid<Vec3>", "addConst", Grid<Vec3>::_W_19);
static const Pb::Register _R_101("Grid<Vec3>", "addScaled", Grid<Vec3>::_W_20);
static const Pb::Register _R_102("Grid<Vec3>", "mult", Grid<Vec3>::_W_21);
static const Pb::Register _R_103("Grid<Vec3>", "multConst", Grid<Vec3>::_W_22);
static const Pb::Register _R_104("Grid<Vec3>", "safeDivide", Grid<Vec3>::_W_23);
static const Pb::Register _R_105("Grid<Vec3>", "clamp", Grid<Vec3>::_W_24);
static const Pb::Register _R_106("Grid<Vec3>", "stomp", Grid<Vec3>::_W_25);
static const Pb::Register _R_107("Grid<Vec3>", "permuteAxes", Grid<Vec3>::_W_26);
static const Pb::Register _R_108("Grid<Vec3>", "permuteAxesCopyToGrid", Grid<Vec3>::_W_27);
static const Pb::Register _R_109("Grid<Vec3>", "join", Grid<Vec3>::_W_28);
static const Pb::Register _R_110("Grid<Vec3>", "getMaxAbs", Grid<Vec3>::_W_29);
static const Pb::Register _R_111("Grid<Vec3>", "getMax", Grid<Vec3>::_W_30);
static const Pb::Register _R_112("Grid<Vec3>", "getMin", Grid<Vec3>::_W_31);
static const Pb::Register _R_113("Grid<Vec3>", "getL1", Grid<Vec3>::_W_32);
static const Pb::Register _R_114("Grid<Vec3>", "getL2", Grid<Vec3>::_W_33);
static const Pb::Register _R_115("Grid<Vec3>", "setBound", Grid<Vec3>::_W_34);
static const Pb::Register _R_116("Grid<Vec3>", "setBoundNeumann", Grid<Vec3>::_W_35);
static const Pb::Register _R_117("Grid<Vec3>", "getDataPointer", Grid<Vec3>::_W_36);
static const Pb::Register _R_118("Grid<Vec3>", "printGrid", Grid<Vec3>::_W_37);
#endif
#ifdef _C_GridBase
static const Pb::Register _R_119("GridBase", "GridBase", "PbClass");
@@ -118,12 +118,13 @@ static const Pb::Register _R_125("GridBase", "is3D", GridBase::_W_5);
static const Pb::Register _R_126("GridBase", "is4D", GridBase::_W_6);
static const Pb::Register _R_127("GridBase", "getSizeT", GridBase::_W_7);
static const Pb::Register _R_128("GridBase", "getStrideT", GridBase::_W_8);
static const Pb::Register _R_129("GridBase", "setName", GridBase::_W_9);
#endif
#ifdef _C_MACGrid
static const Pb::Register _R_129("MACGrid", "MACGrid", "Grid<Vec3>");
static const Pb::Register _R_130("MACGrid", "MACGrid", "Grid<Vec3>");
template<> const char *Namify<MACGrid>::S = "MACGrid";
static const Pb::Register _R_130("MACGrid", "MACGrid", MACGrid::_W_37);
static const Pb::Register _R_131("MACGrid", "setBoundMAC", MACGrid::_W_38);
static const Pb::Register _R_131("MACGrid", "MACGrid", MACGrid::_W_38);
static const Pb::Register _R_132("MACGrid", "setBoundMAC", MACGrid::_W_39);
#endif
static const Pb::Register _R_7("GridType_TypeNone", 0);
static const Pb::Register _R_8("GridType_TypeReal", 1);
@@ -253,6 +254,7 @@ void PbRegister_file_7()
KEEP_UNUSED(_R_129);
KEEP_UNUSED(_R_130);
KEEP_UNUSED(_R_131);
KEEP_UNUSED(_R_132);
}
}
} // namespace Manta

View File

@@ -29,7 +29,7 @@ using namespace std;
namespace Manta {
ParticleBase::ParticleBase(FluidSolver *parent)
: PbClass(parent), mAllowCompress(true), mFreePdata(false)
: PbClass(parent), mMaxParticles(0), mAllowCompress(true), mFreePdata(false)
{
}

View File

@@ -100,6 +100,17 @@ class ParticleBase : public PbClass {
//! threads)
inline void addBuffered(const Vec3 &pos, int flag = 0);
virtual void resize(IndexInt size)
{
assertMsg(false, "Dont use, override...");
return;
}
virtual void resizeAll(IndexInt size)
{
assertMsg(false, "Dont use, override...");
return;
}
//! particle data functions
//! create a particle data object
@@ -152,6 +163,20 @@ class ParticleBase : public PbClass {
return mPartData[i];
}
//! expose maximum number of particles to python
int mMaxParticles;
static PyObject *_GET_mMaxParticles(PyObject *self, void *cl)
{
ParticleBase *pbo = dynamic_cast<ParticleBase *>(Pb::objFromPy(self));
return toPy(pbo->mMaxParticles);
}
static int _SET_mMaxParticles(PyObject *self, PyObject *val, void *cl)
{
ParticleBase *pbo = dynamic_cast<ParticleBase *>(Pb::objFromPy(self));
pbo->mMaxParticles = fromPy<int>(val);
return 0;
}
protected:
//! new particle candidates
std::vector<Vec3> mNewBufferPos;
@@ -431,8 +456,14 @@ template<class S> class ParticleSystem : public ParticleBase {
}
//! insert buffered positions as new particles, update additional particle data
void insertBufferedParticles();
//! resize only the data vector, only use if you know what you're doing, otherwise use
//! resizeAll()
virtual void resize(IndexInt size)
{
mData.resize(size);
}
//! resize data vector, and all pdata fields
void resizeAll(IndexInt newsize);
virtual void resizeAll(IndexInt size);
//! adding and deleting
inline void kill(IndexInt idx);
@@ -877,11 +908,6 @@ class ParticleIndexSystem : public ParticleSystem<ParticleIndexData> {
return -1;
}
};
//! we only need a resize function...
void resize(IndexInt size)
{
mData.resize(size);
}
public:
PbArgs _args;
}
@@ -2479,28 +2505,66 @@ template<class S> void ParticleSystem<S>::insertBufferedParticles()
for (IndexInt i = 0; i < (IndexInt)mData.size(); ++i)
mData[i].flag &= ~PNEW;
if (mNewBufferPos.size() == 0)
if (mNewBufferPos.empty())
return;
IndexInt newCnt = mData.size();
resizeAll(newCnt + mNewBufferPos.size());
IndexInt bufferSize = mNewBufferPos.size();
IndexInt partsSize = mData.size();
if (mMaxParticles > 0)
assertMsg(mMaxParticles >= partsSize,
"Particle system cannot contain more particles that the maximum allowed number");
// max number of new particles that can be inserted, adjusted buffer size when using maxParticles
// field
IndexInt numNewParts = (mMaxParticles > 0) ? mMaxParticles - mData.size() : bufferSize;
if (numNewParts > bufferSize)
numNewParts = bufferSize; // upper clamp
assertMsg(numNewParts >= 0, "Must not have negative number of new particles");
// new size of particle system
IndexInt newSize = mData.size() + numNewParts;
if (mMaxParticles > 0)
assertMsg(newSize <= mMaxParticles,
"Particle system cannot contain more particles that the maximum allowed number");
resizeAll(newSize);
int insertFlag;
Vec3 insertPos;
static RandomStream mRand(9832);
for (IndexInt i = 0; i < numNewParts; ++i) {
// get random index in newBuffer vector
// we are inserting particles randomly so that they are sampled uniformly in the fluid region
// otherwise, regions of fluid can remain completely empty once mData.size() == maxParticles is
// reached.
int randIndex = floor(mRand.getReal() * mNewBufferPos.size());
// get elements from new buffers with random index
std::swap(mNewBufferPos[randIndex], mNewBufferPos.back());
insertPos = mNewBufferPos.back();
mNewBufferPos.pop_back();
insertFlag = 0;
if (!mNewBufferFlag.empty()) {
std::swap(mNewBufferFlag[randIndex], mNewBufferFlag.back());
insertFlag = mNewBufferFlag.back();
mNewBufferFlag.pop_back();
}
mData[partsSize].pos = insertPos;
mData[partsSize].flag = PNEW | insertFlag;
for (IndexInt i = 0; i < (IndexInt)mNewBufferPos.size(); ++i) {
int flag = (mNewBufferFlag.size() > 0) ? mNewBufferFlag[i] : 0;
// note, other fields are not initialized here...
mData[newCnt].pos = mNewBufferPos[i];
mData[newCnt].flag = PNEW | flag;
// now init pdata fields from associated grids...
for (IndexInt pd = 0; pd < (IndexInt)mPdataReal.size(); ++pd)
mPdataReal[pd]->initNewValue(newCnt, mNewBufferPos[i]);
mPdataReal[pd]->initNewValue(partsSize, insertPos);
for (IndexInt pd = 0; pd < (IndexInt)mPdataVec3.size(); ++pd)
mPdataVec3[pd]->initNewValue(newCnt, mNewBufferPos[i]);
mPdataVec3[pd]->initNewValue(partsSize, insertPos);
for (IndexInt pd = 0; pd < (IndexInt)mPdataInt.size(); ++pd)
mPdataInt[pd]->initNewValue(newCnt, mNewBufferPos[i]);
newCnt++;
mPdataInt[pd]->initNewValue(partsSize, insertPos);
partsSize++;
}
if (mNewBufferPos.size() > 0)
debMsg("Added & initialized " << (IndexInt)mNewBufferPos.size() << " particles",
2); // debug info
debMsg("Added & initialized " << numNewParts << " particles", 2); // debug info
mNewBufferPos.clear();
mNewBufferFlag.clear();
}

View File

@@ -29,279 +29,283 @@ static const Pb::Register _R_21("ParticleBase", "ParticleBase", "PbClass");
template<> const char *Namify<ParticleBase>::S = "ParticleBase";
static const Pb::Register _R_22("ParticleBase", "ParticleBase", ParticleBase::_W_0);
static const Pb::Register _R_23("ParticleBase", "create", ParticleBase::_W_1);
static const Pb::Register _R_24("ParticleBase",
"maxParticles",
ParticleBase::_GET_mMaxParticles,
ParticleBase::_SET_mMaxParticles);
#endif
#ifdef _C_ParticleDataBase
static const Pb::Register _R_24("ParticleDataBase", "ParticleDataBase", "PbClass");
static const Pb::Register _R_25("ParticleDataBase", "ParticleDataBase", "PbClass");
template<> const char *Namify<ParticleDataBase>::S = "ParticleDataBase";
static const Pb::Register _R_25("ParticleDataBase", "ParticleDataBase", ParticleDataBase::_W_21);
static const Pb::Register _R_26("ParticleDataBase", "ParticleDataBase", ParticleDataBase::_W_21);
#endif
#ifdef _C_ParticleDataImpl
static const Pb::Register _R_26("ParticleDataImpl<int>",
static const Pb::Register _R_27("ParticleDataImpl<int>",
"ParticleDataImpl<int>",
"ParticleDataBase");
template<> const char *Namify<ParticleDataImpl<int>>::S = "ParticleDataImpl<int>";
static const Pb::Register _R_27("ParticleDataImpl<int>",
static const Pb::Register _R_28("ParticleDataImpl<int>",
"ParticleDataImpl",
ParticleDataImpl<int>::_W_22);
static const Pb::Register _R_28("ParticleDataImpl<int>", "clear", ParticleDataImpl<int>::_W_23);
static const Pb::Register _R_29("ParticleDataImpl<int>",
static const Pb::Register _R_29("ParticleDataImpl<int>", "clear", ParticleDataImpl<int>::_W_23);
static const Pb::Register _R_30("ParticleDataImpl<int>",
"setSource",
ParticleDataImpl<int>::_W_24);
static const Pb::Register _R_30("ParticleDataImpl<int>", "copyFrom", ParticleDataImpl<int>::_W_25);
static const Pb::Register _R_31("ParticleDataImpl<int>", "setConst", ParticleDataImpl<int>::_W_26);
static const Pb::Register _R_32("ParticleDataImpl<int>",
static const Pb::Register _R_31("ParticleDataImpl<int>", "copyFrom", ParticleDataImpl<int>::_W_25);
static const Pb::Register _R_32("ParticleDataImpl<int>", "setConst", ParticleDataImpl<int>::_W_26);
static const Pb::Register _R_33("ParticleDataImpl<int>",
"setConstRange",
ParticleDataImpl<int>::_W_27);
static const Pb::Register _R_33("ParticleDataImpl<int>", "add", ParticleDataImpl<int>::_W_28);
static const Pb::Register _R_34("ParticleDataImpl<int>", "sub", ParticleDataImpl<int>::_W_29);
static const Pb::Register _R_35("ParticleDataImpl<int>", "addConst", ParticleDataImpl<int>::_W_30);
static const Pb::Register _R_36("ParticleDataImpl<int>",
static const Pb::Register _R_34("ParticleDataImpl<int>", "add", ParticleDataImpl<int>::_W_28);
static const Pb::Register _R_35("ParticleDataImpl<int>", "sub", ParticleDataImpl<int>::_W_29);
static const Pb::Register _R_36("ParticleDataImpl<int>", "addConst", ParticleDataImpl<int>::_W_30);
static const Pb::Register _R_37("ParticleDataImpl<int>",
"addScaled",
ParticleDataImpl<int>::_W_31);
static const Pb::Register _R_37("ParticleDataImpl<int>", "mult", ParticleDataImpl<int>::_W_32);
static const Pb::Register _R_38("ParticleDataImpl<int>",
static const Pb::Register _R_38("ParticleDataImpl<int>", "mult", ParticleDataImpl<int>::_W_32);
static const Pb::Register _R_39("ParticleDataImpl<int>",
"multConst",
ParticleDataImpl<int>::_W_33);
static const Pb::Register _R_39("ParticleDataImpl<int>", "safeDiv", ParticleDataImpl<int>::_W_34);
static const Pb::Register _R_40("ParticleDataImpl<int>", "clamp", ParticleDataImpl<int>::_W_35);
static const Pb::Register _R_41("ParticleDataImpl<int>", "clampMin", ParticleDataImpl<int>::_W_36);
static const Pb::Register _R_42("ParticleDataImpl<int>", "clampMax", ParticleDataImpl<int>::_W_37);
static const Pb::Register _R_43("ParticleDataImpl<int>",
static const Pb::Register _R_40("ParticleDataImpl<int>", "safeDiv", ParticleDataImpl<int>::_W_34);
static const Pb::Register _R_41("ParticleDataImpl<int>", "clamp", ParticleDataImpl<int>::_W_35);
static const Pb::Register _R_42("ParticleDataImpl<int>", "clampMin", ParticleDataImpl<int>::_W_36);
static const Pb::Register _R_43("ParticleDataImpl<int>", "clampMax", ParticleDataImpl<int>::_W_37);
static const Pb::Register _R_44("ParticleDataImpl<int>",
"getMaxAbs",
ParticleDataImpl<int>::_W_38);
static const Pb::Register _R_44("ParticleDataImpl<int>", "getMax", ParticleDataImpl<int>::_W_39);
static const Pb::Register _R_45("ParticleDataImpl<int>", "getMin", ParticleDataImpl<int>::_W_40);
static const Pb::Register _R_46("ParticleDataImpl<int>", "sum", ParticleDataImpl<int>::_W_41);
static const Pb::Register _R_47("ParticleDataImpl<int>",
static const Pb::Register _R_45("ParticleDataImpl<int>", "getMax", ParticleDataImpl<int>::_W_39);
static const Pb::Register _R_46("ParticleDataImpl<int>", "getMin", ParticleDataImpl<int>::_W_40);
static const Pb::Register _R_47("ParticleDataImpl<int>", "sum", ParticleDataImpl<int>::_W_41);
static const Pb::Register _R_48("ParticleDataImpl<int>",
"sumSquare",
ParticleDataImpl<int>::_W_42);
static const Pb::Register _R_48("ParticleDataImpl<int>",
static const Pb::Register _R_49("ParticleDataImpl<int>",
"sumMagnitude",
ParticleDataImpl<int>::_W_43);
static const Pb::Register _R_49("ParticleDataImpl<int>",
static const Pb::Register _R_50("ParticleDataImpl<int>",
"setConstIntFlag",
ParticleDataImpl<int>::_W_44);
static const Pb::Register _R_50("ParticleDataImpl<int>",
static const Pb::Register _R_51("ParticleDataImpl<int>",
"printPdata",
ParticleDataImpl<int>::_W_45);
static const Pb::Register _R_51("ParticleDataImpl<int>", "save", ParticleDataImpl<int>::_W_46);
static const Pb::Register _R_52("ParticleDataImpl<int>", "load", ParticleDataImpl<int>::_W_47);
static const Pb::Register _R_53("ParticleDataImpl<int>",
static const Pb::Register _R_52("ParticleDataImpl<int>", "save", ParticleDataImpl<int>::_W_46);
static const Pb::Register _R_53("ParticleDataImpl<int>", "load", ParticleDataImpl<int>::_W_47);
static const Pb::Register _R_54("ParticleDataImpl<int>",
"getDataPointer",
ParticleDataImpl<int>::_W_48);
static const Pb::Register _R_54("ParticleDataImpl<Real>",
static const Pb::Register _R_55("ParticleDataImpl<Real>",
"ParticleDataImpl<Real>",
"ParticleDataBase");
template<> const char *Namify<ParticleDataImpl<Real>>::S = "ParticleDataImpl<Real>";
static const Pb::Register _R_55("ParticleDataImpl<Real>",
static const Pb::Register _R_56("ParticleDataImpl<Real>",
"ParticleDataImpl",
ParticleDataImpl<Real>::_W_22);
static const Pb::Register _R_56("ParticleDataImpl<Real>", "clear", ParticleDataImpl<Real>::_W_23);
static const Pb::Register _R_57("ParticleDataImpl<Real>",
static const Pb::Register _R_57("ParticleDataImpl<Real>", "clear", ParticleDataImpl<Real>::_W_23);
static const Pb::Register _R_58("ParticleDataImpl<Real>",
"setSource",
ParticleDataImpl<Real>::_W_24);
static const Pb::Register _R_58("ParticleDataImpl<Real>",
static const Pb::Register _R_59("ParticleDataImpl<Real>",
"copyFrom",
ParticleDataImpl<Real>::_W_25);
static const Pb::Register _R_59("ParticleDataImpl<Real>",
static const Pb::Register _R_60("ParticleDataImpl<Real>",
"setConst",
ParticleDataImpl<Real>::_W_26);
static const Pb::Register _R_60("ParticleDataImpl<Real>",
static const Pb::Register _R_61("ParticleDataImpl<Real>",
"setConstRange",
ParticleDataImpl<Real>::_W_27);
static const Pb::Register _R_61("ParticleDataImpl<Real>", "add", ParticleDataImpl<Real>::_W_28);
static const Pb::Register _R_62("ParticleDataImpl<Real>", "sub", ParticleDataImpl<Real>::_W_29);
static const Pb::Register _R_63("ParticleDataImpl<Real>",
static const Pb::Register _R_62("ParticleDataImpl<Real>", "add", ParticleDataImpl<Real>::_W_28);
static const Pb::Register _R_63("ParticleDataImpl<Real>", "sub", ParticleDataImpl<Real>::_W_29);
static const Pb::Register _R_64("ParticleDataImpl<Real>",
"addConst",
ParticleDataImpl<Real>::_W_30);
static const Pb::Register _R_64("ParticleDataImpl<Real>",
static const Pb::Register _R_65("ParticleDataImpl<Real>",
"addScaled",
ParticleDataImpl<Real>::_W_31);
static const Pb::Register _R_65("ParticleDataImpl<Real>", "mult", ParticleDataImpl<Real>::_W_32);
static const Pb::Register _R_66("ParticleDataImpl<Real>",
static const Pb::Register _R_66("ParticleDataImpl<Real>", "mult", ParticleDataImpl<Real>::_W_32);
static const Pb::Register _R_67("ParticleDataImpl<Real>",
"multConst",
ParticleDataImpl<Real>::_W_33);
static const Pb::Register _R_67("ParticleDataImpl<Real>",
static const Pb::Register _R_68("ParticleDataImpl<Real>",
"safeDiv",
ParticleDataImpl<Real>::_W_34);
static const Pb::Register _R_68("ParticleDataImpl<Real>", "clamp", ParticleDataImpl<Real>::_W_35);
static const Pb::Register _R_69("ParticleDataImpl<Real>",
static const Pb::Register _R_69("ParticleDataImpl<Real>", "clamp", ParticleDataImpl<Real>::_W_35);
static const Pb::Register _R_70("ParticleDataImpl<Real>",
"clampMin",
ParticleDataImpl<Real>::_W_36);
static const Pb::Register _R_70("ParticleDataImpl<Real>",
static const Pb::Register _R_71("ParticleDataImpl<Real>",
"clampMax",
ParticleDataImpl<Real>::_W_37);
static const Pb::Register _R_71("ParticleDataImpl<Real>",
static const Pb::Register _R_72("ParticleDataImpl<Real>",
"getMaxAbs",
ParticleDataImpl<Real>::_W_38);
static const Pb::Register _R_72("ParticleDataImpl<Real>", "getMax", ParticleDataImpl<Real>::_W_39);
static const Pb::Register _R_73("ParticleDataImpl<Real>", "getMin", ParticleDataImpl<Real>::_W_40);
static const Pb::Register _R_74("ParticleDataImpl<Real>", "sum", ParticleDataImpl<Real>::_W_41);
static const Pb::Register _R_75("ParticleDataImpl<Real>",
static const Pb::Register _R_73("ParticleDataImpl<Real>", "getMax", ParticleDataImpl<Real>::_W_39);
static const Pb::Register _R_74("ParticleDataImpl<Real>", "getMin", ParticleDataImpl<Real>::_W_40);
static const Pb::Register _R_75("ParticleDataImpl<Real>", "sum", ParticleDataImpl<Real>::_W_41);
static const Pb::Register _R_76("ParticleDataImpl<Real>",
"sumSquare",
ParticleDataImpl<Real>::_W_42);
static const Pb::Register _R_76("ParticleDataImpl<Real>",
static const Pb::Register _R_77("ParticleDataImpl<Real>",
"sumMagnitude",
ParticleDataImpl<Real>::_W_43);
static const Pb::Register _R_77("ParticleDataImpl<Real>",
static const Pb::Register _R_78("ParticleDataImpl<Real>",
"setConstIntFlag",
ParticleDataImpl<Real>::_W_44);
static const Pb::Register _R_78("ParticleDataImpl<Real>",
static const Pb::Register _R_79("ParticleDataImpl<Real>",
"printPdata",
ParticleDataImpl<Real>::_W_45);
static const Pb::Register _R_79("ParticleDataImpl<Real>", "save", ParticleDataImpl<Real>::_W_46);
static const Pb::Register _R_80("ParticleDataImpl<Real>", "load", ParticleDataImpl<Real>::_W_47);
static const Pb::Register _R_81("ParticleDataImpl<Real>",
static const Pb::Register _R_80("ParticleDataImpl<Real>", "save", ParticleDataImpl<Real>::_W_46);
static const Pb::Register _R_81("ParticleDataImpl<Real>", "load", ParticleDataImpl<Real>::_W_47);
static const Pb::Register _R_82("ParticleDataImpl<Real>",
"getDataPointer",
ParticleDataImpl<Real>::_W_48);
static const Pb::Register _R_82("ParticleDataImpl<Vec3>",
static const Pb::Register _R_83("ParticleDataImpl<Vec3>",
"ParticleDataImpl<Vec3>",
"ParticleDataBase");
template<> const char *Namify<ParticleDataImpl<Vec3>>::S = "ParticleDataImpl<Vec3>";
static const Pb::Register _R_83("ParticleDataImpl<Vec3>",
static const Pb::Register _R_84("ParticleDataImpl<Vec3>",
"ParticleDataImpl",
ParticleDataImpl<Vec3>::_W_22);
static const Pb::Register _R_84("ParticleDataImpl<Vec3>", "clear", ParticleDataImpl<Vec3>::_W_23);
static const Pb::Register _R_85("ParticleDataImpl<Vec3>",
static const Pb::Register _R_85("ParticleDataImpl<Vec3>", "clear", ParticleDataImpl<Vec3>::_W_23);
static const Pb::Register _R_86("ParticleDataImpl<Vec3>",
"setSource",
ParticleDataImpl<Vec3>::_W_24);
static const Pb::Register _R_86("ParticleDataImpl<Vec3>",
static const Pb::Register _R_87("ParticleDataImpl<Vec3>",
"copyFrom",
ParticleDataImpl<Vec3>::_W_25);
static const Pb::Register _R_87("ParticleDataImpl<Vec3>",
static const Pb::Register _R_88("ParticleDataImpl<Vec3>",
"setConst",
ParticleDataImpl<Vec3>::_W_26);
static const Pb::Register _R_88("ParticleDataImpl<Vec3>",
static const Pb::Register _R_89("ParticleDataImpl<Vec3>",
"setConstRange",
ParticleDataImpl<Vec3>::_W_27);
static const Pb::Register _R_89("ParticleDataImpl<Vec3>", "add", ParticleDataImpl<Vec3>::_W_28);
static const Pb::Register _R_90("ParticleDataImpl<Vec3>", "sub", ParticleDataImpl<Vec3>::_W_29);
static const Pb::Register _R_91("ParticleDataImpl<Vec3>",
static const Pb::Register _R_90("ParticleDataImpl<Vec3>", "add", ParticleDataImpl<Vec3>::_W_28);
static const Pb::Register _R_91("ParticleDataImpl<Vec3>", "sub", ParticleDataImpl<Vec3>::_W_29);
static const Pb::Register _R_92("ParticleDataImpl<Vec3>",
"addConst",
ParticleDataImpl<Vec3>::_W_30);
static const Pb::Register _R_92("ParticleDataImpl<Vec3>",
static const Pb::Register _R_93("ParticleDataImpl<Vec3>",
"addScaled",
ParticleDataImpl<Vec3>::_W_31);
static const Pb::Register _R_93("ParticleDataImpl<Vec3>", "mult", ParticleDataImpl<Vec3>::_W_32);
static const Pb::Register _R_94("ParticleDataImpl<Vec3>",
static const Pb::Register _R_94("ParticleDataImpl<Vec3>", "mult", ParticleDataImpl<Vec3>::_W_32);
static const Pb::Register _R_95("ParticleDataImpl<Vec3>",
"multConst",
ParticleDataImpl<Vec3>::_W_33);
static const Pb::Register _R_95("ParticleDataImpl<Vec3>",
static const Pb::Register _R_96("ParticleDataImpl<Vec3>",
"safeDiv",
ParticleDataImpl<Vec3>::_W_34);
static const Pb::Register _R_96("ParticleDataImpl<Vec3>", "clamp", ParticleDataImpl<Vec3>::_W_35);
static const Pb::Register _R_97("ParticleDataImpl<Vec3>",
static const Pb::Register _R_97("ParticleDataImpl<Vec3>", "clamp", ParticleDataImpl<Vec3>::_W_35);
static const Pb::Register _R_98("ParticleDataImpl<Vec3>",
"clampMin",
ParticleDataImpl<Vec3>::_W_36);
static const Pb::Register _R_98("ParticleDataImpl<Vec3>",
static const Pb::Register _R_99("ParticleDataImpl<Vec3>",
"clampMax",
ParticleDataImpl<Vec3>::_W_37);
static const Pb::Register _R_99("ParticleDataImpl<Vec3>",
"getMaxAbs",
ParticleDataImpl<Vec3>::_W_38);
static const Pb::Register _R_100("ParticleDataImpl<Vec3>",
"getMaxAbs",
ParticleDataImpl<Vec3>::_W_38);
static const Pb::Register _R_101("ParticleDataImpl<Vec3>",
"getMax",
ParticleDataImpl<Vec3>::_W_39);
static const Pb::Register _R_101("ParticleDataImpl<Vec3>",
static const Pb::Register _R_102("ParticleDataImpl<Vec3>",
"getMin",
ParticleDataImpl<Vec3>::_W_40);
static const Pb::Register _R_102("ParticleDataImpl<Vec3>", "sum", ParticleDataImpl<Vec3>::_W_41);
static const Pb::Register _R_103("ParticleDataImpl<Vec3>",
static const Pb::Register _R_103("ParticleDataImpl<Vec3>", "sum", ParticleDataImpl<Vec3>::_W_41);
static const Pb::Register _R_104("ParticleDataImpl<Vec3>",
"sumSquare",
ParticleDataImpl<Vec3>::_W_42);
static const Pb::Register _R_104("ParticleDataImpl<Vec3>",
static const Pb::Register _R_105("ParticleDataImpl<Vec3>",
"sumMagnitude",
ParticleDataImpl<Vec3>::_W_43);
static const Pb::Register _R_105("ParticleDataImpl<Vec3>",
static const Pb::Register _R_106("ParticleDataImpl<Vec3>",
"setConstIntFlag",
ParticleDataImpl<Vec3>::_W_44);
static const Pb::Register _R_106("ParticleDataImpl<Vec3>",
static const Pb::Register _R_107("ParticleDataImpl<Vec3>",
"printPdata",
ParticleDataImpl<Vec3>::_W_45);
static const Pb::Register _R_107("ParticleDataImpl<Vec3>", "save", ParticleDataImpl<Vec3>::_W_46);
static const Pb::Register _R_108("ParticleDataImpl<Vec3>", "load", ParticleDataImpl<Vec3>::_W_47);
static const Pb::Register _R_109("ParticleDataImpl<Vec3>",
static const Pb::Register _R_108("ParticleDataImpl<Vec3>", "save", ParticleDataImpl<Vec3>::_W_46);
static const Pb::Register _R_109("ParticleDataImpl<Vec3>", "load", ParticleDataImpl<Vec3>::_W_47);
static const Pb::Register _R_110("ParticleDataImpl<Vec3>",
"getDataPointer",
ParticleDataImpl<Vec3>::_W_48);
#endif
#ifdef _C_ParticleIndexSystem
static const Pb::Register _R_110("ParticleIndexSystem",
static const Pb::Register _R_111("ParticleIndexSystem",
"ParticleIndexSystem",
"ParticleSystem<ParticleIndexData>");
template<> const char *Namify<ParticleIndexSystem>::S = "ParticleIndexSystem";
static const Pb::Register _R_111("ParticleIndexSystem",
static const Pb::Register _R_112("ParticleIndexSystem",
"ParticleIndexSystem",
ParticleIndexSystem::_W_19);
#endif
#ifdef _C_ParticleSystem
static const Pb::Register _R_112("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_113("ParticleSystem<BasicParticleData>",
"ParticleSystem<BasicParticleData>",
"ParticleBase");
template<>
const char *Namify<ParticleSystem<BasicParticleData>>::S = "ParticleSystem<BasicParticleData>";
static const Pb::Register _R_113("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_114("ParticleSystem<BasicParticleData>",
"ParticleSystem",
ParticleSystem<BasicParticleData>::_W_2);
static const Pb::Register _R_114("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_115("ParticleSystem<BasicParticleData>",
"pySize",
ParticleSystem<BasicParticleData>::_W_3);
static const Pb::Register _R_115("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_116("ParticleSystem<BasicParticleData>",
"setPos",
ParticleSystem<BasicParticleData>::_W_4);
static const Pb::Register _R_116("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_117("ParticleSystem<BasicParticleData>",
"getPos",
ParticleSystem<BasicParticleData>::_W_5);
static const Pb::Register _R_117("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_118("ParticleSystem<BasicParticleData>",
"getPosPdata",
ParticleSystem<BasicParticleData>::_W_6);
static const Pb::Register _R_118("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_119("ParticleSystem<BasicParticleData>",
"setPosPdata",
ParticleSystem<BasicParticleData>::_W_7);
static const Pb::Register _R_119("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_120("ParticleSystem<BasicParticleData>",
"clear",
ParticleSystem<BasicParticleData>::_W_8);
static const Pb::Register _R_120("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_121("ParticleSystem<BasicParticleData>",
"advectInGrid",
ParticleSystem<BasicParticleData>::_W_9);
static const Pb::Register _R_121("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_122("ParticleSystem<BasicParticleData>",
"projectOutside",
ParticleSystem<BasicParticleData>::_W_10);
static const Pb::Register _R_122("ParticleSystem<BasicParticleData>",
static const Pb::Register _R_123("ParticleSystem<BasicParticleData>",
"projectOutOfBnd",
ParticleSystem<BasicParticleData>::_W_11);
static const Pb::Register _R_123("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_124("ParticleSystem<ParticleIndexData>",
"ParticleSystem<ParticleIndexData>",
"ParticleBase");
template<>
const char *Namify<ParticleSystem<ParticleIndexData>>::S = "ParticleSystem<ParticleIndexData>";
static const Pb::Register _R_124("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_125("ParticleSystem<ParticleIndexData>",
"ParticleSystem",
ParticleSystem<ParticleIndexData>::_W_2);
static const Pb::Register _R_125("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_126("ParticleSystem<ParticleIndexData>",
"pySize",
ParticleSystem<ParticleIndexData>::_W_3);
static const Pb::Register _R_126("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_127("ParticleSystem<ParticleIndexData>",
"setPos",
ParticleSystem<ParticleIndexData>::_W_4);
static const Pb::Register _R_127("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_128("ParticleSystem<ParticleIndexData>",
"getPos",
ParticleSystem<ParticleIndexData>::_W_5);
static const Pb::Register _R_128("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_129("ParticleSystem<ParticleIndexData>",
"getPosPdata",
ParticleSystem<ParticleIndexData>::_W_6);
static const Pb::Register _R_129("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_130("ParticleSystem<ParticleIndexData>",
"setPosPdata",
ParticleSystem<ParticleIndexData>::_W_7);
static const Pb::Register _R_130("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_131("ParticleSystem<ParticleIndexData>",
"clear",
ParticleSystem<ParticleIndexData>::_W_8);
static const Pb::Register _R_131("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_132("ParticleSystem<ParticleIndexData>",
"advectInGrid",
ParticleSystem<ParticleIndexData>::_W_9);
static const Pb::Register _R_132("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_133("ParticleSystem<ParticleIndexData>",
"projectOutside",
ParticleSystem<ParticleIndexData>::_W_10);
static const Pb::Register _R_133("ParticleSystem<ParticleIndexData>",
static const Pb::Register _R_134("ParticleSystem<ParticleIndexData>",
"projectOutOfBnd",
ParticleSystem<ParticleIndexData>::_W_11);
#endif
@@ -432,6 +436,7 @@ void PbRegister_file_10()
KEEP_UNUSED(_R_131);
KEEP_UNUSED(_R_132);
KEEP_UNUSED(_R_133);
KEEP_UNUSED(_R_134);
}
}
} // namespace Manta

View File

@@ -28,9 +28,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
)
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(WIN32)
add_definitions(-D_USE_MATH_DEFINES)
endif()

View File

@@ -1,3 +1,15 @@
diff --git a/extern/quadriflow/src/loader.cpp b/extern/quadriflow/src/loader.cpp
--- a/extern/quadriflow/src/loader.cpp
+++ b/extern/quadriflow/src/loader.cpp
@@ -69,7 +69,7 @@
};
/// Hash function for obj_vertex
- struct obj_vertexHash : std::unary_function<obj_vertex, size_t> {
+ struct obj_vertexHash {
std::size_t operator()(const obj_vertex &v) const {
size_t hash = std::hash<uint32_t>()(v.p);
hash = hash * 37 + std::hash<uint32_t>()(v.uv);
diff --git a/extern/quadriflow/src/config.hpp b/extern/quadriflow/src/config.hpp
index 842b885..bf597ad 100644
--- a/extern/quadriflow/src/config.hpp

View File

@@ -69,7 +69,7 @@ void load(const char* filename, MatrixXd& V, MatrixXi& F)
};
/// Hash function for obj_vertex
struct obj_vertexHash : std::unary_function<obj_vertex, size_t> {
struct obj_vertexHash {
std::size_t operator()(const obj_vertex &v) const {
size_t hash = std::hash<uint32_t>()(v.p);
hash = hash * 37 + std::hash<uint32_t>()(v.uv);

View File

@@ -77,6 +77,10 @@ if(WITH_QUADRIFLOW)
add_subdirectory(quadriflow)
endif()
if(WITH_CODEC_FFMPEG)
add_subdirectory(ffmpeg)
endif()
if(UNIX AND NOT APPLE)
add_subdirectory(libc_compat)
endif()

View File

@@ -132,13 +132,14 @@ void CLG_logf(CLG_LogType *lg,
const char *format,
...) _CLOG_ATTR_NONNULL(1, 3, 4, 5) _CLOG_ATTR_PRINTF_FORMAT(5, 6);
/* Main initializer and distructor (per session, not logger). */
/* Main initializer and destructor (per session, not logger). */
void CLG_init(void);
void CLG_exit(void);
void CLG_output_set(void *file_handle);
void CLG_output_use_basename_set(int value);
void CLG_output_use_timestamp_set(int value);
void CLG_error_fn_set(void (*error_fn)(void *file_handle));
void CLG_fatal_fn_set(void (*fatal_fn)(void *file_handle));
void CLG_backtrace_fn_set(void (*fatal_fn)(void *file_handle));

View File

@@ -98,6 +98,7 @@ typedef struct CLogContext {
} default_type;
struct {
void (*error_fn)(void *file_handle);
void (*fatal_fn)(void *file_handle);
void (*backtrace_fn)(void *file_handle);
} callbacks;
@@ -153,7 +154,6 @@ static void clg_str_reserve(CLogStringBuf *cstr, const uint len)
cstr->data = data;
cstr->is_alloc = true;
}
cstr->len_alloc = len;
}
}
@@ -179,26 +179,34 @@ static void clg_str_vappendf(CLogStringBuf *cstr, const char *fmt, va_list args)
{
/* Use limit because windows may use '-1' for a formatting error. */
const uint len_max = 65535;
uint len_avail = (cstr->len_alloc - cstr->len);
if (len_avail == 0) {
len_avail = CLOG_BUF_LEN_INIT;
clg_str_reserve(cstr, len_avail);
}
while (true) {
uint len_avail = cstr->len_alloc - cstr->len;
va_list args_cpy;
va_copy(args_cpy, args);
int retval = vsnprintf(cstr->data + cstr->len, len_avail, fmt, args_cpy);
va_end(args_cpy);
if (retval != -1) {
cstr->len += retval;
if (retval < 0) {
/* Some encoding error happened, not much we can do here, besides skipping/cancelling this
* message. */
break;
}
else if ((uint)retval <= len_avail) {
/* Copy was successful. */
cstr->len += (uint)retval;
break;
}
else {
len_avail *= 2;
if (len_avail >= len_max) {
/* vsnprintf was not successful, due to lack of allocated space, retval contains expected
* length of the formated string, use it to allocate required amount of memory. */
uint len_alloc = cstr->len + (uint)retval;
if (len_alloc >= len_max) {
/* Safe upper-limit, just in case... */
break;
}
clg_str_reserve(cstr, len_avail);
clg_str_reserve(cstr, len_alloc);
len_avail = cstr->len_alloc - cstr->len;
}
}
}
@@ -345,6 +353,13 @@ static CLG_LogType *clg_ctx_type_register(CLogContext *ctx, const char *identifi
return ty;
}
static void clg_ctx_error_action(CLogContext *ctx)
{
if (ctx->callbacks.error_fn != NULL) {
ctx->callbacks.error_fn(ctx->output_file);
}
}
static void clg_ctx_fatal_action(CLogContext *ctx)
{
if (ctx->callbacks.fatal_fn != NULL) {
@@ -515,6 +530,10 @@ void CLG_logf(CLG_LogType *lg,
clg_ctx_backtrace(lg->ctx);
}
if (severity == CLG_SEVERITY_ERROR) {
clg_ctx_error_action(lg->ctx);
}
if (severity == CLG_SEVERITY_FATAL) {
clg_ctx_fatal_action(lg->ctx);
}
@@ -548,6 +567,12 @@ static void CLG_ctx_output_use_timestamp_set(CLogContext *ctx, int value)
}
}
/** Action on error severity. */
static void CLT_ctx_error_fn_set(CLogContext *ctx, void (*error_fn)(void *file_handle))
{
ctx->callbacks.error_fn = error_fn;
}
/** Action on fatal severity. */
static void CLG_ctx_fatal_fn_set(CLogContext *ctx, void (*fatal_fn)(void *file_handle))
{
@@ -667,6 +692,11 @@ void CLG_output_use_timestamp_set(int value)
CLG_ctx_output_use_timestamp_set(g_ctx, value);
}
void CLG_error_fn_set(void (*error_fn)(void *file_handle))
{
CLT_ctx_error_fn_set(g_ctx, error_fn);
}
void CLG_fatal_fn_set(void (*fatal_fn)(void *file_handle))
{
CLG_ctx_fatal_fn_set(g_ctx, fatal_fn);

View File

@@ -109,6 +109,10 @@ if(WITH_OPENIMAGEDENOISE)
)
endif()
if(WITH_EXPERIMENTAL_FEATURES)
add_definitions(-DWITH_HAIR_NODES)
endif()
blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
# avoid link failure with clang 3.4 debug

View File

@@ -76,6 +76,9 @@ struct BlenderCamera {
int full_width;
int full_height;
int render_width;
int render_height;
BoundBox2D border;
BoundBox2D pano_viewplane;
BoundBox2D viewport_camera_border;
@@ -126,8 +129,10 @@ static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings &b_rende
bcam->matrix = transform_identity();
/* render resolution */
bcam->full_width = render_resolution_x(b_render);
bcam->full_height = render_resolution_y(b_render);
bcam->render_width = render_resolution_x(b_render);
bcam->render_height = render_resolution_y(b_render);
bcam->full_width = bcam->render_width;
bcam->full_height = bcam->render_height;
}
static float blender_camera_focal_distance(BL::RenderEngine &b_engine,
@@ -398,8 +403,8 @@ static void blender_camera_sync(Camera *cam,
/* panorama sensor */
if (bcam->type == CAMERA_PANORAMA && bcam->panorama_type == PANORAMA_FISHEYE_EQUISOLID) {
float fit_xratio = (float)bcam->full_width * bcam->pixelaspect.x;
float fit_yratio = (float)bcam->full_height * bcam->pixelaspect.y;
float fit_xratio = (float)bcam->render_width * bcam->pixelaspect.x;
float fit_yratio = (float)bcam->render_height * bcam->pixelaspect.y;
bool horizontal_fit;
float sensor_size;

View File

@@ -628,6 +628,7 @@ void BlenderSync::sync_particle_hair(
}
}
#ifdef WITH_HAIR_NODES
static float4 hair_point_as_float4(BL::HairPoint b_point)
{
float4 mP = float3_to_float4(get_float3(b_point.co()));
@@ -806,6 +807,15 @@ void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motio
export_hair_curves(scene, hair, b_hair);
}
}
#else
void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motion_step)
{
(void)hair;
(void)b_ob;
(void)motion;
(void)motion_step;
}
#endif
void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph,
BL::Object b_ob,

View File

@@ -19,6 +19,7 @@
#include "render/hair.h"
#include "render/mesh.h"
#include "render/object.h"
#include "render/volume.h"
#include "blender/blender_sync.h"
#include "blender/blender_util.h"
@@ -27,6 +28,19 @@
CCL_NAMESPACE_BEGIN
static Geometry::Type determine_geom_type(BL::Object &b_ob, bool use_particle_hair)
{
if (b_ob.type() == BL::Object::type_HAIR || use_particle_hair) {
return Geometry::HAIR;
}
if (b_ob.type() == BL::Object::type_VOLUME || object_fluid_gas_domain_find(b_ob)) {
return Geometry::VOLUME;
}
return Geometry::MESH;
}
Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
BL::Object &b_ob,
BL::Object &b_ob_instance,
@@ -40,9 +54,7 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
BL::Material material_override = view_layer.material_override;
Shader *default_shader = (b_ob.type() == BL::Object::type_VOLUME) ? scene->default_volume :
scene->default_surface;
Geometry::Type geom_type = (b_ob.type() == BL::Object::type_HAIR || use_particle_hair) ?
Geometry::HAIR :
Geometry::MESH;
Geometry::Type geom_type = determine_geom_type(b_ob, use_particle_hair);
/* Find shader indices. */
vector<Shader *> used_shaders;
@@ -73,6 +85,9 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
if (geom_type == Geometry::HAIR) {
geom = new Hair();
}
else if (geom_type == Geometry::VOLUME) {
geom = new Volume();
}
else {
geom = new Mesh();
}
@@ -121,13 +136,13 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
geom->name = ustring(b_ob_data.name().c_str());
if (b_ob.type() == BL::Object::type_HAIR || use_particle_hair) {
if (geom_type == Geometry::HAIR) {
Hair *hair = static_cast<Hair *>(geom);
sync_hair(b_depsgraph, b_ob, hair, used_shaders);
}
else if (b_ob.type() == BL::Object::type_VOLUME || object_fluid_gas_domain_find(b_ob)) {
Mesh *mesh = static_cast<Mesh *>(geom);
sync_volume(b_ob, mesh, used_shaders);
else if (geom_type == Geometry::VOLUME) {
Volume *volume = static_cast<Volume *>(geom);
sync_volume(b_ob, volume, used_shaders);
}
else {
Mesh *mesh = static_cast<Mesh *>(geom);

View File

@@ -923,6 +923,68 @@ static void create_subd_mesh(Scene *scene,
/* Sync */
static BL::MeshSequenceCacheModifier object_mesh_cache_find(BL::Object &b_ob)
{
if (b_ob.modifiers.length() > 0) {
BL::Modifier b_mod = b_ob.modifiers[b_ob.modifiers.length() - 1];
if (b_mod.type() == BL::Modifier::type_MESH_SEQUENCE_CACHE) {
BL::MeshSequenceCacheModifier mesh_cache = BL::MeshSequenceCacheModifier(b_mod);
if (MeshSequenceCacheModifier_has_velocity_get(&mesh_cache.ptr)) {
return mesh_cache;
}
}
}
return BL::MeshSequenceCacheModifier(PointerRNA_NULL);
}
static void sync_mesh_cached_velocities(BL::Object &b_ob, Scene *scene, Mesh *mesh)
{
if (scene->need_motion() == Scene::MOTION_NONE)
return;
BL::MeshSequenceCacheModifier b_mesh_cache = object_mesh_cache_find(b_ob);
if (!b_mesh_cache) {
return;
}
if (!MeshSequenceCacheModifier_read_velocity_get(&b_mesh_cache.ptr)) {
return;
}
const size_t numverts = mesh->verts.size();
if (b_mesh_cache.vertex_velocities.length() != numverts) {
return;
}
/* Find or add attribute */
float3 *P = &mesh->verts[0];
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
if (!attr_mP) {
attr_mP = mesh->attributes.add(ATTR_STD_MOTION_VERTEX_POSITION);
}
/* Only export previous and next frame, we don't have any in between data. */
float motion_times[2] = {-1.0f, 1.0f};
for (int step = 0; step < 2; step++) {
const float relative_time = motion_times[step] * scene->motion_shutter_time() * 0.5f;
float3 *mP = attr_mP->data_float3() + step * numverts;
BL::MeshSequenceCacheModifier::vertex_velocities_iterator vvi;
int i = 0;
for (b_mesh_cache.vertex_velocities.begin(vvi); vvi != b_mesh_cache.vertex_velocities.end();
++vvi, ++i) {
mP[i] = P[i] + get_float3(vvi->velocity()) * relative_time;
}
}
}
static void sync_mesh_fluid_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
{
if (scene->need_motion() == Scene::MOTION_NONE)
@@ -1002,6 +1064,9 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph,
}
}
/* cached velocities (e.g. from alembic archive) */
sync_mesh_cached_velocities(b_ob, scene, mesh);
/* mesh fluid motion mantaflow */
sync_mesh_fluid_motion(b_ob, scene, mesh);
@@ -1023,6 +1088,12 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
return;
}
/* Cached motion blur already exported. */
BL::MeshSequenceCacheModifier mesh_cache = object_mesh_cache_find(b_ob);
if (mesh_cache) {
return;
}
/* Skip if no vertices were exported. */
size_t numverts = mesh->verts.size();
if (numverts == 0) {

View File

@@ -458,15 +458,19 @@ void BlenderSync::sync_motion(BL::RenderSettings &b_render,
python_thread_state_restore(python_thread_state);
b_engine.frame_set(frame, subframe);
python_thread_state_save(python_thread_state);
sync_camera_motion(b_render, b_cam, width, height, 0.0f);
if (b_cam) {
sync_camera_motion(b_render, b_cam, width, height, 0.0f);
}
sync_objects(b_depsgraph, b_v3d, 0.0f);
}
/* Insert motion times from camera. Motion times from other objects
* have already been added in a sync_objects call. */
uint camera_motion_steps = object_motion_steps(b_cam, b_cam);
for (size_t step = 0; step < camera_motion_steps; step++) {
motion_times.insert(scene->camera->motion_time(step));
if (b_cam) {
uint camera_motion_steps = object_motion_steps(b_cam, b_cam);
for (size_t step = 0; step < camera_motion_steps; step++) {
motion_times.insert(scene->camera->motion_time(step));
}
}
/* note iteration over motion_times set happens in sorted order */

View File

@@ -59,6 +59,7 @@ BlenderSession::BlenderSession(BL::RenderEngine &b_engine,
BL::BlendData &b_data,
bool preview_osl)
: session(NULL),
scene(NULL),
sync(NULL),
b_engine(b_engine),
b_userpref(b_userpref),
@@ -88,6 +89,7 @@ BlenderSession::BlenderSession(BL::RenderEngine &b_engine,
int width,
int height)
: session(NULL),
scene(NULL),
sync(NULL),
b_engine(b_engine),
b_userpref(b_userpref),
@@ -361,7 +363,8 @@ void BlenderSession::do_write_update_render_tile(RenderTile &rtile,
PassType pass_type = BlenderSync::get_pass_type(b_pass);
int components = b_pass.channels();
rtile.buffers->set_pass_rect(pass_type, components, (float *)b_pass.rect());
rtile.buffers->set_pass_rect(
pass_type, components, (float *)b_pass.rect(), rtile.num_samples);
}
end_render_result(b_engine, b_rr, false, false, false);
@@ -492,27 +495,15 @@ void BlenderSession::render(BL::Depsgraph &b_depsgraph_)
/* Update denoising parameters. */
session->set_denoising(session_params.denoising);
bool use_denoising = session_params.denoising.use;
bool store_denoising_passes = session_params.denoising.store_passes;
buffer_params.denoising_data_pass = use_denoising || store_denoising_passes;
buffer_params.denoising_clean_pass = (scene->film->denoising_flags & DENOISING_CLEAN_ALL_PASSES);
buffer_params.denoising_prefiltered_pass = store_denoising_passes &&
session_params.denoising.type == DENOISER_NLM;
scene->film->denoising_data_pass = buffer_params.denoising_data_pass;
scene->film->denoising_clean_pass = buffer_params.denoising_clean_pass;
scene->film->denoising_prefiltered_pass = buffer_params.denoising_prefiltered_pass;
/* Add passes */
/* Compute render passes and film settings. */
vector<Pass> passes = sync->sync_render_passes(
b_rlay, b_view_layer, session_params.adaptive_sampling, session_params.denoising);
buffer_params.passes = passes;
scene->film->pass_alpha_threshold = b_view_layer.pass_alpha_threshold();
scene->film->tag_passes_update(scene, passes);
scene->film->tag_update(scene);
scene->integrator->tag_update(scene);
/* Set buffer params, using film settings from sync_render_passes. */
buffer_params.passes = passes;
buffer_params.denoising_data_pass = scene->film->denoising_data_pass;
buffer_params.denoising_clean_pass = scene->film->denoising_clean_pass;
buffer_params.denoising_prefiltered_pass = scene->film->denoising_prefiltered_pass;
BL::RenderResult::views_iterator b_view_iter;
@@ -655,7 +646,7 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_,
/* Passes are identified by name, so in order to return the combined pass we need to set the
* name. */
Pass::add(PASS_COMBINED, scene->film->passes, "Combined");
Pass::add(PASS_COMBINED, scene->passes, "Combined");
session->read_bake_tile_cb = function_bind(&BlenderSession::read_render_tile, this, _1);
session->write_render_tile_cb = function_bind(&BlenderSession::write_render_tile, this, _1);
@@ -688,7 +679,7 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_,
BufferParams buffer_params;
buffer_params.width = bake_width;
buffer_params.height = bake_height;
buffer_params.passes = scene->film->passes;
buffer_params.passes = scene->passes;
/* Update session. */
session->tile_manager.set_samples(session_params.samples);
@@ -982,7 +973,8 @@ void BlenderSession::update_status_progress()
remaining_time = (1.0 - (double)progress) * (render_time / (double)progress);
if (background) {
scene_status += " | " + scene->name;
if (scene)
scene_status += " | " + scene->name;
if (b_rlay_name != "")
scene_status += ", " + b_rlay_name;

Some files were not shown because too many files have changed in this diff Show More