1
1

Compare commits

..

164 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
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
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
0659560a10 Merge branch 'master' into newboolean 2020-08-26 07:21:08 -04: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
4909e599e8 Some small speedups from parallelizing more parts.
Parallelized bounding box finding and degenerate triangle testing.
2020-08-23 10:12:55 -04:00
f4e337a7da Some tweaks to multithreading parameters based on tests to minimize time. 2020-08-22 15:53:22 -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
0a6ef69509 Cleanup: move break statements into case body, or remove if follwing a return. 2020-08-21 10:16:37 -04: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
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
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
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
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
eac84bf527 Use std::abs instead of fabs in C++ code. 2020-08-19 18:20:31 -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
db292912f4 Fix crash in Debug build for some cases of no intersects. 2020-08-19 07:35:57 -04:00
b1a53cc85b Merge branch 'master' into newboolean 2020-08-19 16:43:30 +10:00
108e6d4ef2 Better performance when there are clusters of coplanar triangles. 2020-08-18 21:51:35 -04:00
5cd49e46f4 Added a sphere/grid test to mesh intersect performance tests. 2020-08-18 06:12:47 -04: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
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
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
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
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
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
8da4842fd5 Fixed bug in understanding of nesting of connected components. 2020-08-08 17:23:11 -04:00
81410044bc Add debugging to face merge. 2020-08-07 09:25:36 -04:00
c581c4ae44 Fix crash when point finding encounters a coplanar stack. 2020-08-05 19:19:48 -04: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
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
ca109986a6 Add some more boolean unit tests. 2020-08-05 10:03:06 -04:00
10109fd1b2 Fix union of two disjoint meshes.
Also added unit test for that.
2020-08-05 09:25:25 -04: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
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
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
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
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
04ba7e05e8 Merge branch 'master' into newboolean 2020-07-31 08:49:42 -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
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
a2dbeb458c Merge branch 'master' into newboolean 2020-07-26 06:47:46 -04:00
accadbc2aa Used wrong #if to isolate debugging code for Windows. 2020-07-26 06:38:02 -04: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
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
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
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
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
4681 changed files with 178317 additions and 266426 deletions

View File

@@ -1,6 +1,3 @@
# The warnings below are disabled because they are too pedantic and not worth fixing.
# Some of them will be enabled as part of the Clang-Tidy task, see T78535.
Checks: > Checks: >
-*, -*,
readability-*, readability-*,
@@ -15,10 +12,15 @@ Checks: >
-readability-misleading-indentation, -readability-misleading-indentation,
-readability-inconsistent-declaration-parameter-name,
-readability-redundant-preprocessor,
-readability-redundant-member-init,
-readability-const-return-type,
-readability-static-accessed-through-instance,
-readability-redundant-declaration,
-readability-qualified-auto,
-readability-use-anyofallof, -readability-use-anyofallof,
-readability-function-cognitive-complexity,
bugprone-*, bugprone-*,
-bugprone-narrowing-conversions, -bugprone-narrowing-conversions,
-bugprone-unhandled-self-assignment, -bugprone-unhandled-self-assignment,
@@ -28,20 +30,7 @@ Checks: >
-bugprone-sizeof-expression, -bugprone-sizeof-expression,
-bugprone-integer-division, -bugprone-integer-division,
-bugprone-incorrect-roundings,
-bugprone-redundant-branch-condition, -bugprone-copy-constructor-init,
modernize-*,
-modernize-use-auto,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-use-equals-default,
-modernize-use-nodiscard,
-modernize-loop-convert,
-modernize-pass-by-value,
-modernize-use-default-member-init,
-modernize-raw-string-literal,
-modernize-avoid-bind,
-modernize-use-transparent-functors,
WarningsAsErrors: '*' WarningsAsErrors: '*'

View File

@@ -1,169 +0,0 @@
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# After running the above, commits listed in this file will be
# ignored by git blame. The blame will be shifted to the person
# who edited the line(s) before the ignored commit.
#
# To disable this ignorance for a command, run as follows
# git blame --ignore-revs-file="" <other options>
#
# Changes that belong here:
# - Massive comment, doxy-sections, or spelling corrections.
# - Clang-format, PEP8 or other automated changes which are *strictly* "no functional change".
# - Several smaller commits should be added to this list at once, because adding
# one extra commit (to edit this file) after every small cleanup is noisy.
#
# Note:
# - The comment above the SHA should be the first line of the commit.
# - It is fine to pack together similar commits if they have the same explanatory comment.
# - Use only 40 character git SHAs; not smaller ones, not prefixed with rB.
#
# https://git-scm.com/docs/git-blame/2.23.0
# white space commit. (2 spaces -> tab).
0a3694cd6ebec710da7110e9f168a72d47c71ee0
# Cycles: Cleanup, spacing after preprocessor
cb4b5e12abf1fc6cf9ffc0944e0a1bc406286c63
# ClangFormat: apply to source, most of intern
e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1
# Code Style: use "#pragma once" in source directory
91694b9b58ab953f3b313be9389cc1303e472fc2
# Code Style: use "#pragma once" in some newer headers
8198dbb888856b8c11757586df02aca15f132f90
# Code Style: use "#pragma once" in intern/ghost
1b1129f82a9cf316b54fbc025f8cfcc1a74b8589
# Cleanup: mostly comments, use doxy syntax & typos
e0cb02587012b4b2f4b18363dc7d0a7da2c02093
# Cleanup: use C comments for descriptive text
2abfcebb0eb7989e3d1e7d03f37ecf5c088210af
# use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed.
afacd184982e58a9c830a3d5366e25983939a7ba
# Spelling: It's Versus Its
3a7fd309fce89213b0224b3c6807adb2d1fe7ca8
# Spelling: Then Versus Than
d1eefc421544e2ea632fb35cb6bcaade4c39ce6b
# Spelling: Miscellaneous
84ef3b80de4915a24a9fd2fd214d0fa44e59b854
# Spelling: Loose Versus Lose
c0a6bc19794c69843c38451c762e91bc10136e0f
# Spelling: Apart Versus A Part
3d26cd01b9ba6381eb165e11536345ae652dfb41
# Cleanup: use 2 space indentation for CMake
3076d95ba441cd32706a27d18922a30f8fd28b8a
# Cleanup: use over-line for doxy comments
4b188bb08cf5aaae3c68ab57bbcfa037eef1ac10
# Cleanup: General comment style clean up of graph_edit.c and fcurve.c
0105f146bb40bd609ccbda3d3f6aeb8e14ad3f9e
# Cleanup: pep8 (indentation, spacing, long lines)
41d2d6da0c96d351b47acb64d3e0decdba16cb16
# Cleanup: pep8, blank lines
bab9de2a52929fe2b45ecddb1eb09da3378e303b
# Cleanup: PEP8 for python changes
1e7e94588daa66483190f45a9de5e98228f80e05
# GPencil: Cleanup pep8
a09cc3ee1a99f2cd5040bbf30c8ab8c588bb2bb1
# Cleanup: trailing space, remove tabs, pep8
c42a6b77b52560d257279de2cb624b4ef2c0d24c
# Cleanup: use C style doxygen comments
8c1726918374e1d2d2123e17bae8db5aadde3433
# Cleanup: use doxy sections for imbuf
c207f7c22e1439e0b285fba5d2c072bdae23f981
# Cleanup: Clang-Tidy, modernize-use-bool-literals
af35ada2f3fa8da4d46b3a71de724d353d716820
# Cleanup: Use nullptr everywhere in fluid code
311031ecd03dbfbf43e1df672a395f24b2e7d4d3
# Cleanup: Clang-Tidy, modernize-redundant-void-arg
a331d5c99299c4514ca33c843b1c79b872f2728d
# Cleanup: Clang-Tidy modernize-use-nullptr
16732def37c5a66f3ea28dbe247b09cc6bca6677
# Cleanup: Clang-tidy, modernize-concat-nested-namespaces
4525049aa0cf818f6483dce589ac9791eb562338
# Cleanup: Clang-tidy else-after-return
ae342ed4511cf2e144dcd27ce2c635d3d536f9ad
# Cleanup: Clang-Tidy, readability-redundant-member-init
190170d4cc92ff34abe1744a10474ac4f1074086
# Cleanup: use 'filepath' instead of 'name' for ImBuf utilities
99f56b4c16323f96c0cbf54e392fb509fcac5bda
# Cleanup: clang-format
c4d8f6a4a8ddc29ed27311ed7578b3c8c31399d2
b5d310b569e07a937798a2d38539cfd290149f1c
8c846cccd6bdfd3e90a695fabbf05f53e5466a57
40d4a4cb1a6b4c3c2a486e8f2868f547530e0811
4eac03d821fa17546f562485f7d073813a5e5943
# Cleanup: use preprocessor version check for PyTypeObject declaration
cd9acfed4f7674b84be965d469a367aef96f8af3
# Cycles: fix compilation of OSL shaders following API change
b980cd163a9d5d77eeffc2e353333e739fa9e719
# Cleanup: clang-tidy suppress warnings for PyTypeObject.tp_print
efd71aad4f22ec0073d80b8dd296015d3f395aa8
# Cleanup: fix wrong merge, remove extra unique_ptr.
6507449e54a167c63a72229e4d0119dd2af68ae5
# Cleanup: fix some clang tidy issues
525a042c5c7513c41240b118acca002f6c60cc12
# Fix T82520: error building freestyle with Python3.8
e118426e4695a97d67e65d69677f3c4e2db50a56
# Cleanup: Clang-tidy, readability-else-after-return
7be47dadea5066ae095c644e0b4f1f10d75f5ab3
# Cleanup: Add `r_` to return parameter
45dca05b1cd2a5ead59144c93d790fdfe7c35ee6
# Cleanup: Typo in `print_default_info` function name.
41a73909dec716642f044e60b40a28335c9fdb10
# Cleanup: Reduce indentation
1cc3a0e2cf73a5ff4f9e0a7f5338eda77266b300
# Build-system: Force C linkage for all DNA type headers
ad4b7741dba45a2be210942c18af6b6e4438f129
# Cleanup: Move function to proper section
c126e27cdc8b28365a9d5f9fafc4d521d1eb83df
# Cleanup: remove break after return statements
bbdfeb751e16d939482d2e4b95c4d470f53f18a5
# Cleanup: clang-tidy
af013ff76feef7e8b8ba642279c62a5dc275d59f
# Cleanup: Make panel type flag names more clear
9d28353b525ecfbcca1501be72e4276dfb2bbc2a

View File

@@ -43,8 +43,8 @@ endif()
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
# Prefer LEGACY OpenGL to be compatible with all the existing releases and # Prever LEGACY OpenGL to eb compatible with all the existing releases and
# platforms which don't have GLVND yet. Only do it if preference was not set # platforms which don't hare GLVND yet. Only do it if preference was not set
# externally. # externally.
if(NOT DEFINED OpenGL_GL_PREFERENCE) if(NOT DEFINED OpenGL_GL_PREFERENCE)
set(OpenGL_GL_PREFERENCE "LEGACY") set(OpenGL_GL_PREFERENCE "LEGACY")
@@ -128,9 +128,7 @@ enable_testing()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
if(MSVC)
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/$<CONFIG>/ CACHE INTERNAL "" FORCE) set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/$<CONFIG>/ CACHE INTERNAL "" FORCE)
else() else()
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/ CACHE INTERNAL "" FORCE) set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/ CACHE INTERNAL "" FORCE)
@@ -178,7 +176,6 @@ mark_as_advanced(BUILDINFO_OVERRIDE_TIME)
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON) option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON) option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON) option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON)
option(WITH_PUGIXML "Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)" ON)
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" ) option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
mark_as_advanced(WITH_SYSTEM_BULLET) mark_as_advanced(WITH_SYSTEM_BULLET)
@@ -199,12 +196,10 @@ option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ON
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ON) option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ON)
option(WITH_POTRACE "Enable features relying on potrace" ON)
option(WITH_OPENVDB "Enable features relying on OpenVDB" ON) option(WITH_OPENVDB "Enable features relying on OpenVDB" ON)
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON) option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON)
option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF) option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF)
mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE) mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE)
option(WITH_NANOVDB "Enable usage of NanoVDB data structure for rendering on the GPU" ON)
# GHOST Windowing Library Options # GHOST Windowing Library Options
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF) option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
@@ -225,6 +220,8 @@ if(WITH_GHOST_X11)
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON) option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
endif() endif()
option(WITH_GMP "Use the gmp library for more accurate booleans" OFF)
# Misc... # Misc...
option(WITH_HEADLESS "Build without graphical support (renderfarm, server mode only)" OFF) option(WITH_HEADLESS "Build without graphical support (renderfarm, server mode only)" OFF)
mark_as_advanced(WITH_HEADLESS) mark_as_advanced(WITH_HEADLESS)
@@ -347,21 +344,16 @@ if(UNIX AND NOT APPLE)
endif() endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
if((WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE) OR WITH_MOD_FLUID)
option(WITH_PYTHON_NUMPY "Include NumPy in Blender (used by Audaspace and Mantaflow)" ON)
endif()
if(WIN32 OR APPLE) if(WIN32 OR APPLE)
# Windows and macOS have this bundled with Python libraries. # Windows and macOS have this bundled with Python libraries.
elseif(WITH_PYTHON_INSTALL OR WITH_PYTHON_NUMPY) elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module") set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
mark_as_advanced(PYTHON_NUMPY_PATH) mark_as_advanced(PYTHON_NUMPY_PATH)
set(PYTHON_NUMPY_INCLUDE_DIRS "" CACHE PATH "Path to the include directory of the NumPy module") set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
endif() endif()
if(WITH_PYTHON_INSTALL) if(WITH_PYTHON_INSTALL)
option(WITH_PYTHON_INSTALL_NUMPY "Copy system NumPy into the blender install folder" ON) option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON) option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
@@ -383,8 +375,7 @@ option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF) option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF) option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL) mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
set(CYCLES_TEST_DEVICES CPU CACHE STRING "Run regression tests on the specified device types (CPU CUDA OPTIX OPENCL)" ) set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 compute_75 CACHE STRING "CUDA architectures to build binaries for")
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 compute_75 CACHE STRING "CUDA architectures to build binaries for")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH) mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT) unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON) option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
@@ -432,8 +423,8 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON) option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
mark_as_advanced(WITH_ASSERT_ABORT) mark_as_advanced(WITH_ASSERT_ABORT)
if((UNIX AND NOT APPLE) OR (CMAKE_GENERATOR MATCHES "^Visual Studio.+")) if(UNIX AND NOT APPLE)
option(WITH_CLANG_TIDY "Use Clang Tidy to analyze the source code (only enable for development on Linux using Clang, or Windows using the Visual Studio IDE)" OFF) option(WITH_CLANG_TIDY "Use Clang Tidy to analyze the source code (only enable for development on Linux using Clang)" OFF)
mark_as_advanced(WITH_CLANG_TIDY) mark_as_advanced(WITH_CLANG_TIDY)
endif() endif()
@@ -446,12 +437,8 @@ if(WIN32)
endif() endif()
# This should be turned off when Blender enter beta/rc/release # This should be turned off when Blender enter beta/rc/release
if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR option(WITH_EXPERIMENTAL_FEATURES "Enable experimental features (still need to enable them in the user preferences)" ON)
"${BLENDER_VERSION_CYCLE}" STREQUAL "rc") mark_as_advanced(WITH_EXPERIMENTAL_FEATURES)
set(WITH_EXPERIMENTAL_FEATURES OFF)
else()
set(WITH_EXPERIMENTAL_FEATURES ON)
endif()
# Unit testsing # Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF) option(WITH_GTESTS "Enable GTest unit testing" OFF)
@@ -523,22 +510,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
-fno-sanitize=alignment \ -fno-sanitize=alignment \
") ")
if(MSVC) if(NOT MSVC) # not all sanitizers are supported with clang-cl, these two however are very vocal about it
# clang-cl doesn't support all sanitizers, but leak and object-size give errors/warnings. set(_asan_defaults "${_asan_defaults} -fsanitize=leak -fsanitize=object-size" )
set(_asan_defaults "${_asan_defaults}")
elseif(APPLE)
# AppleClang doesn't support all sanitizers, but leak gives error.
# Build type is not known for multi-config generator, so don't add object-size sanitizer.
if(CMAKE_BUILD_TYPE MATCHES "Debug" OR GENERATOR_IS_MULTI_CONFIG)
# Silence the warning that object-size is not effective in -O0.
set(_asan_defaults "${_asan_defaults}")
else()
string(APPEND _asan_defaults " -fsanitize=object-size")
endif()
else()
string(APPEND _asan_defaults " -fsanitize=leak -fsanitize=object-size")
endif() endif()
set(COMPILER_ASAN_CFLAGS "${_asan_defaults}" CACHE STRING "C flags for address sanitizer") set(COMPILER_ASAN_CFLAGS "${_asan_defaults}" CACHE STRING "C flags for address sanitizer")
mark_as_advanced(COMPILER_ASAN_CFLAGS) mark_as_advanced(COMPILER_ASAN_CFLAGS)
set(COMPILER_ASAN_CXXFLAGS "${_asan_defaults}" CACHE STRING "C++ flags for address sanitizer") set(COMPILER_ASAN_CXXFLAGS "${_asan_defaults}" CACHE STRING "C++ flags for address sanitizer")
@@ -546,42 +520,20 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
unset(_asan_defaults) unset(_asan_defaults)
if(MSVC) if(NOT MSVC)
find_library( find_library(COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64 else()
find_library(
COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
PATHS PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
) )
elseif(APPLE)
execute_process(COMMAND ${CMAKE_CXX_COMPILER}
-print-file-name=lib
OUTPUT_VARIABLE CLANG_LIB_DIR
)
string(STRIP "${CLANG_LIB_DIR}" CLANG_LIB_DIR)
find_library(
COMPILER_ASAN_LIBRARY
NAMES
libclang_rt.asan_osx_dynamic.dylib
PATHS
"${CLANG_LIB_DIR}/darwin/"
)
unset(CLANG_LIB_DIR)
else()
find_library(
COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}
)
endif() endif()
mark_as_advanced(COMPILER_ASAN_LIBRARY) mark_as_advanced(COMPILER_ASAN_LIBRARY)
endif() endif()
endif() endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
option(WITH_COMPILER_SHORT_FILE_MACRO "Make paths in macros like __FILE__ relative to top level source and build directories." ON)
mark_as_advanced(WITH_COMPILER_SHORT_FILE_MACRO)
endif()
if(WIN32) if(WIN32)
# Use hardcoded paths or find_package to find externals # Use hardcoded paths or find_package to find externals
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF) option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
@@ -610,11 +562,6 @@ if(WIN32)
endif() endif()
if(UNIX)
# See WITH_WINDOWS_SCCACHE for Windows.
option(WITH_COMPILER_CCACHE "Use ccache to improve rebuild times (Works with Ninja, Makefiles and Xcode)" OFF)
endif()
# The following only works with the Ninja generator in CMake >= 3.0. # The following only works with the Ninja generator in CMake >= 3.0.
if("${CMAKE_GENERATOR}" MATCHES "Ninja") if("${CMAKE_GENERATOR}" MATCHES "Ninja")
option(WITH_NINJA_POOL_JOBS option(WITH_NINJA_POOL_JOBS
@@ -709,8 +656,6 @@ set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF) set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
set_and_warn_dependency(WITH_BOOST WITH_USD OFF) set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF) set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF)
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC)) WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
@@ -724,9 +669,6 @@ set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF) set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF) set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
# NanoVDB requires OpenVDB to convert the data structure
set_and_warn_dependency(WITH_OPENVDB WITH_NANOVDB OFF)
# OpenVDB uses 'half' type from OpenEXR & fails to link without OpenEXR enabled. # OpenVDB uses 'half' type from OpenEXR & fails to link without OpenEXR enabled.
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF) set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
@@ -861,10 +803,11 @@ set(CXX_WARNINGS)
set(C_REMOVE_STRICT_FLAGS) set(C_REMOVE_STRICT_FLAGS)
set(CXX_REMOVE_STRICT_FLAGS) set(CXX_REMOVE_STRICT_FLAGS)
# Libraries to link to targets in setup_platform_linker_libs # libraries to link the binary with passed to target_link_libraries()
# known as LLIBS to scons
set(PLATFORM_LINKLIBS "") set(PLATFORM_LINKLIBS "")
# Added to target linker flags in setup_platform_linker_flags # Added to linker flags in setup_liblinks
# - CMAKE_EXE_LINKER_FLAGS # - CMAKE_EXE_LINKER_FLAGS
# - CMAKE_EXE_LINKER_FLAGS_DEBUG # - CMAKE_EXE_LINKER_FLAGS_DEBUG
set(PLATFORM_LINKFLAGS "") set(PLATFORM_LINKFLAGS "")
@@ -872,29 +815,15 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
if(NOT CMAKE_BUILD_TYPE MATCHES "Release") if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
if(WITH_COMPILER_ASAN) if(WITH_COMPILER_ASAN)
if(NOT APPLE) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
# Avoid passing address sanitizer compiler flags to `try_compile`. set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
# Since linker flags are not set, all compiler checks and `find_package`
# calls that rely on `try_compile` will fail.
# See CMP0066 also.
string(APPEND CMAKE_C_FLAGS_DEBUG " ${COMPILER_ASAN_CFLAGS}")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " ${COMPILER_ASAN_CFLAGS}")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " ${COMPILER_ASAN_CXXFLAGS}") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${COMPILER_ASAN_CXXFLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
endif()
if(MSVC) if(MSVC)
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6") set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
endif() endif()
if(COMPILER_ASAN_LIBRARY)
if(APPLE AND COMPILER_ASAN_LIBRARY)
string(REPLACE " " ";" _list_COMPILER_ASAN_CFLAGS ${COMPILER_ASAN_CFLAGS})
set(_is_CONFIG_DEBUG "$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>")
add_compile_options("$<${_is_CONFIG_DEBUG}:${_list_COMPILER_ASAN_CFLAGS}>")
add_link_options("$<${_is_CONFIG_DEBUG}:-fno-omit-frame-pointer;-fsanitize=address>")
unset(_list_COMPILER_ASAN_CFLAGS)
unset(_is_CONFIG_DEBUG)
elseif(COMPILER_ASAN_LIBRARY)
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}") set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}") set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}") set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
@@ -962,11 +891,11 @@ endif()
# Do it globally, SSE2 is required for quite some time now. # Do it globally, SSE2 is required for quite some time now.
# Doing it now allows to use SSE/SSE2 in inline headers. # Doing it now allows to use SSE/SSE2 in inline headers.
if(SUPPORT_SSE_BUILD) if(SUPPORT_SSE_BUILD)
string(PREPEND PLATFORM_CFLAGS "${COMPILER_SSE_FLAG} ") set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}")
add_definitions(-D__SSE__ -D__MMX__) add_definitions(-D__SSE__ -D__MMX__)
endif() endif()
if(SUPPORT_SSE2_BUILD) if(SUPPORT_SSE2_BUILD)
string(APPEND PLATFORM_CFLAGS " ${COMPILER_SSE2_FLAG}") set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}")
add_definitions(-D__SSE2__) add_definitions(-D__SSE2__)
if(NOT SUPPORT_SSE_BUILD) # don't double up if(NOT SUPPORT_SSE_BUILD) # don't double up
add_definitions(-D__MMX__) add_definitions(-D__MMX__)
@@ -1178,8 +1107,8 @@ if(WITH_OPENMP)
if(OPENMP_FOUND) if(OPENMP_FOUND)
if(NOT WITH_OPENMP_STATIC) if(NOT WITH_OPENMP_STATIC)
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else() else()
# Typically avoid adding flags as defines but we can't # Typically avoid adding flags as defines but we can't
# pass OpenMP flags to the linker for static builds, meaning # pass OpenMP flags to the linker for static builds, meaning
@@ -1496,12 +1425,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT -Wno-int-in-bool-context) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT -Wno-int-in-bool-context)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT -Wno-format) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT -Wno-format)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0")) if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
@@ -1540,7 +1467,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISLEADING_INDENTATION -Wno-misleading-indentation)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
@@ -1551,18 +1477,15 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn) ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNDEFINED_VAR_TEMPLATE -Wno-undefined-var-template) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNDEFINED_VAR_TEMPLATE -Wno-undefined-var-template)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_INSTANTIATION_AFTER_SPECIALIZATION -Wno-instantiation-after-specialization) ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_INSTANTIATION_AFTER_SPECIALIZATION -Wno-instantiation-after-specialization)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_MISLEADING_INDENTATION -Wno-misleading-indentation)
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
@@ -1575,8 +1498,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare) ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
# disable numbered, false positives # disable numbered, false positives
string(APPEND C_WARNINGS " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199") set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
string(APPEND CXX_WARNINGS " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199") set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
# most msvc warnings are C & C++ # most msvc warnings are C & C++
set(_WARNINGS set(_WARNINGS
@@ -1607,7 +1530,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
if(MSVC_VERSION GREATER_EQUAL 1911) if(MSVC_VERSION GREATER_EQUAL 1911)
# see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017 # see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
string(APPEND _WARNINGS " /w35038") # order of initialization in c++ constructors set(_WARNINGS "${_WARNINGS} /w35038") # order of initialization in c++ constructors
endif() endif()
string(REPLACE ";" " " _WARNINGS "${_WARNINGS}") string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
@@ -1631,33 +1554,36 @@ if(WITH_PYTHON)
if(WIN32 OR APPLE) if(WIN32 OR APPLE)
# Windows and macOS have this bundled with Python libraries. # Windows and macOS have this bundled with Python libraries.
elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR WITH_PYTHON_NUMPY) elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND)) if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
find_python_package(numpy "core/include") find_python_package(numpy)
unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
endif() endif()
endif() endif()
if(WIN32 OR APPLE) if(WIN32 OR APPLE)
# pass, we have this in lib/python/site-packages # pass, we have this in lib/python/site-packages
elseif(WITH_PYTHON_INSTALL_REQUESTS) elseif(WITH_PYTHON_INSTALL_REQUESTS)
find_python_package(requests "") find_python_package(requests)
endif() endif()
endif() endif()
if(MSVC) if(MSVC)
string(APPEND CMAKE_CXX_FLAGS " /std:c++17") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
# Make MSVC properly report the value of the __cplusplus preprocessor macro # Make MSVC properly report the value of the __cplusplus preprocessor macro
# Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless # Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
# of the C++ standard chosen above # of the C++ standard chosen above
if(MSVC_VERSION GREATER 1913) if(MSVC_VERSION GREATER 1913)
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
endif() endif()
elseif( elseif(
CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCC OR
CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR
CMAKE_C_COMPILER_ID MATCHES "Intel" CMAKE_C_COMPILER_ID MATCHES "Intel"
) )
string(APPEND CMAKE_CXX_FLAGS " -std=c++17") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else() else()
message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++17 build") message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++17 build")
endif() endif()
@@ -1670,47 +1596,12 @@ if(
(CMAKE_C_COMPILER_ID MATCHES "Intel") (CMAKE_C_COMPILER_ID MATCHES "Intel")
) )
# Use C11 + GNU extensions, works with GCC, Clang, ICC # Use C11 + GNU extensions, works with GCC, Clang, ICC
string(APPEND CMAKE_C_FLAGS " -std=gnu11") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif() endif()
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
if(NOT WITH_CXX11_ABI) if(NOT WITH_CXX11_ABI)
string(APPEND PLATFORM_CFLAGS " -D_GLIBCXX_USE_CXX11_ABI=0") set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
endif()
endif()
if(WITH_COMPILER_SHORT_FILE_MACRO)
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
ADD_CHECK_C_COMPILER_FLAG(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_PREFIX_MAP_FLAGS CXX_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
if(C_MACRO_PREFIX_MAP AND CXX_MACRO_PREFIX_MAP)
if(APPLE)
if(XCODE AND ${XCODE_VERSION} VERSION_LESS 12.0)
# Developers may have say LLVM Clang-10.0.1 toolchain (which supports the flag)
# with Xcode-11 (the Clang of which doesn't support the flag).
message(WARNING
"-fmacro-prefix-map flag is NOT supported by Clang shipped with Xcode-${XCODE_VERSION}."
" Some Xcode functionality in Product menu may not work. Disabling WITH_COMPILER_SHORT_FILE_MACRO."
)
set(WITH_COMPILER_SHORT_FILE_MACRO OFF)
endif()
endif()
if(WITH_COMPILER_SHORT_FILE_MACRO)
path_ensure_trailing_slash(_src_dir "${CMAKE_SOURCE_DIR}")
path_ensure_trailing_slash(_bin_dir "${CMAKE_BINARY_DIR}")
# Keep this variable so it can be stripped from build-info.
set(PLATFORM_CFLAGS_FMACRO_PREFIX_MAP
"-fmacro-prefix-map=\"${_src_dir}\"=\"\" -fmacro-prefix-map=\"${_bin_dir}\"=\"\"")
string(APPEND PLATFORM_CFLAGS " ${PLATFORM_CFLAGS_FMACRO_PREFIX_MAP}")
unset(_src_dir)
unset(_bin_dir)
endif()
else()
message(WARNING
"-fmacro-prefix-map flag is NOT supported by C/C++ compiler."
" Disabling WITH_COMPILER_SHORT_FILE_MACRO."
)
set(WITH_COMPILER_SHORT_FILE_MACRO OFF)
endif() endif()
endif() endif()
@@ -1773,10 +1664,6 @@ elseif(WITH_CYCLES_STANDALONE)
endif() endif()
endif() endif()
#-----------------------------------------------------------------------------
# Testing
add_subdirectory(tests)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Blender Application # Blender Application
if(WITH_BLENDER) if(WITH_BLENDER)
@@ -1784,6 +1671,11 @@ if(WITH_BLENDER)
endif() endif()
#-----------------------------------------------------------------------------
# Testing
add_subdirectory(tests)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Define 'heavy' submodules (for Ninja builder when using pools). # Define 'heavy' submodules (for Ninja builder when using pools).
setup_heavy_lib_pool() setup_heavy_lib_pool()
@@ -1813,7 +1705,7 @@ if(FIRST_RUN)
set(_msg " - ${_setting}") set(_msg " - ${_setting}")
string(LENGTH "${_msg}" _len) string(LENGTH "${_msg}" _len)
while("32" GREATER "${_len}") while("32" GREATER "${_len}")
string(APPEND _msg " ") set(_msg "${_msg} ")
math(EXPR _len "${_len} + 1") math(EXPR _len "${_len} + 1")
endwhile() endwhile()
@@ -1831,24 +1723,24 @@ if(FIRST_RUN)
message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"") message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")
info_cfg_text("Build Options:") info_cfg_text("Build Options:")
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_BULLET) info_cfg_option(WITH_BULLET)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FFTW3)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_GMP)
info_cfg_option(WITH_IK_ITASC)
info_cfg_option(WITH_IK_SOLVER) info_cfg_option(WITH_IK_SOLVER)
info_cfg_option(WITH_INPUT_NDOF) info_cfg_option(WITH_IK_ITASC)
info_cfg_option(WITH_INTERNATIONAL)
info_cfg_option(WITH_OPENCOLLADA) info_cfg_option(WITH_OPENCOLLADA)
info_cfg_option(WITH_FFTW3)
info_cfg_option(WITH_INTERNATIONAL)
info_cfg_option(WITH_INPUT_NDOF)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_OPENCOLORIO) info_cfg_option(WITH_OPENCOLORIO)
info_cfg_option(WITH_XR_OPENXR)
info_cfg_option(WITH_OPENIMAGEDENOISE) info_cfg_option(WITH_OPENIMAGEDENOISE)
info_cfg_option(WITH_OPENVDB) info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_QUADRIFLOW) info_cfg_option(WITH_QUADRIFLOW)
info_cfg_option(WITH_TBB)
info_cfg_option(WITH_USD) info_cfg_option(WITH_USD)
info_cfg_option(WITH_XR_OPENXR) info_cfg_option(WITH_TBB)
info_cfg_option(WITH_GMP)
info_cfg_text("Compiler Options:") info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO) info_cfg_option(WITH_BUILDINFO)
@@ -1856,58 +1748,58 @@ if(FIRST_RUN)
info_cfg_text("System Options:") info_cfg_text("System Options:")
info_cfg_option(WITH_INSTALL_PORTABLE) info_cfg_option(WITH_INSTALL_PORTABLE)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)
info_cfg_option(WITH_SYSTEM_GLEW)
info_cfg_option(WITH_X11_ALPHA) info_cfg_option(WITH_X11_ALPHA)
info_cfg_option(WITH_X11_XF86VMODE) info_cfg_option(WITH_X11_XF86VMODE)
info_cfg_option(WITH_X11_XFIXES) info_cfg_option(WITH_X11_XFIXES)
info_cfg_option(WITH_X11_XINPUT) info_cfg_option(WITH_X11_XINPUT)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)
info_cfg_option(WITH_SYSTEM_GLEW)
info_cfg_text("Image Formats:") info_cfg_text("Image Formats:")
info_cfg_option(WITH_OPENIMAGEIO)
info_cfg_option(WITH_IMAGE_CINEON) info_cfg_option(WITH_IMAGE_CINEON)
info_cfg_option(WITH_IMAGE_DDS) info_cfg_option(WITH_IMAGE_DDS)
info_cfg_option(WITH_IMAGE_HDR) info_cfg_option(WITH_IMAGE_HDR)
info_cfg_option(WITH_IMAGE_OPENEXR) info_cfg_option(WITH_IMAGE_OPENEXR)
info_cfg_option(WITH_IMAGE_OPENJPEG) info_cfg_option(WITH_IMAGE_OPENJPEG)
info_cfg_option(WITH_IMAGE_TIFF) info_cfg_option(WITH_IMAGE_TIFF)
info_cfg_option(WITH_OPENIMAGEIO)
info_cfg_text("Audio:") info_cfg_text("Audio:")
info_cfg_option(WITH_CODEC_AVI)
info_cfg_option(WITH_CODEC_FFMPEG)
info_cfg_option(WITH_CODEC_SNDFILE)
info_cfg_option(WITH_JACK)
info_cfg_option(WITH_JACK_DYNLOAD)
info_cfg_option(WITH_OPENAL) info_cfg_option(WITH_OPENAL)
info_cfg_option(WITH_SDL) info_cfg_option(WITH_SDL)
info_cfg_option(WITH_SDL_DYNLOAD) info_cfg_option(WITH_SDL_DYNLOAD)
info_cfg_option(WITH_JACK)
info_cfg_option(WITH_JACK_DYNLOAD)
info_cfg_option(WITH_CODEC_AVI)
info_cfg_option(WITH_CODEC_FFMPEG)
info_cfg_option(WITH_CODEC_SNDFILE)
info_cfg_text("Compression:") info_cfg_text("Compression:")
info_cfg_option(WITH_LZMA) info_cfg_option(WITH_LZMA)
info_cfg_option(WITH_LZO) info_cfg_option(WITH_LZO)
info_cfg_text("Python:") info_cfg_text("Python:")
if(APPLE)
info_cfg_option(WITH_PYTHON_FRAMEWORK)
endif()
info_cfg_option(WITH_PYTHON_INSTALL) info_cfg_option(WITH_PYTHON_INSTALL)
info_cfg_option(WITH_PYTHON_INSTALL_NUMPY) info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
info_cfg_option(WITH_PYTHON_MODULE) info_cfg_option(WITH_PYTHON_MODULE)
info_cfg_option(WITH_PYTHON_SAFETY) info_cfg_option(WITH_PYTHON_SAFETY)
if(APPLE)
info_cfg_option(WITH_PYTHON_FRAMEWORK)
endif()
info_cfg_text("Modifiers:") info_cfg_text("Modifiers:")
info_cfg_option(WITH_MOD_REMESH)
info_cfg_option(WITH_MOD_FLUID) info_cfg_option(WITH_MOD_FLUID)
info_cfg_option(WITH_MOD_OCEANSIM) info_cfg_option(WITH_MOD_OCEANSIM)
info_cfg_option(WITH_MOD_REMESH)
info_cfg_text("OpenGL:") info_cfg_text("OpenGL:")
info_cfg_option(WITH_GLEW_ES)
info_cfg_option(WITH_GL_EGL)
info_cfg_option(WITH_GL_PROFILE_ES20)
if(WIN32) if(WIN32)
info_cfg_option(WITH_GL_ANGLE) info_cfg_option(WITH_GL_ANGLE)
endif() endif()
info_cfg_option(WITH_GL_EGL)
info_cfg_option(WITH_GL_PROFILE_ES20)
info_cfg_option(WITH_GLEW_ES)
info_cfg_text("") info_cfg_text("")

View File

@@ -41,7 +41,6 @@ Convenience Targets
* developer: Enable faster builds, error checking and tests, recommended for developers. * developer: Enable faster builds, error checking and tests, recommended for developers.
* config: Run cmake configuration tool to set build options. * config: Run cmake configuration tool to set build options.
* ninja: Use ninja build tool for faster builds. * ninja: Use ninja build tool for faster builds.
* ccache: Use ccache for faster rebuilds.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir. Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments. Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
@@ -82,19 +81,11 @@ Static Source Code Checking
* check_splint: Run blenders source through splint (C only). * check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only). * check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only). * check_smatch: Run blenders source through smatch (C only).
* check_descriptions: Check for duplicate/invalid descriptions. * check_spelling_c: Check for spelling errors (C/C++ only).
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
Spell Checkers
* check_spelling_c: Check for spelling errors (C/C++ only),
* check_spelling_osl: Check for spelling errors (OSL only). * check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only). * check_spelling_py: Check for spelling errors (Python only).
* check_descriptions: Check for duplicate/invalid descriptions.
Note that spell checkers can take a 'CHECK_SPELLING_CACHE' filepath argument,
so re-running does not need to re-check unchanged files.
Example:
make check_spelling_c CHECK_SPELLING_CACHE=../spelling_cache.data
Utilities Utilities
Not associated with building Blender. Not associated with building Blender.
@@ -242,10 +233,6 @@ ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS) CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
endif endif
ifneq "$(findstring ccache, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-DWITH_COMPILER_CCACHE=YES $(CMAKE_CONFIG_ARGS)
endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# build tool # build tool
@@ -345,7 +332,6 @@ headless: all
bpy: all bpy: all
developer: all developer: all
ninja: all ninja: all
ccache: all
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Build dependencies # Build dependencies
@@ -471,17 +457,26 @@ check_spelling_c: .FORCE
cd "$(BUILD_DIR)" ; \ cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \ PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \ "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/source" \ "$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \ "$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \ "$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \ "$(BLENDER_DIR)/intern/ghost" \
check_spelling_c_qtc: .FORCE
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl: .FORCE check_spelling_osl: .FORCE
cd "$(BUILD_DIR)" ;\ cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 $(PYTHON) \ PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \ "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" "$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions: .FORCE check_descriptions: .FORCE
@@ -523,7 +518,7 @@ doc_py: .FORCE
ASAN_OPTIONS=halt_on_error=0 \ ASAN_OPTIONS=halt_on_error=0 \
$(BLENDER_BIN) --background -noaudio --factory-startup \ $(BLENDER_BIN) --background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py --python doc/python_api/sphinx_doc_gen.py
sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'" @echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
doc_doxy: .FORCE doc_doxy: .FORCE

View File

@@ -30,11 +30,11 @@
# build_deps 2015 x64 / build_deps 2015 x86 # build_deps 2015 x64 / build_deps 2015 x86
# #
# MAC OS X USAGE: # MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake bison cmake libtool pkg-config yasm # Install with homebrew: brew install cmake autoconf automake libtool yasm nasm bison
# Run "make deps" from main Blender directory # Run "make deps" from main Blender directory
# #
# LINUX USAGE: # LINUX USAGE:
# Install compiler cmake autoconf automake libtool yasm tcl # Install compiler cmake autoconf automake libtool yasm nasm tcl
# Run "make deps" from main Blender directory # Run "make deps" from main Blender directory
# #
#################################################################################################### ####################################################################################################
@@ -75,8 +75,6 @@ include(cmake/llvm.cmake)
include(cmake/clang.cmake) include(cmake/clang.cmake)
if(APPLE) if(APPLE)
include(cmake/openmp.cmake) include(cmake/openmp.cmake)
endif()
if(UNIX)
include(cmake/nasm.cmake) include(cmake/nasm.cmake)
endif() endif()
include(cmake/openimageio.cmake) include(cmake/openimageio.cmake)
@@ -85,16 +83,18 @@ include(cmake/flexbison.cmake)
include(cmake/osl.cmake) include(cmake/osl.cmake)
include(cmake/tbb.cmake) include(cmake/tbb.cmake)
include(cmake/openvdb.cmake) include(cmake/openvdb.cmake)
include(cmake/nanovdb.cmake)
include(cmake/python.cmake) include(cmake/python.cmake)
include(cmake/python_site_packages.cmake) include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake) include(cmake/package_python.cmake)
include(cmake/numpy.cmake) include(cmake/numpy.cmake)
include(cmake/usd.cmake) include(cmake/usd.cmake)
include(cmake/potrace.cmake)
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed. # Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake) include(cmake/boost.cmake)
include(cmake/pugixml.cmake) if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
if((NOT APPLE) OR ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")) if((NOT APPLE) OR ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
include(cmake/ispc.cmake) include(cmake/ispc.cmake)
include(cmake/openimagedenoise.cmake) include(cmake/openimagedenoise.cmake)
@@ -114,11 +114,13 @@ if(WIN32)
include(cmake/yamlcpp.cmake) include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience # LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
# include(cmake/lcms.cmake) # include(cmake/lcms.cmake)
endif() endif()
if(NOT WIN32 OR ENABLE_MINGW64) if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/gmp.cmake) include(cmake/gmp.cmake)
include(cmake/openjpeg.cmake) include(cmake/openjpeg.cmake)
include(cmake/gmp.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release) if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32) if(WIN32)
include(cmake/zlib_mingw.cmake) include(cmake/zlib_mingw.cmake)

View File

@@ -26,11 +26,11 @@ if(UNIX)
set(_required_software set(_required_software
autoconf autoconf
automake automake
bison
${_libtoolize_name} ${_libtoolize_name}
pkg-config nasm
tclsh
yasm yasm
tclsh
bison
) )
foreach(_software ${_required_software}) foreach(_software ${_required_software})
@@ -42,14 +42,8 @@ if(UNIX)
endforeach() endforeach()
if(APPLE) if(APPLE)
# Homebrew has different default locations for ARM and Intel macOS. if(NOT EXISTS "/usr/local/opt/bison/bin/bison")
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64") set(_software_missing "${_software_missing} bison")
set(HOMEBREW_LOCATION "/opt/homebrew")
else()
set(HOMEBREW_LOCATION "/usr/local")
endif()
if(NOT EXISTS "${HOMEBREW_LOCATION}/opt/bison/bin/bison")
string(APPEND _software_missing " bison")
endif() endif()
endif() endif()
@@ -60,10 +54,10 @@ if(UNIX)
" ${_software_missing}\n" " ${_software_missing}\n"
"\n" "\n"
"On Debian and Ubuntu:\n" "On Debian and Ubuntu:\n"
" apt install autoconf automake libtool yasm tcl\n" " apt install autoconf automake libtool yasm nasm tcl\n"
"\n" "\n"
"On macOS (with homebrew):\n" "On macOS (with homebrew):\n"
" brew install autoconf automake bison libtool pkg-config yasm\n" " brew install cmake autoconf automake libtool yasm nasm bison\n"
"\n" "\n"
"Other platforms:\n" "Other platforms:\n"
" Install equivalent packages.\n") " Install equivalent packages.\n")

View File

@@ -17,14 +17,13 @@
# ***** END GPL LICENSE BLOCK ***** # ***** END GPL LICENSE BLOCK *****
set(CLANG_EXTRA_ARGS set(CLANG_EXTRA_ARGS
-DLLVM_DIR="${LIBDIR}/llvm/lib/cmake/llvm/" -DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MD -DLLVM_USE_CRT_RELEASE=MD
-DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config -DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
) )
set(BUILD_CLANG_TOOLS OFF)
if(WIN32) if(WIN32)
set(CLANG_GENERATOR "Ninja") set(CLANG_GENERATOR "Ninja")
else() else()
@@ -32,32 +31,11 @@ else()
endif() endif()
if(APPLE) if(APPLE)
set(BUILD_CLANG_TOOLS ON)
set(CLANG_EXTRA_ARGS ${CLANG_EXTRA_ARGS} set(CLANG_EXTRA_ARGS ${CLANG_EXTRA_ARGS}
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a -DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
) )
endif() endif()
if(BUILD_CLANG_TOOLS)
# ExternalProject_Add does not allow multiple tarballs to be
# downloaded. Work around this by having an empty build action
# for the extra tools, and referring the clang build to the location
# of the clang-tools-extra source.
ExternalProject_Add(external_clang_tools
URL ${CLANG_TOOLS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_TOOLS_HASH}
INSTALL_DIR ${LIBDIR}/clang_tools
PREFIX ${BUILD_DIR}/clang_tools
CONFIGURE_COMMAND echo "."
BUILD_COMMAND echo "."
INSTALL_COMMAND echo "."
)
list(APPEND CLANG_EXTRA_ARGS
-DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=${BUILD_DIR}/clang_tools/src/external_clang_tools/
)
endif()
ExternalProject_Add(external_clang ExternalProject_Add(external_clang
URL ${CLANG_URI} URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR} DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -86,19 +64,3 @@ add_dependencies(
external_clang external_clang
ll ll
) )
if(BUILD_CLANG_TOOLS)
# `external_clang_tools` is for downloading the source, not compiling it.
add_dependencies(
external_clang
external_clang_tools
)
endif()
# We currently do not build libxml2 on Windows.
if(NOT WIN32)
add_dependencies(
external_clang
external_xml2
)
endif()

View File

@@ -52,11 +52,6 @@ if(APPLE)
--target-os=darwin --target-os=darwin
--x86asmexe=${LIBDIR}/nasm/bin/nasm --x86asmexe=${LIBDIR}/nasm/bin/nasm
) )
elseif(UNIX)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
endif() endif()
ExternalProject_Add(external_ffmpeg ExternalProject_Add(external_ffmpeg
@@ -147,7 +142,7 @@ if(WIN32)
external_zlib_mingw external_zlib_mingw
) )
endif() endif()
if(UNIX) if(APPLE)
add_dependencies( add_dependencies(
external_ffmpeg external_ffmpeg
external_nasm external_nasm

View File

@@ -20,31 +20,11 @@ set(GMP_EXTRA_ARGS -enable-cxx)
if(WIN32) if(WIN32)
# Shared for windows because static libs will drag in a libgcc dependency. # Shared for windows because static libs will drag in a libgcc dependency.
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32) set(GMP_OPTIONS --disable-static --enable-shared --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
else() else()
set(GMP_OPTIONS --enable-static --disable-shared ) set(GMP_OPTIONS --enable-static --disable-shared )
endif() endif()
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(GMP_OPTIONS
${GMP_OPTIONS}
--disable-assembly
)
else()
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
)
endif()
elseif(UNIX)
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
--enable-fat
)
endif()
ExternalProject_Add(external_gmp ExternalProject_Add(external_gmp
URL ${GMP_URI} URL ${GMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR} DOWNLOAD_DIR ${DOWNLOAD_DIR}

View File

@@ -26,7 +26,6 @@ endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}") message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32) if(WIN32)
if(BUILD_MODE STREQUAL Release) if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include COMMAND # jpeg rename libfile + copy include
@@ -98,10 +97,6 @@ harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a") harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a") harvest(lame/lib ffmpeg/lib "*.a")
harvest(clang/bin llvm/bin "clang-format") harvest(clang/bin llvm/bin "clang-format")
if(BUILD_CLANG_TOOLS)
harvest(clang/bin llvm/bin "clang-tidy")
harvest(clang/share/clang llvm/share "run-clang-tidy.py")
endif()
harvest(clang/include llvm/include "*") harvest(clang/include llvm/include "*")
harvest(llvm/include llvm/include "*") harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config") harvest(llvm/bin llvm/bin "llvm-config")
@@ -151,7 +146,6 @@ harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a") harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h") harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a") harvest(openvdb/lib openvdb/lib "*.a")
harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h")
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h") harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a") harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest(osl/bin osl/bin "oslc") harvest(osl/bin osl/bin "oslc")
@@ -160,8 +154,6 @@ harvest(osl/lib osl/lib "*.a")
harvest(osl/shaders osl/shaders "*.h") harvest(osl/shaders osl/shaders "*.h")
harvest(png/include png/include "*.h") harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a") harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m") harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h") harvest(python/include python/include "*h")
harvest(python/lib python/lib "*") harvest(python/lib python/lib "*")
@@ -185,8 +177,6 @@ harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(usd/include usd/include "*.h") harvest(usd/include usd/include "*.h")
harvest(usd/lib/usd usd/lib/usd "*") harvest(usd/lib/usd usd/lib/usd "*")
harvest(usd/plugin usd/plugin "*") harvest(usd/plugin usd/plugin "*")
harvest(potrace/include potrace/include "*.h")
harvest(potrace/lib potrace/lib "*.a")
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*") harvest(libglu/lib mesa/lib "*.so*")

View File

@@ -25,13 +25,8 @@ if(WIN32)
elseif(APPLE) elseif(APPLE)
# Use bison installed via Homebrew. # Use bison installed via Homebrew.
# The one which comes which Xcode toolset is too old. # The one which comes which Xcode toolset is too old.
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(HOMEBREW_LOCATION "/opt/homebrew")
else()
set(HOMEBREW_LOCATION "/usr/local")
endif()
set(ISPC_EXTRA_ARGS_APPLE set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=${HOMEBREW_LOCATION}/opt/bison/bin/bison -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
) )
elseif(UNIX) elseif(UNIX)
set(ISPC_EXTRA_ARGS_UNIX set(ISPC_EXTRA_ARGS_UNIX
@@ -48,7 +43,6 @@ set(ISPC_EXTRA_ARGS
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm -DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib -DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_EXECUTABLE=${LIBDIR}/clang/bin/clang -DCLANG_EXECUTABLE=${LIBDIR}/clang/bin/clang
-DCLANGPP_EXECUTABLE=${LIBDIR}/clang/bin/clang++
-DISPC_INCLUDE_TESTS=Off -DISPC_INCLUDE_TESTS=Off
-DCLANG_LIBRARY_DIR=${LIBDIR}/clang/lib -DCLANG_LIBRARY_DIR=${LIBDIR}/clang/lib
-DCLANG_INCLUDE_DIRS=${LIBDIR}/clang/include -DCLANG_INCLUDE_DIRS=${LIBDIR}/clang/include

View File

@@ -59,4 +59,4 @@ else(WIN32)
) )
set(JPEG_LIBRARY libjpeg${LIBEXT}) set(JPEG_LIBRARY libjpeg${LIBEXT})
endif() endif(WIN32)

View File

@@ -1,54 +0,0 @@
# ***** 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(NANOVDB_EXTRA_ARGS
# NanoVDB is header-only, so only need the install target
-DNANOVDB_BUILD_UNITTESTS=OFF
-DNANOVDB_BUILD_EXAMPLES=OFF
-DNANOVDB_BUILD_BENCHMARK=OFF
-DNANOVDB_BUILD_DOCS=OFF
-DNANOVDB_BUILD_TOOLS=OFF
-DNANOVDB_CUDA_KEEP_PTX=OFF
# Do not need to include any of the dependencies because of this
-DNANOVDB_USE_OPENVDB=OFF
-DNANOVDB_USE_OPENGL=OFF
-DNANOVDB_USE_OPENCL=OFF
-DNANOVDB_USE_CUDA=OFF
-DNANOVDB_USE_TBB=OFF
-DNANOVDB_USE_BLOSC=OFF
-DNANOVDB_USE_ZLIB=OFF
-DNANOVDB_USE_OPTIX=OFF
-DNANOVDB_ALLOW_FETCHCONTENT=OFF
)
ExternalProject_Add(nanovdb
URL ${NANOVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NANOVDB_HASH}
PREFIX ${BUILD_DIR}/nanovdb
SOURCE_SUBDIR nanovdb
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanovdb ${DEFAULT_CMAKE_FLAGS} ${NANOVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/nanovdb
)
if(WIN32)
ExternalProject_Add_Step(nanovdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/nanovdb/nanovdb ${HARVEST_TARGET}/nanovdb/include/nanovdb
DEPENDEES install
)
endif()

View File

@@ -112,9 +112,6 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT} -DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT} -DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF -DSTOP_ON_WARNING=OFF
-DUSE_EXTERNAL_PUGIXML=ON
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
${WEBP_FLAGS} ${WEBP_FLAGS}
${OIIO_SIMD_FLAGS} ${OIIO_SIMD_FLAGS}
) )
@@ -137,7 +134,6 @@ add_dependencies(
external_jpeg external_jpeg
external_boost external_boost
external_tiff external_tiff
external_pugixml
external_openjpeg${OPENJPEG_POSTFIX} external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP} ${WEBP_DEP}
) )

View File

@@ -96,7 +96,7 @@ add_dependencies(
if(WIN32) if(WIN32)
if(BUILD_MODE STREQUAL Release) if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include/openvdb ${HARVEST_TARGET}/openvdb/include/openvdb COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.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 COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
DEPENDEES install DEPENDEES install

View File

@@ -56,7 +56,7 @@ if(WIN32)
if(MSVC_VERSION GREATER 1909) if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings. set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif() endif()
string(APPEND COMMON_MSVC_FLAGS " /bigobj") set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG) if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS") set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else() else()

View File

@@ -78,10 +78,14 @@ set(OSL_EXTRA_ARGS
-DINSTALL_DOCS=OFF -DINSTALL_DOCS=OFF
${OSL_SIMD_FLAGS} ${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES= -DPARTIO_LIBRARIES=
-DPUGIXML_HOME=${LIBDIR}/pugixml
) )
if(APPLE) if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF, # Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS # avoids linker warnings on macOS
set(OSL_EXTRA_ARGS set(OSL_EXTRA_ARGS
@@ -110,9 +114,17 @@ add_dependencies(
external_zlib external_zlib
external_flexbison external_flexbison
external_openimageio external_openimageio
external_pugixml
) )
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
add_dependencies(
external_osl
external_pugixml
)
endif()
if(WIN32) if(WIN32)
if(BUILD_MODE STREQUAL Release) if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install ExternalProject_Add_Step(external_osl after_install

View File

@@ -1,38 +0,0 @@
# ***** 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(POTRACE_EXTRA_ARGS
)
if((WIN32 AND BUILD_MODE STREQUAL Release) OR UNIX)
ExternalProject_Add(external_potrace
URL ${POTRACE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${POTRACE_HASH}
PREFIX ${BUILD_DIR}/potrace
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_potrace.txt ${BUILD_DIR}/potrace/src/external_potrace/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/potrace ${DEFAULT_CMAKE_FLAGS} ${POTRACE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/potrace
)
if(WIN32)
ExternalProject_Add_Step(external_potrace after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/potrace ${HARVEST_TARGET}/potrace
DEPENDEES install
)
endif()
endif()

View File

@@ -30,14 +30,14 @@ ExternalProject_Add(external_pugixml
if(WIN32) if(WIN32)
if(BUILD_MODE STREQUAL Release) if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pugixml ${HARVEST_TARGET}/pugixml COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install DEPENDEES install
) )
endif() endif()
if(BUILD_MODE STREQUAL Debug) if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/pugixml/lib/pugixml_d.lib COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install DEPENDEES install
) )
endif() endif()
endif() endif()

View File

@@ -120,9 +120,6 @@ set(LLVM_HASH 31eb9ce73dd2a0f8dcab8319fb03f8fc)
set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz) set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz)
set(CLANG_HASH 13468e4a44940efef1b75e8641752f90) set(CLANG_HASH 13468e4a44940efef1b75e8641752f90)
set(CLANG_TOOLS_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-tools-extra-${LLVM_VERSION}.src.tar.xz)
set(CLANG_TOOLS_HASH c76293870b564c6a7968622b475b7646)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz) set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf) set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
@@ -149,13 +146,9 @@ set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 26263622e9187212ec240dcf01b66207) set(TBB_HASH 26263622e9187212ec240dcf01b66207)
set(OPENVDB_VERSION 7.0.0) set(OPENVDB_VERSION 7.0.0)
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz) set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH fd6c4f168282f7e0e494d290cd531fa8) set(OPENVDB_HASH fd6c4f168282f7e0e494d290cd531fa8)
set(NANOVDB_GIT_UID e62f7a0bf1e27397223c61ddeaaf57edf111b77f)
set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz)
set(NANOVDB_HASH 90919510bc6ccd630fedc56f748cb199)
set(IDNA_VERSION 2.9) set(IDNA_VERSION 2.9)
set(CHARDET_VERSION 3.0.4) set(CHARDET_VERSION 3.0.4)
set(URLLIB3_VERSION 1.25.9) set(URLLIB3_VERSION 1.25.9)
@@ -300,9 +293,9 @@ set(USD_VERSION 20.05)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz) set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH 6d679e739e7f65725d9c029e37dda9fc) set(USD_HASH 6d679e739e7f65725d9c029e37dda9fc)
set(OIDN_VERSION 1.2.3) set(OIDN_VERSION 1.2.1)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz) set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
set(OIDN_HASH 1f11466c2c3efc27faba5ec7078d12b2) set(OIDN_HASH cbebc1a25eb6de62af3a59e943063608)
set(LIBGLU_VERSION 9.0.1) set(LIBGLU_VERSION 9.0.1)
set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz) set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz)
@@ -320,14 +313,10 @@ 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_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07) set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07)
set(ISPC_VERSION v1.14.1) set(ISPC_VERSION v1.13.0)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz) set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
set(ISPC_HASH 968fbc8dfd16a60ba4e32d2e0e03ea7a) set(ISPC_HASH 4bf5e8d0020c4b9980faa702c1a6f25f)
set(GMP_VERSION 6.2.0) set(GMP_VERSION 6.2.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz) set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1) set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1)
set(POTRACE_VERSION 1.16)
set(POTRACE_URI http://potrace.sourceforge.net/download/${POTRACE_VERSION}/potrace-${POTRACE_VERSION}.tar.gz)
set(POTRACE_HASH 5f0bd87ddd9a620b0c4e65652ef93d69)

View File

@@ -34,12 +34,6 @@ else()
set(X264_CONFIGURE_ENV echo .) set(X264_CONFIGURE_ENV echo .)
endif() endif()
if(UNIX AND NOT APPLE)
set(X264_CONFIGURE_ENV
export AS=${LIBDIR}/nasm/bin/nasm
)
endif()
ExternalProject_Add(external_x264 ExternalProject_Add(external_x264
URL ${X264_URI} URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR} DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -60,7 +54,7 @@ if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw) set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif() endif()
if(UNIX) if(APPLE)
add_dependencies( add_dependencies(
external_x264 external_x264
external_nasm external_nasm

View File

@@ -51,7 +51,7 @@ ARGS=$( \
getopt \ getopt \
-o s:i:t:h \ -o s:i:t:h \
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\ --long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
with-all,with-opencollada,with-jack,with-embree,with-oidn,with-nanovdb,\ with-all,with-opencollada,with-jack,with-embree,with-oidn,\
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,\ ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,\
force-all,force-python,force-numpy,force-boost,force-tbb,\ force-all,force-python,force-numpy,force-boost,force-tbb,\
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\ force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
@@ -151,9 +151,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--with-oidn --with-oidn
Build and install the OpenImageDenoise libraries. Build and install the OpenImageDenoise libraries.
--with-nanovdb
Build and install the NanoVDB branch of OpenVDB (instead of official release of OpenVDB).
--with-jack --with-jack
Install the jack libraries. Install the jack libraries.
@@ -438,7 +435,7 @@ _with_built_openexr=false
OIIO_VERSION="2.1.15.0" OIIO_VERSION="2.1.15.0"
OIIO_VERSION_SHORT="2.1" OIIO_VERSION_SHORT="2.1"
OIIO_VERSION_MIN="2.1.12" OIIO_VERSION_MIN="1.8"
OIIO_VERSION_MAX="3.0" OIIO_VERSION_MAX="3.0"
OIIO_FORCE_BUILD=false OIIO_FORCE_BUILD=false
OIIO_FORCE_REBUILD=false OIIO_FORCE_REBUILD=false
@@ -477,7 +474,7 @@ OPENVDB_BLOSC_VERSION="1.5.0"
OPENVDB_VERSION="7.0.0" OPENVDB_VERSION="7.0.0"
OPENVDB_VERSION_SHORT="7.0" OPENVDB_VERSION_SHORT="7.0"
OPENVDB_VERSION_MIN="7.0" OPENVDB_VERSION_MIN="7.0"
OPENVDB_VERSION_MAX="7.1" OPENVDB_VERSION_MAX="8.0"
OPENVDB_FORCE_BUILD=false OPENVDB_FORCE_BUILD=false
OPENVDB_FORCE_REBUILD=false OPENVDB_FORCE_REBUILD=false
OPENVDB_SKIP=false OPENVDB_SKIP=false
@@ -515,7 +512,7 @@ EMBREE_FORCE_BUILD=false
EMBREE_FORCE_REBUILD=false EMBREE_FORCE_REBUILD=false
EMBREE_SKIP=false EMBREE_SKIP=false
OIDN_VERSION="1.2.3" OIDN_VERSION="1.2.1"
OIDN_VERSION_SHORT="1.2" OIDN_VERSION_SHORT="1.2"
OIDN_VERSION_MIN="1.2.0" OIDN_VERSION_MIN="1.2.0"
OIDN_VERSION_MAX="1.3" OIDN_VERSION_MAX="1.3"
@@ -523,7 +520,7 @@ OIDN_FORCE_BUILD=false
OIDN_FORCE_REBUILD=false OIDN_FORCE_REBUILD=false
OIDN_SKIP=false OIDN_SKIP=false
ISPC_VERSION="1.14.1" ISPC_VERSION="1.14.0"
FFMPEG_VERSION="4.2.3" FFMPEG_VERSION="4.2.3"
FFMPEG_VERSION_SHORT="4.2" FFMPEG_VERSION_SHORT="4.2"
@@ -679,10 +676,6 @@ while true; do
--with-oidn) --with-oidn)
WITH_OIDN=true; shift; continue WITH_OIDN=true; shift; continue
;; ;;
--with-nanovdb)
WITH_NANOVDB=true;
shift; continue
;;
--with-jack) --with-jack)
WITH_JACK=true; shift; continue; WITH_JACK=true; shift; continue;
;; ;;
@@ -964,11 +957,6 @@ if [ "$WITH_ALL" = true -a "$OIDN_SKIP" = false ]; then
fi fi
if [ "$WITH_ALL" = true ]; then if [ "$WITH_ALL" = true ]; then
WITH_JACK=true WITH_JACK=true
WITH_NANOVDB=true
fi
if [ "$WITH_NANOVDB" = true ]; then
OPENVDB_FORCE_BUILD=true
fi fi
@@ -1041,15 +1029,11 @@ OSD_SOURCE=( "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${OSD
OPENVDB_USE_REPO=false OPENVDB_USE_REPO=false
OPENVDB_BLOSC_SOURCE=( "https://github.com/Blosc/c-blosc/archive/v${OPENVDB_BLOSC_VERSION}.tar.gz" ) OPENVDB_BLOSC_SOURCE=( "https://github.com/Blosc/c-blosc/archive/v${OPENVDB_BLOSC_VERSION}.tar.gz" )
OPENVDB_SOURCE=( "https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz" ) OPENVDB_SOURCE=( "https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz" )
#~ OPENVDB_SOURCE_REPO=( "https://github.com/AcademySoftwareFoundation/openvdb.git" ) #~ OPENVDB_SOURCE_REPO=( "https:///dreamworksanimation/openvdb.git" )
#~ OPENVDB_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee" #~ OPENVDB_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee"
#~ OPENVDB_SOURCE_REPO_BRANCH="dev" #~ OPENVDB_SOURCE_REPO_BRANCH="dev"
NANOVDB_USE_REPO=false
NANOVDB_SOURCE_REPO_UID="e62f7a0bf1e27397223c61ddeaaf57edf111b77f"
NANOVDB_SOURCE=( "https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_SOURCE_REPO_UID}.tar.gz" )
ALEMBIC_USE_REPO=false ALEMBIC_USE_REPO=false
ALEMBIC_SOURCE=( "https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz" ) ALEMBIC_SOURCE=( "https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz" )
# ALEMBIC_SOURCE_REPO=( "https://github.com/alembic/alembic.git" ) # ALEMBIC_SOURCE_REPO=( "https://github.com/alembic/alembic.git" )
@@ -1103,7 +1087,7 @@ Those libraries should be available as packages in all recent distributions (opt
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal]. * libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
* libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp.
* libsdl2, libglew, libpugixml, libpotrace, [libgmp], [libglewmx], fontconfig.\"" * libsdl2, libglew, [libgmp], [libglewmx], fontconfig.\""
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES: DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
@@ -1275,16 +1259,13 @@ version_match() {
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Generic compile helpers # Generic compile helpers
prepare_inst() { prepare_opt() {
INFO "Ensuring $INST exists and is writable by us" INFO "Ensuring $INST exists and is writable by us"
if [ ! $SUDO ]; then if [ ! $SUDO ]; then
WARNING "--no-sudo enabled, might be impossible to create install dir..." WARNING "--no-sudo enabled, might be impossible to create install dir..."
fi fi
if [ ! -d $INST ]; then if [ ! -d $INST ]; then
# Try to create normal user directory first to possibly avoid excessive $SUDO mkdir -p $INST
# system operations
mkdir -p $INST || $SUDO mkdir -p $INST
fi fi
if [ ! -w $INST ]; then if [ ! -w $INST ]; then
@@ -1385,7 +1366,7 @@ compile_Python() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_python _update_deps_python
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -1471,7 +1452,7 @@ compile_Numpy() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_numpy _update_deps_numpy
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -1560,7 +1541,7 @@ compile_Boost() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_boost _update_deps_boost
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
INFO "Downloading Boost-$BOOST_VERSION" INFO "Downloading Boost-$BOOST_VERSION"
@@ -1654,7 +1635,7 @@ compile_TBB() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_tbb _update_deps_tbb
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
INFO "Downloading TBB-$TBB_VERSION$TBB_VERSION_UPDATE" INFO "Downloading TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
@@ -1771,7 +1752,7 @@ compile_OCIO() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_ocio _update_deps_ocio
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
INFO "Downloading OpenColorIO-$OCIO_VERSION" INFO "Downloading OpenColorIO-$OCIO_VERSION"
@@ -1903,7 +1884,7 @@ compile_OPENEXR() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_openexr _update_deps_openexr
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
INFO "Downloading OpenEXR-$OPENEXR_VERSION" INFO "Downloading OpenEXR-$OPENEXR_VERSION"
@@ -2029,7 +2010,7 @@ compile_OIIO() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_oiio _update_deps_oiio
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -2086,7 +2067,7 @@ compile_OIIO() {
cmake_d="$cmake_d -D USE_OPENCV=OFF" cmake_d="$cmake_d -D USE_OPENCV=OFF"
cmake_d="$cmake_d -D BUILD_TESTING=OFF" cmake_d="$cmake_d -D BUILD_TESTING=OFF"
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF" cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=ON" cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=OFF"
cmake_d="$cmake_d -D TXT2MAN=" cmake_d="$cmake_d -D TXT2MAN="
#cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON" #cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
#cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON" #cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
@@ -2184,7 +2165,7 @@ compile_LLVM() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_llvm _update_deps_llvm
prepare_inst prepare_opt
if [ ! -d $_src -o true ]; then if [ ! -d $_src -o true ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -2294,7 +2275,7 @@ compile_OSL() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_osl _update_deps_osl
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -2438,7 +2419,7 @@ compile_OSD() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_osd _update_deps_osd
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -2556,7 +2537,7 @@ compile_BLOSC() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_blosc _update_deps_blosc
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
INFO "Downloading Blosc-$OPENVDB_BLOSC_VERSION" INFO "Downloading Blosc-$OPENVDB_BLOSC_VERSION"
@@ -2610,115 +2591,11 @@ compile_BLOSC() {
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Build OpenVDB # Build OpenVDB
_init_nanovdb() {
_src=$SRC/openvdb-$OPENVDB_VERSION/nanovdb
_inst=$INST/nanovdb-$OPENVDB_VERSION_SHORT
_inst_shortcut=$INST/nanovdb
}
_update_deps_nanovdb() {
:
}
clean_nanovdb() {
_init_nanovdb
if [ -d $_inst ]; then
_update_deps_nanovdb
fi
_git=true # Mere trick to prevent clean from removing $_src...
_clean
}
install_NanoVDB() {
# To be changed each time we make edits that would modify the compiled results!
nanovdb_magic=1
_init_nanovdb
# Clean install if needed!
magic_compile_check nanovdb-$OPENVDB_VERSION $nanovdb_magic
if [ $? -eq 1 ]; then
clean_nanovdb
fi
if [ ! -d $_inst ]; then
INFO "Installing NanoVDB v$OPENVDB_VERSION"
_is_building=true
# Rebuild dependencies as well!
_update_deps_nanovdb
prepare_inst
if [ ! -d $_src ]; then
ERROR "NanoVDB not found in openvdb-$OPENVDB_VERSION ($_src), exiting"
exit 1
fi
# Always refresh the whole build!
if [ -d build ]; then
rm -rf build
fi
mkdir build
cd build
cmake_d="-D CMAKE_BUILD_TYPE=Release"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
# NanoVDB is header-only, so only need the install target
cmake_d="$cmake_d -D NANOVDB_BUILD_UNITTESTS=OFF"
cmake_d="$cmake_d -D NANOVDB_BUILD_EXAMPLES=OFF"
cmake_d="$cmake_d -D NANOVDB_BUILD_BENCHMARK=OFF"
cmake_d="$cmake_d -D NANOVDB_BUILD_DOCS=OFF"
cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF"
cmake_d="$cmake_d -D NANOVDB_CUDA_KEEP_PTX=OFF"
# Do not need to include any of the dependencies because of this
cmake_d="$cmake_d -D NANOVDB_USE_OPENVDB=OFF"
cmake_d="$cmake_d -D NANOVDB_USE_OPENGL=OFF"
cmake_d="$cmake_d -D NANOVDB_USE_OPENCL=OFF"
cmake_d="$cmake_d -D NANOVDB_USE_CUDA=OFF"
cmake_d="$cmake_d -D NANOVDB_USE_TBB=OFF"
cmake_d="$cmake_d -D NANOVDB_USE_BLOSC=OFF"
cmake_d="$cmake_d -D NANOVDB_USE_ZLIB=OFF"
cmake_d="$cmake_d -D NANOVDB_USE_OPTIX=OFF"
cmake_d="$cmake_d -D NANOVDB_ALLOW_FETCHCONTENT=OFF"
cmake $cmake_d $_src
make -j$THREADS install
make clean
#~ mkdir -p $_inst
#~ cp -r $_src/include $_inst/include
if [ -d $_inst ]; then
_create_inst_shortcut
else
ERROR "NanoVDB-v$OPENVDB_VERSION failed to install, exiting"
exit 1
fi
magic_compile_set nanovdb-$OPENVDB_VERSION $nanovdb_magic
cd $CWD
INFO "Done compiling NanoVDB-v$OPENVDB_VERSION!"
_is_building=false
else
INFO "Own NanoVDB-v$OPENVDB_VERSION is up to date, nothing to do!"
fi
}
_init_openvdb() { _init_openvdb() {
_src=$SRC/openvdb-$OPENVDB_VERSION _src=$SRC/openvdb-$OPENVDB_VERSION
_git=false _git=false
_inst=$INST/openvdb-$OPENVDB_VERSION_SHORT _inst=$INST/openvdb-$OPENVDB_VERSION_SHORT
_inst_shortcut=$INST/openvdb _inst_shortcut=$INST/openvdb
_openvdb_source=$OPENVDB_SOURCE
if [ "$WITH_NANOVDB" = true ]; then
_openvdb_source=$NANOVDB_SOURCE
fi
} }
_update_deps_openvdb() { _update_deps_openvdb() {
@@ -2743,7 +2620,7 @@ compile_OPENVDB() {
PRINT "" PRINT ""
# To be changed each time we make edits that would modify the compiled result! # To be changed each time we make edits that would modify the compiled result!
openvdb_magic=2 openvdb_magic=1
_init_openvdb _init_openvdb
# Clean install if needed! # Clean install if needed!
@@ -2753,25 +2630,20 @@ compile_OPENVDB() {
fi fi
if [ ! -d $_inst ]; then if [ ! -d $_inst ]; then
INFO "Building OpenVDB-$OPENVDB_VERSION (with NanoVDB: $WITH_NANOVDB)" INFO "Building OpenVDB-$OPENVDB_VERSION"
_is_building=true _is_building=true
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_openvdb _update_deps_openvdb
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src -o true ]; then
mkdir -p $SRC mkdir -p $SRC
download _openvdb_source[@] "$_src.tar.gz" download OPENVDB_SOURCE[@] "$_src.tar.gz"
INFO "Unpacking OpenVDB-$OPENVDB_VERSION" INFO "Unpacking OpenVDB-$OPENVDB_VERSION"
if [ "$WITH_NANOVDB" = true ]; then tar -C $SRC -xf $_src.tar.gz
tar -C $SRC --transform "s,(.*/?)openvdb-$NANOVDB_SOURCE_REPO_UID[^/]*(.*),\1openvdb-$OPENVDB_VERSION\2,x" \
-xf $_src.tar.gz
else
tar -C $SRC -xf $_src.tar.gz
fi
fi fi
cd $_src cd $_src
@@ -2785,40 +2657,33 @@ compile_OPENVDB() {
#~ git reset --hard #~ git reset --hard
#~ fi #~ fi
# Always refresh the whole build! # Source builds here
if [ -d build ]; then cd openvdb
rm -rf build
fi
mkdir build
cd build
cmake_d="-D CMAKE_BUILD_TYPE=Release" make_d="DESTDIR=$_inst"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst" make_d="$make_d HDSO=/usr"
cmake_d="$cmake_d -D USE_STATIC_DEPENDENCIES=OFF"
cmake_d="$cmake_d -D OPENVDB_BUILD_BINARIES=OFF"
if [ -d $INST/boost ]; then if [ -d $INST/boost ]; then
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost" make_d="$make_d BOOST_INCL_DIR=$INST/boost/include BOOST_LIB_DIR=$INST/boost/lib"
cmake_d="$cmake_d -D Boost_USE_MULTITHREADED=ON"
cmake_d="$cmake_d -D Boost_NO_SYSTEM_PATHS=ON"
cmake_d="$cmake_d -D Boost_NO_BOOST_CMAKE=ON"
fi fi
if [ -d $INST/tbb ]; then if [ -d $INST/tbb ]; then
cmake_d="$cmake_d -D TBB_ROOT=$INST/tbb" make_d="$make_d TBB_ROOT=$INST/tbb TBB_USE_STATIC_LIBS=OFF"
fi fi
if [ "$_with_built_openexr" = true ]; then if [ "$_with_built_openexr" = true ]; then
cmake_d="$cmake_d -D IlmBase_ROOT=$INST/openexr" make_d="$make_d ILMBASE_INCL_DIR=$INST/openexr/include ILMBASE_LIB_DIR=$INST/openexr/lib"
cmake_d="$cmake_d -D OpenEXR_ROOT=$INST/openexr" make_d="$make_d EXR_INCL_DIR=$INST/openexr/include EXR_LIB_DIR=$INST/openexr/lib"
INFO "ILMBASE_HOME=$INST/openexr"
fi fi
if [ -d $INST/blosc ]; then if [ -d $INST/blosc ]; then
cmake_d="$cmake_d -D Blosc_ROOT=$INST/blosc" make_d="$make_d BLOSC_INCL_DIR=$INST/blosc/include BLOSC_LIB_DIR=$INST/blosc/lib"
fi fi
cmake $cmake_d ..
make -j$THREADS install # Build without log4cplus, glfw, python module & docs
make_d="$make_d LOG4CPLUS_INCL_DIR= GLFW_INCL_DIR= PYTHON_VERSION= DOXYGEN="
make -j$THREADS lib $make_d install
make clean make clean
if [ -d $_inst ]; then if [ -d $_inst ]; then
@@ -2839,10 +2704,6 @@ compile_OPENVDB() {
fi fi
run_ldconfig "openvdb" run_ldconfig "openvdb"
if [ "$WITH_NANOVDB" = true ]; then
install_NanoVDB
fi
} }
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
@@ -2890,7 +2751,7 @@ compile_ALEMBIC() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_alembic _update_deps_alembic
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -2995,7 +2856,7 @@ compile_USD() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_usd _update_deps_usd
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -3094,7 +2955,7 @@ compile_OpenCOLLADA() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_collada _update_deps_collada
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -3200,7 +3061,7 @@ compile_Embree() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_embree _update_deps_embree
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -3310,7 +3171,7 @@ install_ISPC() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_ispc _update_deps_ispc
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -3389,7 +3250,7 @@ compile_OIDN() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_oidn _update_deps_oidn
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -3499,7 +3360,7 @@ compile_FFmpeg() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_ffmpeg _update_deps_ffmpeg
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
INFO "Downloading ffmpeg-$FFMPEG_VERSION" INFO "Downloading ffmpeg-$FFMPEG_VERSION"
@@ -3628,7 +3489,7 @@ compile_XR_OpenXR_SDK() {
# Rebuild dependencies as well! # Rebuild dependencies as well!
_update_deps_xr_openxr_sdk _update_deps_xr_openxr_sdk
prepare_inst prepare_opt
if [ ! -d $_src ]; then if [ ! -d $_src ]; then
mkdir -p $SRC mkdir -p $SRC
@@ -3798,7 +3659,7 @@ install_DEB() {
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_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 libpugixml-dev libpotrace-dev" libgmp-dev"
# libglewmx-dev (broken in deb testing currently...) # libglewmx-dev (broken in deb testing currently...)
VORBIS_USE=true VORBIS_USE=true
@@ -4072,7 +3933,7 @@ install_DEB() {
else else
check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX
if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then
install_packages_DEB libopenimageio-dev openimageio-tools install_packages_DEB libopenimageio-dev
clean_OIIO clean_OIIO
else else
compile_OIIO compile_OIIO
@@ -4094,7 +3955,7 @@ install_DEB() {
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_DEB llvm-dev clang install_packages_DEB llvm-dev clang
have_llvm=true have_llvm=true
LLVM_VERSION=`llvm-config --version` LLVM_VERSION=`get_package_version_DEB llvm-dev`
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM clean_LLVM
else else
@@ -4464,8 +4325,7 @@ install_RPM() {
libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ 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"
gmp-devel pugixml-devel potrace-devel"
OPENJPEG_USE=true OPENJPEG_USE=true
VORBIS_USE=true VORBIS_USE=true
@@ -4714,13 +4574,13 @@ install_RPM() {
INFO "Forced OpenImageIO building, as requested..." INFO "Forced OpenImageIO building, as requested..."
compile_OIIO compile_OIIO
else else
check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX #check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX
if [ $? -eq 0 -a $_with_built_openexr == false ]; then #if [ $? -eq 0 -a $_with_built_openexr == false ]; then
install_packages_RPM OpenImageIO-devel OpenImageIO-utils # install_packages_RPM OpenImageIO-devel
clean_OIIO # clean_OIIO
else #else
compile_OIIO compile_OIIO
fi #fi
fi fi
@@ -4743,7 +4603,7 @@ install_RPM() {
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_RPM llvm-devel $CLANG_DEV install_packages_RPM llvm-devel $CLANG_DEV
have_llvm=true have_llvm=true
LLVM_VERSION=`llvm-config --version` LLVM_VERSION=`get_package_version_RPM llvm-devel`
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM clean_LLVM
else else
@@ -5041,7 +4901,7 @@ install_ARCH() {
_packages="$BASE_DEVEL git cmake fontconfig \ _packages="$BASE_DEVEL git cmake fontconfig \
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \ libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl2 fftw \ $OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl2 fftw \
libxml2 yaml-cpp tinyxml python-requests jemalloc gmp potrace pugixml" libxml2 yaml-cpp tinyxml python-requests jemalloc gmp"
OPENJPEG_USE=true OPENJPEG_USE=true
VORBIS_USE=true VORBIS_USE=true
@@ -5265,7 +5125,7 @@ install_ARCH() {
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_ARCH llvm clang install_packages_ARCH llvm clang
have_llvm=true have_llvm=true
LLVM_VERSION=`llvm-config --version` LLVM_VERSION=`get_package_version_ARCH llvm`
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM clean_LLVM
else else
@@ -5827,13 +5687,6 @@ print_info() {
PRINT " $_1" PRINT " $_1"
_buildargs="$_buildargs $_1" _buildargs="$_buildargs $_1"
fi fi
if [ -d $INST/nanovdb ]; then
_1="-D WITH_NANOVDB=ON"
_2="-D NANOVDB_ROOT_DIR=$INST/nanovdb"
PRINT " $_1"
PRINT " $_2"
_buildargs="$_buildargs $_1 $_2"
fi
fi fi
if [ "$WITH_OPENCOLLADA" = true ]; then if [ "$WITH_OPENCOLLADA" = true ]; then

View File

@@ -1,54 +0,0 @@
project(potrace)
cmake_minimum_required(VERSION 2.8)
include_directories(src/include)
set(SOURCES
src/backend_dxf.c
src/backend_eps.c
src/backend_geojson.c
src/backend_pdf.c
src/backend_pgm.c
src/backend_svg.c
src/backend_xfig.c
src/bbox.c
src/bitmap_io.c
src/curve.c
src/decompose.c
src/flate.c
src/greymap.c
src/lzw.c
src/potracelib.c
src/progress_bar.c
src/render.c
src/trace.c
src/trans.c
)
set(HEADERS
src/potracelib.h
)
if(WIN32)
add_definitions(/D_USE_MATH_DEFINES)
endif()
add_definitions(/DPOTRACE="POTrace")
add_definitions(/DVERSION="Blender")
add_definitions(/DHAVE_INTTYPES_H)
add_library(${PROJECT_NAME} STATIC ${HEADERS} ${SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES
LIBRARY_OUTPUT_NAME "${PROJECT_NAME}"
PUBLIC_HEADER "${HEADERS}"
)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)

View File

@@ -0,0 +1,11 @@
--- UserMacros.cmake
+++ UserMacros.cmake
@@ -16,6 +16,8 @@
if (BUILD_USER_DEFINED_LIBS)
MACRO_USER_DEFINED_LIBS ()
endif (BUILD_USER_DEFINED_LIBS)
+
+include(Config/cmake/usermacros/windows_mt.cmake)
#-----------------------------------------------------------------------------
#------------------- E X A M P L E E N D -----------------------------------
#-----------------------------------------------------------------------------

View File

@@ -19,16 +19,16 @@ diff -Naur orig/CMakeLists.txt external_ispc/CMakeLists.txt
target_include_directories(${PROJECT_NAME} PRIVATE target_include_directories(${PROJECT_NAME} PRIVATE
- ${LLVM_INCLUDE_DIRS} - ${LLVM_INCLUDE_DIRS}
+ ${LLVM_INCLUDE_DIRS} ${CLANG_INCLUDE_DIRS} + ${LLVM_INCLUDE_DIRS} ${CLANG_INCLUDE_DIRS}
${GENX_DEPS_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}) ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
# Compile options
diff -Naur orig/cmake/GenerateBuiltins.cmake.txt external_ispc/cmake/GenerateBuiltins.cmake.txt diff -Naur orig/cmake/GenerateBuiltins.cmake.txt external_ispc/cmake/GenerateBuiltins.cmake.txt
+++ orig/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200 +++ orig/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200
+++ external_ispc/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200 +++ external_ispc/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200
@@ -97,6 +97,8 @@ @@ -97,6 +97,8 @@
if ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "x86") if ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "x86")
set(target_arch "i686") set(target_arch "i386")
+ # Blender: disable 32bit due to build issues on Linux and being unnecessary. + # Blender: disable 32bit due to build issues on Linux and being unnecessary.
+ set(SKIP ON) + set(SKIP ON)
elseif ("${bit}" STREQUAL "64" AND ${arch} STREQUAL "x86") elseif ("${bit}" STREQUAL "64" AND ${arch} STREQUAL "x86")

View File

@@ -34,24 +34,3 @@ diff -Naur orig/src/include/OpenImageIO/platform.h external_openimageio/src/incl
# include <windows.h> # include <windows.h>
#endif #endif
diff -Naur orig/src/libutil/ustring.cpp external_openimageio/src/libutil/ustring.cpp
--- orig/src/libutil/ustring.cpp 2020-05-11 05:43:52.000000000 +0200
+++ external_openimageio/src/libutil/ustring.cpp 2020-11-26 12:06:08.000000000 +0100
@@ -337,6 +337,8 @@
// the std::string to make it point to our chars! In such a case, the
// destructor will be careful not to allow a deallocation.
+ // Disable internal std::string for Apple silicon based Macs
+#if !(defined(__APPLE__) && defined(__arm64__))
#if defined(__GNUC__) && !defined(_LIBCPP_VERSION) \
&& defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI
// NEW gcc ABI
@@ -382,7 +384,7 @@
return;
}
#endif
-
+#endif
// Remaining cases - just assign the internal string. This may result
// in double allocation for the chars. If you care about that, do
// something special for your platform, much like we did for gcc and

View File

@@ -10,6 +10,77 @@ diff -x .git -ur usd.orig/cmake/defaults/Packages.cmake external_usd/cmake/defau
add_definitions(${TBB_DEFINITIONS}) add_definitions(${TBB_DEFINITIONS})
# --math # --math
diff -x .git -ur usd.orig/pxr/base/plug/initConfig.cpp external_usd/pxr/base/plug/initConfig.cpp
--- usd.orig/pxr/base/plug/initConfig.cpp.orig 2020-06-12 17:20:07.478199779 +0200
+++ external_usd/pxr/base/plug/initConfig.cpp 2020-06-12 17:25:28.648588552 +0200
@@ -69,10 +69,40 @@
ARCH_CONSTRUCTOR(Plug_InitConfig, 2, void)
{
+ /* The contents of this constructor have been moved to usd_initialise_plugin_path(...) */
+}
+
+}; // end of anonymous namespace
+
+/**
+ * The contents of this function used to be in the static constructor Plug_InitConfig.
+ * This static constructor made it impossible for Blender to pass a path to the USD
+ * library at runtime, as the constructor would run before Blender's main() function.
+ *
+ * This function is wrapped in a C function of the same name (defined below),
+ * so that it can be called from Blender's main() function.
+ *
+ * The datafiles_usd_path path is used to point to the USD plugin path when Blender
+ * has been installed. The fallback_usd_path path should point to the build-time
+ * location of the USD plugin files so that Blender can be run on a development machine
+ * without requiring an installation step.
+ */
+void
+usd_initialise_plugin_path(const char *datafiles_usd_path)
+{
std::vector<std::string> result;
std::vector<std::string> debugMessages;
+ // Add Blender-specific paths. They MUST end in a slash, or symlinks will not be treated as directory.
+ if (datafiles_usd_path != NULL && datafiles_usd_path[0] != '\0') {
+ std::string datafiles_usd_path_str(datafiles_usd_path);
+ if (datafiles_usd_path_str.back() != '/') {
+ datafiles_usd_path_str += "/";
+ }
+ result.push_back(datafiles_usd_path_str);
+ }
+
// Determine the absolute path to the Plug shared library. Any relative
// paths specified in the plugin search path will be anchored to this
// directory, to allow for relocatability. Note that this can fail when pxr
@@ -114,9 +144,24 @@
_AppendPathList(&result, installLocation, binaryPath);
#endif // PXR_INSTALL_LOCATION
- Plug_SetPaths(result, debugMessages);
-}
+ if (!TfGetenv("PXR_PATH_DEBUG").empty()) {
+ printf("USD Plugin paths: (%zu in total):\n", result.size());
+ for(const std::string &path : result) {
+ printf(" %s\n", path.c_str());
+ }
+ }
+ Plug_SetPaths(result, debugMessages);
}
PXR_NAMESPACE_CLOSE_SCOPE
+
+/* Workaround to make it possible to pass a path at runtime to USD. */
+extern "C" {
+void
+usd_initialise_plugin_path(
+ const char *datafiles_usd_path)
+{
+ PXR_NS::usd_initialise_plugin_path(datafiles_usd_path);
+}
+}
diff -Naur external_usd_base/cmake/macros/Public.cmake external_usd/cmake/macros/Public.cmake diff -Naur external_usd_base/cmake/macros/Public.cmake external_usd/cmake/macros/Public.cmake
--- external_usd_base/cmake/macros/Public.cmake 2019-10-24 14:39:53 -0600 --- external_usd_base/cmake/macros/Public.cmake 2019-10-24 14:39:53 -0600
+++ external_usd/cmake/macros/Public.cmake 2020-01-11 13:33:29 -0700 +++ external_usd/cmake/macros/Public.cmake 2020-01-11 13:33:29 -0700

View File

@@ -24,7 +24,6 @@ import re
import subprocess import subprocess
import sys import sys
def is_tool(name): def is_tool(name):
"""Check whether `name` is on PATH and marked as executable.""" """Check whether `name` is on PATH and marked as executable."""
@@ -33,7 +32,6 @@ def is_tool(name):
return which(name) is not None return which(name) is not None
class Builder: class Builder:
def __init__(self, name, branch, codesign): def __init__(self, name, branch, codesign):
self.name = name self.name = name
@@ -50,23 +48,22 @@ class Builder:
# Detect platform # Detect platform
if name.startswith('mac'): if name.startswith('mac'):
self.platform = 'mac' self.platform = 'mac'
self.command_prefix = [] self.command_prefix = []
elif name.startswith('linux'): elif name.startswith('linux'):
self.platform = 'linux' self.platform = 'linux'
if is_tool('scl'): if is_tool('scl'):
self.command_prefix = ['scl', 'enable', 'devtoolset-9', '--'] self.command_prefix = ['scl', 'enable', 'devtoolset-9', '--']
else: else:
self.command_prefix = [] self.command_prefix = []
elif name.startswith('win'): elif name.startswith('win'):
self.platform = 'win' self.platform = 'win'
self.command_prefix = [] self.command_prefix = []
else: else:
raise ValueError('Unkonw platform for builder ' + self.platform) raise ValueError('Unkonw platform for builder ' + self.platform)
# Always 64 bit now # Always 64 bit now
self.bits = 64 self.bits = 64
def create_builder_from_arguments(): def create_builder_from_arguments():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('builder_name') parser.add_argument('builder_name')
@@ -107,7 +104,7 @@ class VersionInfo:
def _parse_header_file(self, filename, define): def _parse_header_file(self, filename, define):
import re import re
regex = re.compile(r"^#\s*define\s+%s\s+(.*)" % define) regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
with open(filename, "r") as file: with open(filename, "r") as file:
for l in file: for l in file:
match = regex.match(l) match = regex.match(l)

View File

@@ -18,72 +18,12 @@
# <pep8 compliant> # <pep8 compliant>
import dataclasses
import json
import os import os
from pathlib import Path from pathlib import Path
from typing import Optional
import codesign.util as util import codesign.util as util
class ArchiveStateError(Exception):
message: str
def __init__(self, message):
self.message = message
super().__init__(self.message)
@dataclasses.dataclass
class ArchiveState:
"""
Additional information (state) of the archive
Includes information like expected file size of the archive file in the case
the archive file is expected to be successfully created.
If the archive can not be created, this state will contain error message
indicating details of error.
"""
# Size in bytes of the corresponding archive.
file_size: Optional[int] = None
# Non-empty value indicates that error has happenned.
error_message: str = ''
def has_error(self) -> bool:
"""
Check whether the archive is at error state
"""
return self.error_message
def serialize_to_string(self) -> str:
payload = dataclasses.asdict(self)
return json.dumps(payload, sort_keys=True, indent=4)
def serialize_to_file(self, filepath: Path) -> None:
string = self.serialize_to_string()
filepath.write_text(string)
@classmethod
def deserialize_from_string(cls, string: str) -> 'ArchiveState':
try:
object_as_dict = json.loads(string)
except json.decoder.JSONDecodeError:
raise ArchiveStateError('Error parsing JSON')
return cls(**object_as_dict)
@classmethod
def deserialize_from_file(cls, filepath: Path):
string = filepath.read_text()
return cls.deserialize_from_string(string)
class ArchiveWithIndicator: class ArchiveWithIndicator:
""" """
The idea of this class is to wrap around logic which takes care of keeping The idea of this class is to wrap around logic which takes care of keeping
@@ -139,19 +79,6 @@ class ArchiveWithIndicator:
if not self.ready_indicator_filepath.exists(): if not self.ready_indicator_filepath.exists():
return False return False
try:
archive_state = ArchiveState.deserialize_from_file(
self.ready_indicator_filepath)
except ArchiveStateError as error:
print(f'Error deserializing archive state: {error.message}')
return False
if archive_state.has_error():
# If the error did happen during codesign procedure there will be no
# corresponding archive file.
# The caller code will deal with the error check further.
return True
# Sometimes on macOS indicator file appears prior to the actual archive # Sometimes on macOS indicator file appears prior to the actual archive
# despite the order of creation and os.sync() used in tag_ready(). # despite the order of creation and os.sync() used in tag_ready().
# So consider archive not ready if there is an indicator without an # So consider archive not ready if there is an indicator without an
@@ -161,11 +88,23 @@ class ArchiveWithIndicator:
f'({self.archive_filepath}) to appear.') f'({self.archive_filepath}) to appear.')
return False return False
# Read archive size from indicator/
#
# Assume that file is either empty or is fully written. This is being checked
# by performing ValueError check since empty string will throw this exception
# when attempted to be converted to int.
expected_archive_size_str = self.ready_indicator_filepath.read_text()
try:
expected_archive_size = int(expected_archive_size_str)
except ValueError:
print(f'Invalid archive size "{expected_archive_size_str}"')
return False
# Wait for until archive is fully stored. # Wait for until archive is fully stored.
actual_archive_size = self.archive_filepath.stat().st_size actual_archive_size = self.archive_filepath.stat().st_size
if actual_archive_size != archive_state.file_size: if actual_archive_size != expected_archive_size:
print('Partial/invalid archive size (expected ' print('Partial/invalid archive size (expected '
f'{archive_state.file_size} got {actual_archive_size})') f'{expected_archive_size} got {actual_archive_size})')
return False return False
return True return True
@@ -190,7 +129,7 @@ class ArchiveWithIndicator:
print(f'Exception checking archive: {e}') print(f'Exception checking archive: {e}')
return False return False
def tag_ready(self, error_message='') -> None: def tag_ready(self) -> None:
""" """
Tag the archive as ready by creating the corresponding indication file. Tag the archive as ready by creating the corresponding indication file.
@@ -199,34 +138,13 @@ class ArchiveWithIndicator:
If it is violated, an assert will fail. If it is violated, an assert will fail.
""" """
assert not self.is_ready() assert not self.is_ready()
# Try the best to make sure everything is synced to the file system, # Try the best to make sure everything is synced to the file system,
# to avoid any possibility of stamp appearing on a network share prior to # to avoid any possibility of stamp appearing on a network share prior to
# an actual file. # an actual file.
if util.get_current_platform() != util.Platform.WINDOWS: if util.get_current_platform() != util.Platform.WINDOWS:
os.sync() os.sync()
archive_size = self.archive_filepath.stat().st_size
archive_size = -1 self.ready_indicator_filepath.write_text(str(archive_size))
if self.archive_filepath.exists():
archive_size = self.archive_filepath.stat().st_size
archive_info = ArchiveState(
file_size=archive_size, error_message=error_message)
self.ready_indicator_filepath.write_text(
archive_info.serialize_to_string())
def get_state(self) -> ArchiveState:
"""
Get state object for this archive
The state is read from the corresponding state file.
"""
try:
return ArchiveState.deserialize_from_file(self.ready_indicator_filepath)
except ArchiveStateError as error:
return ArchiveState(error_message=f'Error in information format: {error}')
def clean(self) -> None: def clean(self) -> None:
""" """

View File

@@ -58,7 +58,6 @@ import codesign.util as util
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
from codesign.archive_with_indicator import ArchiveWithIndicator from codesign.archive_with_indicator import ArchiveWithIndicator
from codesign.exception import CodeSignException
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -146,13 +145,13 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
def cleanup_environment_for_builder(self) -> None: def cleanup_environment_for_builder(self) -> None:
# TODO(sergey): Revisit need of cleaning up the existing files. # TODO(sergey): Revisit need of cleaning up the existing files.
# In practice it wasn't so helpful, and with multiple clients # In practice it wasn't so helpful, and with multiple clients
# talking to the same server it becomes even more tricky. # talking to the same server it becomes even mor etricky.
pass pass
def cleanup_environment_for_signing_server(self) -> None: def cleanup_environment_for_signing_server(self) -> None:
# TODO(sergey): Revisit need of cleaning up the existing files. # TODO(sergey): Revisit need of cleaning up the existing files.
# In practice it wasn't so helpful, and with multiple clients # In practice it wasn't so helpful, and with multiple clients
# talking to the same server it becomes even more tricky. # talking to the same server it becomes even mor etricky.
pass pass
def generate_request_id(self) -> str: def generate_request_id(self) -> str:
@@ -221,15 +220,9 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
""" """
Wait until archive with signed files is available. Wait until archive with signed files is available.
Will only return if the archive with signed files is available. If there
was an error during code sign procedure the SystemExit exception is
raised, with the message set to the error reported by the codesign
server.
Will only wait for the configured time. If that time exceeds and there Will only wait for the configured time. If that time exceeds and there
is still no responce from the signing server the application will exit is still no responce from the signing server the application will exit
with a non-zero exit code. with a non-zero exit code.
""" """
signed_archive_info = self.signed_archive_info_for_request_id( signed_archive_info = self.signed_archive_info_for_request_id(
@@ -243,17 +236,9 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
time.sleep(1) time.sleep(1)
time_slept_in_seconds = time.monotonic() - time_start time_slept_in_seconds = time.monotonic() - time_start
if time_slept_in_seconds > timeout_in_seconds: if time_slept_in_seconds > timeout_in_seconds:
signed_archive_info.clean()
unsigned_archive_info.clean() unsigned_archive_info.clean()
raise SystemExit("Signing server didn't finish signing in " raise SystemExit("Signing server didn't finish signing in "
f'{timeout_in_seconds} seconds, dying :(') f"{timeout_in_seconds} seconds, dying :(")
archive_state = signed_archive_info.get_state()
if archive_state.has_error():
signed_archive_info.clean()
unsigned_archive_info.clean()
raise SystemExit(
f'Error happenned during codesign procedure: {archive_state.error_message}')
def copy_signed_files_to_directory( def copy_signed_files_to_directory(
self, signed_dir: Path, destination_dir: Path) -> None: self, signed_dir: Path, destination_dir: Path) -> None:
@@ -411,13 +396,7 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
temp_dir) temp_dir)
logger_server.info('Signing all requested files...') logger_server.info('Signing all requested files...')
try: self.sign_all_files(files)
self.sign_all_files(files)
except CodeSignException as error:
signed_archive_info.tag_ready(error_message=error.message)
unsigned_archive_info.clean()
logger_server.info('Signing is complete with errors.')
return
logger_server.info('Packing signed files...') logger_server.info('Packing signed files...')
pack_files(files=files, pack_files(files=files,

View File

@@ -33,7 +33,6 @@ from buildbot_utils import Builder
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
from codesign.base_code_signer import BaseCodeSigner from codesign.base_code_signer import BaseCodeSigner
from codesign.exception import CodeSignException
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
logger_server = logger.getChild('server') logger_server = logger.getChild('server')
@@ -46,10 +45,6 @@ EXTENSIONS_TO_BE_SIGNED = {'.dylib', '.so', '.dmg'}
NAME_PREFIXES_TO_BE_SIGNED = {'python'} NAME_PREFIXES_TO_BE_SIGNED = {'python'}
class NotarizationException(CodeSignException):
pass
def is_file_from_bundle(file: AbsoluteAndRelativeFileName) -> bool: def is_file_from_bundle(file: AbsoluteAndRelativeFileName) -> bool:
""" """
Check whether file is coming from an .app bundle Check whether file is coming from an .app bundle
@@ -191,7 +186,7 @@ class MacOSCodeSigner(BaseCodeSigner):
file.absolute_filepath] file.absolute_filepath]
self.run_command_or_mock(command, util.Platform.MACOS) self.run_command_or_mock(command, util.Platform.MACOS)
def codesign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: def codesign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> bool:
""" """
Run codesign tool on all eligible files in the given list. Run codesign tool on all eligible files in the given list.
@@ -230,6 +225,8 @@ class MacOSCodeSigner(BaseCodeSigner):
file_index + 1, num_signed_files, file_index + 1, num_signed_files,
signed_file.relative_filepath) signed_file.relative_filepath)
return True
def codesign_bundles( def codesign_bundles(
self, files: List[AbsoluteAndRelativeFileName]) -> None: self, files: List[AbsoluteAndRelativeFileName]) -> None:
""" """
@@ -276,6 +273,8 @@ class MacOSCodeSigner(BaseCodeSigner):
files.extend(extra_files) files.extend(extra_files)
return True
############################################################################ ############################################################################
# Notarization. # Notarization.
@@ -335,40 +334,7 @@ class MacOSCodeSigner(BaseCodeSigner):
logger_server.error('xcrun command did not report RequestUUID') logger_server.error('xcrun command did not report RequestUUID')
return None return None
def notarize_review_status(self, xcrun_output: str) -> bool: def notarize_wait_result(self, request_uuid: str) -> bool:
"""
Review status returned by xcrun's notarization info
Returns truth if the notarization process has finished.
If there are errors during notarization, a NotarizationException()
exception is thrown with status message from the notarial office.
"""
# Parse status and message
status = xcrun_field_value_from_output('Status', xcrun_output)
status_message = xcrun_field_value_from_output(
'Status Message', xcrun_output)
if status == 'success':
logger_server.info(
'Package successfully notarized: %s', status_message)
return True
if status == 'invalid':
logger_server.error(xcrun_output)
logger_server.error(
'Package notarization has failed: %s', status_message)
raise NotarizationException(status_message)
if status == 'in progress':
return False
logger_server.info(
'Unknown notarization status %s (%s)', status, status_message)
return False
def notarize_wait_result(self, request_uuid: str) -> None:
""" """
Wait for until notarial office have a reply Wait for until notarial office have a reply
""" """
@@ -385,11 +351,29 @@ class MacOSCodeSigner(BaseCodeSigner):
timeout_in_seconds = self.config.MACOS_NOTARIZE_TIMEOUT_IN_SECONDS timeout_in_seconds = self.config.MACOS_NOTARIZE_TIMEOUT_IN_SECONDS
while True: while True:
xcrun_output = self.check_output_or_mock( output = self.check_output_or_mock(
command, util.Platform.MACOS, allow_nonzero_exit_code=True) command, util.Platform.MACOS, allow_nonzero_exit_code=True)
# Parse status and message
status = xcrun_field_value_from_output('Status', output)
status_message = xcrun_field_value_from_output(
'Status Message', output)
if self.notarize_review_status(xcrun_output): # Review status.
break if status:
if status == 'success':
logger_server.info(
'Package successfully notarized: %s', status_message)
return True
elif status == 'invalid':
logger_server.error(output)
logger_server.error(
'Package notarization has failed: %s', status_message)
return False
elif status == 'in progress':
pass
else:
logger_server.info(
'Unknown notarization status %s (%s)', status, status_message)
logger_server.info('Keep waiting for notarization office.') logger_server.info('Keep waiting for notarization office.')
time.sleep(30) time.sleep(30)
@@ -410,6 +394,8 @@ class MacOSCodeSigner(BaseCodeSigner):
command = ['xcrun', 'stapler', 'staple', '-v', file.absolute_filepath] command = ['xcrun', 'stapler', 'staple', '-v', file.absolute_filepath]
self.check_output_or_mock(command, util.Platform.MACOS) self.check_output_or_mock(command, util.Platform.MACOS)
return True
def notarize_dmg(self, file: AbsoluteAndRelativeFileName) -> bool: def notarize_dmg(self, file: AbsoluteAndRelativeFileName) -> bool:
""" """
Run entire pipeline to get DMG notarized. Run entire pipeline to get DMG notarized.
@@ -428,7 +414,10 @@ class MacOSCodeSigner(BaseCodeSigner):
return False return False
# Staple. # Staple.
self.notarize_staple(file) if not self.notarize_staple(file):
return False
return True
def notarize_all_dmg( def notarize_all_dmg(
self, files: List[AbsoluteAndRelativeFileName]) -> bool: self, files: List[AbsoluteAndRelativeFileName]) -> bool:
@@ -443,7 +432,10 @@ class MacOSCodeSigner(BaseCodeSigner):
if not self.check_file_is_to_be_signed(file): if not self.check_file_is_to_be_signed(file):
continue continue
self.notarize_dmg(file) if not self.notarize_dmg(file):
return False
return True
############################################################################ ############################################################################
# Entry point. # Entry point.
@@ -451,6 +443,11 @@ class MacOSCodeSigner(BaseCodeSigner):
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
# TODO(sergey): Handle errors somehow. # TODO(sergey): Handle errors somehow.
self.codesign_all_files(files) if not self.codesign_all_files(files):
self.codesign_bundles(files) return
self.notarize_all_dmg(files)
if not self.codesign_bundles(files):
return
if not self.notarize_all_dmg(files):
return

View File

@@ -29,7 +29,6 @@ from buildbot_utils import Builder
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
from codesign.base_code_signer import BaseCodeSigner from codesign.base_code_signer import BaseCodeSigner
from codesign.exception import CodeSignException
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
logger_server = logger.getChild('server') logger_server = logger.getChild('server')
@@ -41,9 +40,6 @@ BLACKLIST_FILE_PREFIXES = (
'api-ms-', 'concrt', 'msvcp', 'ucrtbase', 'vcomp', 'vcruntime') 'api-ms-', 'concrt', 'msvcp', 'ucrtbase', 'vcomp', 'vcruntime')
class SigntoolException(CodeSignException):
pass
class WindowsCodeSigner(BaseCodeSigner): class WindowsCodeSigner(BaseCodeSigner):
def check_file_is_to_be_signed( def check_file_is_to_be_signed(
self, file: AbsoluteAndRelativeFileName) -> bool: self, file: AbsoluteAndRelativeFileName) -> bool:
@@ -54,46 +50,12 @@ class WindowsCodeSigner(BaseCodeSigner):
return file.relative_filepath.suffix in EXTENSIONS_TO_BE_SIGNED return file.relative_filepath.suffix in EXTENSIONS_TO_BE_SIGNED
def get_sign_command_prefix(self) -> List[str]: def get_sign_command_prefix(self) -> List[str]:
return [ return [
'signtool', 'sign', '/v', 'signtool', 'sign', '/v',
'/f', self.config.WIN_CERTIFICATE_FILEPATH, '/f', self.config.WIN_CERTIFICATE_FILEPATH,
'/tr', self.config.WIN_TIMESTAMP_AUTHORITY_URL] '/tr', self.config.WIN_TIMESTAMP_AUTHORITY_URL]
def run_codesign_tool(self, filepath: Path) -> None:
command = self.get_sign_command_prefix() + [filepath]
try:
codesign_output = self.check_output_or_mock(command, util.Platform.WINDOWS)
except subprocess.CalledProcessError as e:
raise SigntoolException(f'Error running signtool {e}')
logger_server.info(f'signtool output:\n{codesign_output}')
got_number_of_success = False
for line in codesign_output.split('\n'):
line_clean = line.strip()
line_clean_lower = line_clean.lower()
if line_clean_lower.startswith('number of warnings') or \
line_clean_lower.startswith('number of errors'):
number = int(line_clean_lower.split(':')[1])
if number != 0:
raise SigntoolException('Non-clean success of signtool')
if line_clean_lower.startswith('number of files successfully signed'):
got_number_of_success = True
number = int(line_clean_lower.split(':')[1])
if number != 1:
raise SigntoolException('Signtool did not consider codesign a success')
if not got_number_of_success:
raise SigntoolException('Signtool did not report number of files signed')
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
# NOTE: Sign files one by one to avoid possible command line length # NOTE: Sign files one by one to avoid possible command line length
# overflow (which could happen if we ever decide to sign every binary # overflow (which could happen if we ever decide to sign every binary
@@ -111,7 +73,12 @@ class WindowsCodeSigner(BaseCodeSigner):
file_index + 1, num_files, file.relative_filepath) file_index + 1, num_files, file.relative_filepath)
continue continue
command = self.get_sign_command_prefix()
command.append(file.absolute_filepath)
logger_server.info( logger_server.info(
'Running signtool command for file [%d/%d] %s...', 'Running signtool command for file [%d/%d] %s...',
file_index + 1, num_files, file.relative_filepath) file_index + 1, num_files, file.relative_filepath)
self.run_codesign_tool(file.absolute_filepath) # TODO(sergey): Check the status somehow. With a missing certificate
# the command still exists with a zero code.
self.run_command_or_mock(command, util.Platform.WINDOWS)
# TODO(sergey): Report number of signed and ignored files.

View File

@@ -23,7 +23,6 @@ import shutil
import buildbot_utils import buildbot_utils
def get_cmake_options(builder): def get_cmake_options(builder):
codesign_script = os.path.join( codesign_script = os.path.join(
builder.blender_dir, 'build_files', 'buildbot', 'worker_codesign.cmake') builder.blender_dir, 'build_files', 'buildbot', 'worker_codesign.cmake')
@@ -45,24 +44,11 @@ def get_cmake_options(builder):
optix_sdk_dir = os.path.join(builder.blender_dir, '..', '..', 'NVIDIA-Optix-SDK') optix_sdk_dir = os.path.join(builder.blender_dir, '..', '..', 'NVIDIA-Optix-SDK')
options.append('-DOPTIX_ROOT_DIR:PATH=' + optix_sdk_dir) options.append('-DOPTIX_ROOT_DIR:PATH=' + optix_sdk_dir)
# Workaround to build sm_30 kernels with CUDA 10, since CUDA 11 no longer supports that architecture
if builder.platform == 'win':
options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1')
options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe')
options.append('-DCUDA11_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1')
options.append('-DCUDA11_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/bin/nvcc.exe')
elif builder.platform == 'linux':
options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-10.1')
options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-10.1/bin/nvcc')
options.append('-DCUDA11_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-11.1')
options.append('-DCUDA11_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-11.1/bin/nvcc')
options.append("-C" + os.path.join(builder.blender_dir, config_file)) options.append("-C" + os.path.join(builder.blender_dir, config_file))
options.append("-DCMAKE_INSTALL_PREFIX=%s" % (builder.install_dir)) options.append("-DCMAKE_INSTALL_PREFIX=%s" % (builder.install_dir))
return options return options
def update_git(builder): def update_git(builder):
# Do extra git fetch because not all platform/git/buildbot combinations # Do extra git fetch because not all platform/git/buildbot combinations
# update the origin remote, causing buildinfo to detect local changes. # update the origin remote, causing buildinfo to detect local changes.
@@ -72,7 +58,6 @@ def update_git(builder):
command = ['git', 'fetch', '--all'] command = ['git', 'fetch', '--all']
buildbot_utils.call(builder.command_prefix + command) buildbot_utils.call(builder.command_prefix + command)
def clean_directories(builder): def clean_directories(builder):
# Make sure no garbage remained from the previous run # Make sure no garbage remained from the previous run
if os.path.isdir(builder.install_dir): if os.path.isdir(builder.install_dir):
@@ -88,7 +73,6 @@ def clean_directories(builder):
print("Removing {}" . format(buildinfo)) print("Removing {}" . format(buildinfo))
os.remove(full_path) os.remove(full_path)
def cmake_configure(builder): def cmake_configure(builder):
# CMake configuration # CMake configuration
os.chdir(builder.build_dir) os.chdir(builder.build_dir)
@@ -103,7 +87,6 @@ def cmake_configure(builder):
command = ['cmake', builder.blender_dir] + cmake_options command = ['cmake', builder.blender_dir] + cmake_options
buildbot_utils.call(builder.command_prefix + command) buildbot_utils.call(builder.command_prefix + command)
def cmake_build(builder): def cmake_build(builder):
# CMake build # CMake build
os.chdir(builder.build_dir) os.chdir(builder.build_dir)
@@ -126,7 +109,6 @@ def cmake_build(builder):
print("CMake build:") print("CMake build:")
buildbot_utils.call(builder.command_prefix + command) buildbot_utils.call(builder.command_prefix + command)
if __name__ == "__main__": if __name__ == "__main__":
builder = buildbot_utils.create_builder_from_arguments() builder = buildbot_utils.create_builder_from_arguments()
update_git(builder) update_git(builder)

View File

@@ -29,20 +29,18 @@ from pathlib import Path
import buildbot_utils import buildbot_utils
def get_package_name(builder, platform=None): def get_package_name(builder, platform=None):
info = buildbot_utils.VersionInfo(builder) info = buildbot_utils.VersionInfo(builder)
package_name = 'blender-' + info.full_version package_name = 'blender-' + info.full_version
if platform: if platform:
package_name += '-' + platform package_name += '-' + platform
if not (builder.branch == 'master' or builder.is_release_branch): if not (builder.branch == 'master' or builder.is_release_branch):
if info.is_development_build: if info.is_development_build:
package_name = builder.branch + "-" + package_name package_name = builder.branch + "-" + package_name
return package_name return package_name
def sign_file_or_directory(path): def sign_file_or_directory(path):
from codesign.simple_code_signer import SimpleCodeSigner from codesign.simple_code_signer import SimpleCodeSigner
code_signer = SimpleCodeSigner() code_signer = SimpleCodeSigner()
@@ -66,7 +64,6 @@ def create_buildbot_upload_zip(builder, package_files):
sys.stderr.write('Create buildbot_upload.zip failed: ' + str(ex) + '\n') sys.stderr.write('Create buildbot_upload.zip failed: ' + str(ex) + '\n')
sys.exit(1) sys.exit(1)
def create_tar_xz(src, dest, package_name): def create_tar_xz(src, dest, package_name):
# One extra to remove leading os.sep when cleaning root for package_root # One extra to remove leading os.sep when cleaning root for package_root
ln = len(src) + 1 ln = len(src) + 1
@@ -94,7 +91,6 @@ def create_tar_xz(src, dest, package_name):
package.add(entry[0], entry[1], recursive=False, filter=_fakeroot) package.add(entry[0], entry[1], recursive=False, filter=_fakeroot)
package.close() package.close()
def cleanup_files(dirpath, extension): def cleanup_files(dirpath, extension):
for f in os.listdir(dirpath): for f in os.listdir(dirpath):
filepath = os.path.join(dirpath, f) filepath = os.path.join(dirpath, f)
@@ -175,11 +171,7 @@ def pack_linux(builder):
print("Stripping python...") print("Stripping python...")
py_target = os.path.join(builder.install_dir, info.short_version) py_target = os.path.join(builder.install_dir, info.short_version)
buildbot_utils.call( buildbot_utils.call(builder.command_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
builder.command_prefix + [
'find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';',
],
)
# Construct package name # Construct package name
platform_name = 'linux64' platform_name = 'linux64'

View File

@@ -22,21 +22,18 @@ import buildbot_utils
import os import os
import sys import sys
def get_ctest_arguments(builder): def get_ctest_arguments(builder):
args = ['--output-on-failure'] args = ['--output-on-failure']
if builder.platform == 'win': if builder.platform == 'win':
args += ['-C', 'Release'] args += ['-C', 'Release']
return args return args
def test(builder): def test(builder):
os.chdir(builder.build_dir) os.chdir(builder.build_dir)
command = builder.command_prefix + ['ctest'] + get_ctest_arguments(builder) command = builder.command_prefix + ['ctest'] + get_ctest_arguments(builder)
buildbot_utils.call(command) buildbot_utils.call(command)
if __name__ == "__main__": if __name__ == "__main__":
builder = buildbot_utils.create_builder_from_arguments() builder = buildbot_utils.create_builder_from_arguments()
test(builder) test(builder)

View File

@@ -52,7 +52,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Alembic DEFAULT_MSG ALEMBIC_LIBRARY ALEMBIC_IN
IF(ALEMBIC_FOUND) IF(ALEMBIC_FOUND)
SET(ALEMBIC_LIBRARIES ${ALEMBIC_LIBRARY}) SET(ALEMBIC_LIBRARIES ${ALEMBIC_LIBRARY})
SET(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR}) SET(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
ENDIF() ENDIF(ALEMBIC_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
ALEMBIC_INCLUDE_DIR ALEMBIC_INCLUDE_DIR

View File

@@ -30,7 +30,7 @@ SET(_audaspace_SEARCH_DIRS
FIND_PACKAGE(PkgConfig) FIND_PACKAGE(PkgConfig)
IF(PKG_CONFIG_FOUND) IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(AUDASPACE_PKGCONF audaspace) PKG_CHECK_MODULES(AUDASPACE_PKGCONF audaspace)
ENDIF() ENDIF(PKG_CONFIG_FOUND)
# Include dir # Include dir
FIND_PATH(AUDASPACE_INCLUDE_DIR FIND_PATH(AUDASPACE_INCLUDE_DIR
@@ -88,17 +88,17 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_Py DEFAULT_MSG AUDASPACE_PY_LIBRAR
IF(AUDASPACE_FOUND) IF(AUDASPACE_FOUND)
SET(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY}) SET(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY})
SET(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR}) SET(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR})
ENDIF() ENDIF(AUDASPACE_FOUND)
IF(AUDASPACE_C_FOUND) IF(AUDASPACE_C_FOUND)
SET(AUDASPACE_C_LIBRARIES ${AUDASPACE_C_LIBRARY}) SET(AUDASPACE_C_LIBRARIES ${AUDASPACE_C_LIBRARY})
SET(AUDASPACE_C_INCLUDE_DIRS ${AUDASPACE_C_INCLUDE_DIR}) SET(AUDASPACE_C_INCLUDE_DIRS ${AUDASPACE_C_INCLUDE_DIR})
ENDIF() ENDIF(AUDASPACE_C_FOUND)
IF(AUDASPACE_PY_FOUND) IF(AUDASPACE_PY_FOUND)
SET(AUDASPACE_PY_LIBRARIES ${AUDASPACE_PY_LIBRARY}) SET(AUDASPACE_PY_LIBRARIES ${AUDASPACE_PY_LIBRARY})
SET(AUDASPACE_PY_INCLUDE_DIRS ${AUDASPACE_PY_INCLUDE_DIR}) SET(AUDASPACE_PY_INCLUDE_DIRS ${AUDASPACE_PY_INCLUDE_DIR})
ENDIF() ENDIF(AUDASPACE_PY_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
AUDASPACE_LIBRARY AUDASPACE_LIBRARY

View File

@@ -43,10 +43,7 @@ find_program(CLANG_TIDY_EXECUTABLE
${_clang_tidy_SEARCH_DIRS} ${_clang_tidy_SEARCH_DIRS}
) )
if(CLANG_TIDY_EXECUTABLE AND NOT EXISTS ${CLANG_TIDY_EXECUTABLE}) if(CLANG_TIDY_EXECUTABLE)
message(WARNING "Cached or directly specified Clang-Tidy executable does not exist.")
set(CLANG_TIDY_FOUND FALSE)
elseif(CLANG_TIDY_EXECUTABLE)
# Mark clang-tidy as found. # Mark clang-tidy as found.
set(CLANG_TIDY_FOUND TRUE) set(CLANG_TIDY_FOUND TRUE)

View File

@@ -41,7 +41,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
IF(EIGEN3_FOUND) IF(EIGEN3_FOUND)
SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
ENDIF() ENDIF(EIGEN3_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
EIGEN3_INCLUDE_DIR EIGEN3_INCLUDE_DIR

View File

@@ -37,9 +37,9 @@ FIND_PATH(EMBREE_INCLUDE_DIR
SET(_embree_FIND_COMPONENTS SET(_embree_FIND_COMPONENTS
embree3 embree3
embree_sse42
embree_avx embree_avx
embree_avx2 embree_avx2
embree_sse42
lexers lexers
math math
simd simd
@@ -80,7 +80,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Embree DEFAULT_MSG
IF(EMBREE_FOUND) IF(EMBREE_FOUND)
SET(EMBREE_LIBRARIES ${_embree_LIBRARIES}) SET(EMBREE_LIBRARIES ${_embree_LIBRARIES})
SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR}) SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR})
ENDIF() ENDIF(EMBREE_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
EMBREE_INCLUDE_DIR EMBREE_INCLUDE_DIR

View File

@@ -1,83 +0,0 @@
# - Find FFmpeg library and includes.
# Set FFMPEG_FIND_COMPONENTS to the canonical names of the libraries
# before using the module.
# This module defines
# FFMPEG_INCLUDE_DIRS, where to find libavcodec/ac3_parser.h.
# FFMPEG_LIBRARIES, libraries to link against to use FFmpeg.
# FFMPEG_ROOT_DIR, The base directory to search for FFmpeg.
# This can also be an environment variable.
# FFMPEG_FOUND, If false, do not try to use FFmpeg.
# FFMPEG_<COMPONENT>_LIBRARY, the given individual component libraries.
#=============================================================================
# Copyright 2020 Blender Foundation.
#
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If FFMPEG_ROOT_DIR was defined in the environment, use it.
if(NOT FFMPEG_ROOT_DIR AND NOT $ENV{FFMPEG_ROOT_DIR} STREQUAL "")
set(FFMPEG_ROOT_DIR $ENV{FFMPEG_ROOT_DIR})
endif()
set(_ffmpeg_SEARCH_DIRS
${FFMPEG_ROOT_DIR}
/opt/lib/ffmpeg
)
if(NOT FFMPEG_FIND_COMPONENTS)
set(FFMPEG_FIND_COMPONENTS
# List taken from http://ffmpeg.org/download.html#build-mac
avcodec
avdevice
avfilter
avformat
avutil
)
endif()
find_path(_ffmpeg_INCLUDE_DIR
NAMES
libavcodec/ac3_parser.h
HINTS
${_ffmpeg_SEARCH_DIRS}
PATH_SUFFIXES
include
)
set(_ffmpeg_LIBRARIES)
foreach(_component ${FFMPEG_FIND_COMPONENTS})
string(TOUPPER ${_component} _upper_COMPONENT)
find_library(FFMPEG_${_upper_COMPONENT}_LIBRARY
NAMES
${_upper_COMPONENT}
HINTS
${LIBDIR}/ffmpeg
PATH_SUFFIXES
lib64 lib
)
if(NOT FFMPEG_${_upper_COMPONENT}_LIBRARY)
message(WARNING "Could NOT find FFmpeg ${_upper_COMPONENT}.")
endif()
list(APPEND _ffmpeg_LIBRARIES ${FFMPEG_${_upper_COMPONENT}_LIBRARY})
mark_as_advanced(FFMPEG_${_upper_COMPONENT}_LIBRARY)
endforeach()
# handle the QUIETLY and REQUIRED arguments and set FFMPEG_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FFmpeg DEFAULT_MSG
_ffmpeg_LIBRARIES _ffmpeg_INCLUDE_DIR)
IF(FFMPEG_FOUND)
set(FFMPEG_LIBRARIES ${_ffmpeg_LIBRARIES})
set(FFMPEG_INCLUDE_DIRS ${_ffmpeg_INCLUDE_DIR})
ENDIF()
mark_as_advanced(
FFMPEG_INCLUDE_DIR
)
unset(_ffmpeg_SEARCH_DIRS)
unset(_ffmpeg_LIBRARIES)
unset(_ffmpeg_INCLUDE_DIR)

View File

@@ -54,7 +54,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fftw3 DEFAULT_MSG
IF(FFTW3_FOUND) IF(FFTW3_FOUND)
SET(FFTW3_LIBRARIES ${FFTW3_LIBRARY}) SET(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
SET(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR}) SET(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})
ENDIF() ENDIF(FFTW3_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
FFTW3_INCLUDE_DIR FFTW3_INCLUDE_DIR

View File

@@ -52,7 +52,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW DEFAULT_MSG
IF(GLEW_FOUND) IF(GLEW_FOUND)
SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR}) SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
ENDIF() ENDIF(GLEW_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
GLEW_INCLUDE_DIR GLEW_INCLUDE_DIR

View File

@@ -80,9 +80,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG
GMP_LIBRARY GMPXX_LIBRARY GMP_INCLUDE_DIR GMPXX_INCLUDE_DIR) GMP_LIBRARY GMPXX_LIBRARY GMP_INCLUDE_DIR GMPXX_INCLUDE_DIR)
IF(GMP_FOUND) IF(GMP_FOUND)
SET(GMP_LIBRARIES ${GMPXX_LIBRARY} ${GMP_LIBRARY}) SET(GMP_LIBRARIES ${GMP_LIBRARY} ${GMPXX_LIBRARY})
SET(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR} ${GMPXX_INCLUDE_DIR}) SET(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR} ${GMPXX_INCLUDE_DIR})
ENDIF() ENDIF(GMP_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
GMP_INCLUDE_DIR GMP_INCLUDE_DIR

View File

@@ -124,7 +124,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Icu DEFAULT_MSG
IF(ICU_FOUND) IF(ICU_FOUND)
SET(ICU_LIBRARIES ${ICU_LIBRARY_DATA} ${ICU_LIBRARY_I18N} ${ICU_LIBRARY_IO} ${ICU_LIBRARY_LE} ${ICU_LIBRARY_LX} ${ICU_LIBRARY_TU} ${ICU_LIBRARY_UC}) SET(ICU_LIBRARIES ${ICU_LIBRARY_DATA} ${ICU_LIBRARY_I18N} ${ICU_LIBRARY_IO} ${ICU_LIBRARY_LE} ${ICU_LIBRARY_LX} ${ICU_LIBRARY_TU} ${ICU_LIBRARY_UC})
SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
ENDIF() ENDIF(ICU_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
ICU_INCLUDE_DIR ICU_INCLUDE_DIR

View File

@@ -54,7 +54,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jack DEFAULT_MSG
IF(JACK_FOUND) IF(JACK_FOUND)
SET(JACK_LIBRARIES ${JACK_LIBRARY}) SET(JACK_LIBRARIES ${JACK_LIBRARY})
SET(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR}) SET(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
ENDIF() ENDIF(JACK_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
JACK_INCLUDE_DIR JACK_INCLUDE_DIR

View File

@@ -64,7 +64,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(JeMalloc DEFAULT_MSG
IF(JEMALLOC_FOUND) IF(JEMALLOC_FOUND)
SET(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY}) SET(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
SET(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR}) SET(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
ENDIF() ENDIF(JEMALLOC_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
JEMALLOC_INCLUDE_DIR JEMALLOC_INCLUDE_DIR

View File

@@ -34,10 +34,6 @@ else()
endif() endif()
endif() endif()
execute_process(COMMAND ${LLVM_CONFIG} --includedir
OUTPUT_VARIABLE LLVM_INCLUDE_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT DEFINED LLVM_VERSION) if(NOT DEFINED LLVM_VERSION)
execute_process(COMMAND ${LLVM_CONFIG} --version execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION OUTPUT_VARIABLE LLVM_VERSION
@@ -84,7 +80,7 @@ if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
endif() endif()
# handle the QUIETLY and REQUIRED arguments and set LLVM_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs) INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG

View File

@@ -52,7 +52,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
IF(LZO_FOUND) IF(LZO_FOUND)
SET(LZO_LIBRARIES ${LZO_LIBRARY}) SET(LZO_LIBRARIES ${LZO_LIBRARY})
SET(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR}) SET(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
ENDIF() ENDIF(LZO_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
LZO_INCLUDE_DIR LZO_INCLUDE_DIR

View File

@@ -1,49 +0,0 @@
# - Find NanoVDB library
# Find the native NanoVDB includes and library
# This module defines
# NANOVDB_INCLUDE_DIRS, where to find nanovdb.h, Set when
# NANOVDB_INCLUDE_DIR is found.
# NANOVDB_ROOT_DIR, The base directory to search for NanoVDB.
# This can also be an environment variable.
# NANOVDB_FOUND, If false, do not try to use NanoVDB.
#=============================================================================
# Copyright 2020 Blender Foundation.
#
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If NANOVDB_ROOT_DIR was defined in the environment, use it.
IF(NOT NANOVDB_ROOT_DIR AND NOT $ENV{NANOVDB_ROOT_DIR} STREQUAL "")
SET(NANOVDB_ROOT_DIR $ENV{NANOVDB_ROOT_DIR})
ENDIF()
SET(_nanovdb_SEARCH_DIRS
${NANOVDB_ROOT_DIR}
)
FIND_PATH(NANOVDB_INCLUDE_DIR
NAMES
nanovdb/NanoVDB.h
HINTS
${_nanovdb_SEARCH_DIRS}
PATH_SUFFIXES
include
)
# handle the QUIETLY and REQUIRED arguments and set NANOVDB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NanoVDB DEFAULT_MSG
NANOVDB_INCLUDE_DIR)
IF(NANOVDB_FOUND)
SET(NANOVDB_INCLUDE_DIRS ${NANOVDB_INCLUDE_DIR})
ENDIF(NANOVDB_FOUND)
MARK_AS_ADVANCED(
NANOVDB_INCLUDE_DIR
)
UNSET(_nanovdb_SEARCH_DIRS)

View File

@@ -95,7 +95,7 @@ IF(OSL_FOUND)
"\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR}) "\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR})
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*" STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*"
"\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR}) "\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR})
ENDIF() ENDIF(OSL_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
OSL_INCLUDE_DIR OSL_INCLUDE_DIR

View File

@@ -129,7 +129,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCOLLADA DEFAULT_MSG
IF(OPENCOLLADA_FOUND) IF(OPENCOLLADA_FOUND)
SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES}) SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES})
SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES}) SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES})
ENDIF() ENDIF(OPENCOLLADA_FOUND)
UNSET(COMPONENT) UNSET(COMPONENT)
UNSET(UPPERCOMPONENT) UNSET(UPPERCOMPONENT)

View File

@@ -70,7 +70,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenColorIO DEFAULT_MSG
IF(OPENCOLORIO_FOUND) IF(OPENCOLORIO_FOUND)
SET(OPENCOLORIO_LIBRARIES ${_opencolorio_LIBRARIES}) SET(OPENCOLORIO_LIBRARIES ${_opencolorio_LIBRARIES})
SET(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO_INCLUDE_DIR}) SET(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO_INCLUDE_DIR})
ENDIF() ENDIF(OPENCOLORIO_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
OPENCOLORIO_INCLUDE_DIR OPENCOLORIO_INCLUDE_DIR

View File

@@ -65,7 +65,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG DEFAULT_MSG
IF(OPENJPEG_FOUND) IF(OPENJPEG_FOUND)
SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY}) SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
SET(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIR}) SET(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIR})
ENDIF() ENDIF(OPENJPEG_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
OPENJPEG_INCLUDE_DIR OPENJPEG_INCLUDE_DIR

View File

@@ -90,7 +90,7 @@ IF(OPENSUBDIV_FOUND)
OPENSUBDIV_CHECK_CONTROLLER("cudaEvaluator.h" OPENSUBDIV_HAS_CUDA) OPENSUBDIV_CHECK_CONTROLLER("cudaEvaluator.h" OPENSUBDIV_HAS_CUDA)
OPENSUBDIV_CHECK_CONTROLLER("glXFBEvaluator.h" OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK) OPENSUBDIV_CHECK_CONTROLLER("glXFBEvaluator.h" OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
OPENSUBDIV_CHECK_CONTROLLER("glComputeEvaluator.h" OPENSUBDIV_HAS_GLSL_COMPUTE) OPENSUBDIV_CHECK_CONTROLLER("glComputeEvaluator.h" OPENSUBDIV_HAS_GLSL_COMPUTE)
ENDIF() ENDIF(OPENSUBDIV_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
OPENSUBDIV_INCLUDE_DIR OPENSUBDIV_INCLUDE_DIR

View File

@@ -55,7 +55,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenVDB DEFAULT_MSG
IF(OPENVDB_FOUND) IF(OPENVDB_FOUND)
SET(OPENVDB_LIBRARIES ${OPENVDB_LIBRARY}) SET(OPENVDB_LIBRARIES ${OPENVDB_LIBRARY})
SET(OPENVDB_INCLUDE_DIRS ${OPENVDB_INCLUDE_DIR}) SET(OPENVDB_INCLUDE_DIRS ${OPENVDB_INCLUDE_DIR})
ENDIF() ENDIF(OPENVDB_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
OPENVDB_INCLUDE_DIR OPENVDB_INCLUDE_DIR

View File

@@ -41,7 +41,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OptiX DEFAULT_MSG
IF(OPTIX_FOUND) IF(OPTIX_FOUND)
SET(OPTIX_INCLUDE_DIRS ${OPTIX_INCLUDE_DIR}) SET(OPTIX_INCLUDE_DIRS ${OPTIX_INCLUDE_DIR})
ENDIF() ENDIF(OPTIX_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
OPTIX_INCLUDE_DIR OPTIX_INCLUDE_DIR

View File

@@ -57,7 +57,7 @@ SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
IF(PCRE_FOUND) IF(PCRE_FOUND)
SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
ENDIF() ENDIF(PCRE_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
PCRE_INCLUDE_DIR PCRE_INCLUDE_DIR

View File

@@ -1,65 +0,0 @@
# - Find potrace library
# Find the potrace include and library
# This module defines
# POTRACE_INCLUDE_DIRS, where to find potracelib.h, Set when
# POTRACE is found.
# POTRACE_LIBRARIES, libraries to link against to use POTRACE.
# POTRACE_ROOT_DIR, The base directory to search for POTRACE.
# This can also be an environment variable.
# POTRACE_FOUND, If false, do not try to use POTRACE.
#
# also defined, but not for general use are
# POTRACE_LIBRARY, where to find the POTRACE library.
#=============================================================================
# Copyright 2020 Blender Foundation.
#
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If POTRACE_ROOT_DIR was defined in the environment, use it.
IF(NOT POTRACE_ROOT_DIR AND NOT $ENV{POTRACE_ROOT_DIR} STREQUAL "")
SET(POTRACE_ROOT_DIR $ENV{POTRACE_ROOT_DIR})
ENDIF()
SET(_potrace_SEARCH_DIRS
${POTRACE_ROOT_DIR}
/opt/lib/potrace
/usr/include
/usr/local/include
)
FIND_PATH(POTRACE_INCLUDE_DIR
NAMES
potracelib.h
HINTS
${_potrace_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(POTRACE_LIBRARY
NAMES
potrace
HINTS
${_potrace_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set POTRACE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Potrace DEFAULT_MSG
POTRACE_LIBRARY POTRACE_INCLUDE_DIR)
IF(POTRACE_FOUND)
SET(POTRACE_LIBRARIES ${POTRACE_LIBRARY})
SET(POTRACE_INCLUDE_DIRS ${POTRACE_INCLUDE_DIR})
ENDIF()
MARK_AS_ADVANCED(
POTRACE_INCLUDE_DIR
POTRACE_LIBRARY
)

View File

@@ -49,7 +49,7 @@ FIND_LIBRARY(PUGIXML_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs) INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PugiXML DEFAULT_MSG FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR) PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
IF(PUGIXML_FOUND) IF(PUGIXML_FOUND)

View File

@@ -53,7 +53,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 DEFAULT_MSG
IF(SDL2_FOUND) IF(SDL2_FOUND)
SET(SDL2_LIBRARIES ${SDL2_LIBRARY}) SET(SDL2_LIBRARIES ${SDL2_LIBRARY})
SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR}) SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
ENDIF() ENDIF(SDL2_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
SDL2_INCLUDE_DIR SDL2_INCLUDE_DIR

View File

@@ -52,7 +52,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
IF(SNDFILE_FOUND) IF(SNDFILE_FOUND)
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY}) SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR}) SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
ENDIF() ENDIF(SNDFILE_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
LIBSNDFILE_INCLUDE_DIR LIBSNDFILE_INCLUDE_DIR

View File

@@ -54,7 +54,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Spacenav DEFAULT_MSG
IF(SPACENAV_FOUND) IF(SPACENAV_FOUND)
SET(SPACENAV_LIBRARIES ${SPACENAV_LIBRARY}) SET(SPACENAV_LIBRARIES ${SPACENAV_LIBRARY})
SET(SPACENAV_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIR}) SET(SPACENAV_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIR})
ENDIF() ENDIF(SPACENAV_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
SPACENAV_INCLUDE_DIR SPACENAV_INCLUDE_DIR

View File

@@ -59,7 +59,7 @@ ELSE()
get_filename_component(USD_LIBRARY_DIR ${USD_LIBRARY} DIRECTORY) get_filename_component(USD_LIBRARY_DIR ${USD_LIBRARY} DIRECTORY)
SET(USD_INCLUDE_DIRS ${USD_INCLUDE_DIR}) SET(USD_INCLUDE_DIRS ${USD_INCLUDE_DIR})
set(USD_LIBRARIES ${USD_LIBRARY}) set(USD_LIBRARIES ${USD_LIBRARY})
ENDIF() ENDIF(USD_FOUND)
ENDIF() ENDIF()
MARK_AS_ADVANCED( MARK_AS_ADVANCED(

View File

@@ -52,7 +52,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(XML2 DEFAULT_MSG
IF(XML2_FOUND) IF(XML2_FOUND)
SET(XML2_LIBRARIES ${XML2_LIBRARY}) SET(XML2_LIBRARIES ${XML2_LIBRARY})
SET(XML2_INCLUDE_DIRS ${XML2_INCLUDE_DIR}) SET(XML2_INCLUDE_DIRS ${XML2_INCLUDE_DIR})
ENDIF() ENDIF(XML2_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
XML2_INCLUDE_DIR XML2_INCLUDE_DIR

View File

@@ -61,7 +61,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(XR_OpenXR_SDK DEFAULT_MSG
IF(XR_OPENXR_SDK_FOUND) IF(XR_OPENXR_SDK_FOUND)
SET(XR_OPENXR_SDK_LIBRARIES ${XR_OPENXR_SDK_LOADER_LIBRARY}) SET(XR_OPENXR_SDK_LIBRARIES ${XR_OPENXR_SDK_LOADER_LIBRARY})
SET(XR_OPENXR_SDK_INCLUDE_DIRS ${XR_OPENXR_SDK_INCLUDE_DIR}) SET(XR_OPENXR_SDK_INCLUDE_DIRS ${XR_OPENXR_SDK_INCLUDE_DIR})
ENDIF() ENDIF(XR_OPENXR_SDK_FOUND)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
XR_OPENXR_SDK_INCLUDE_DIR XR_OPENXR_SDK_INCLUDE_DIR

View File

@@ -330,9 +330,6 @@ function(gtest_add_tests)
set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*") set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*")
set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)") set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)")
# This will get a filter for each test suite.
set(test_filters "")
foreach(source IN LISTS ARGS_SOURCES) foreach(source IN LISTS ARGS_SOURCES)
if(NOT ARGS_SKIP_DEPENDENCY) if(NOT ARGS_SKIP_DEPENDENCY)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source}) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source})
@@ -379,32 +376,175 @@ function(gtest_add_tests)
list(APPEND testList ${ctest_test_name}) list(APPEND testList ${ctest_test_name})
endif() endif()
else() else()
# BLENDER: collect tests named "suite.testcase" as list of "suite.*" filters. set(ctest_test_name ${ARGS_TEST_PREFIX}${gtest_test_name}${ARGS_TEST_SUFFIX})
string(REGEX REPLACE "\\..*$" "" gtest_suite_name ${gtest_test_name}) add_test(NAME ${ctest_test_name}
list(APPEND test_filters "${gtest_suite_name}.*") ${workDir}
COMMAND ${ARGS_TARGET}
--gtest_filter=${gtest_test_name}
${ARGS_EXTRA_ARGS}
)
list(APPEND testList ${ctest_test_name})
endif() endif()
endforeach() endforeach()
endforeach() endforeach()
# Join all found GTest suite names into one big filter.
list(REMOVE_DUPLICATES test_filters)
list(JOIN test_filters ":" gtest_filter)
add_test(NAME ${ARGS_TEST_PREFIX}
${workDir}
COMMAND ${ARGS_TARGET}
--gtest_filter=${gtest_filter}
${ARGS_EXTRA_ARGS}
)
list(APPEND testList ${ARGS_TEST_PREFIX})
if(ARGS_TEST_LIST) if(ARGS_TEST_LIST)
set(${ARGS_TEST_LIST} ${testList} PARENT_SCOPE) set(${ARGS_TEST_LIST} ${testList} PARENT_SCOPE)
endif() endif()
endfunction() endfunction()
# BLENDER: remove the discovery function gtest_discover_tests(). It's not used, #------------------------------------------------------------------------------
# as it generates too many test invocations.
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 # Restore project's policies
cmake_policy(POP) 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

@@ -8,17 +8,6 @@
# #
#============================================================================= #=============================================================================
function(GET_BLENDER_TEST_INSTALL_DIR VARIABLE_NAME)
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)
string(REPLACE "\${BUILD_TYPE}" "$<CONFIG>" TEST_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
else()
string(REPLACE "\${BUILD_TYPE}" "" TEST_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
endif()
set(${VARIABLE_NAME} "${TEST_INSTALL_DIR}" PARENT_SCOPE)
endfunction()
macro(BLENDER_SRC_GTEST_EX) macro(BLENDER_SRC_GTEST_EX)
if(WITH_GTESTS) if(WITH_GTESTS)
set(options SKIP_ADD_TEST) set(options SKIP_ADD_TEST)
@@ -50,7 +39,6 @@ macro(BLENDER_SRC_GTEST_EX)
add_definitions(${GLOG_DEFINES}) add_definitions(${GLOG_DEFINES})
add_executable(${TARGET_NAME} ${ARG_SRC} ${MANIFEST}) add_executable(${TARGET_NAME} ${ARG_SRC} ${MANIFEST})
setup_platform_linker_flags(${TARGET_NAME})
target_include_directories(${TARGET_NAME} PUBLIC "${TEST_INC}") target_include_directories(${TARGET_NAME} PUBLIC "${TEST_INC}")
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${TEST_INC_SYS}") target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${TEST_INC_SYS}")
target_link_libraries(${TARGET_NAME} ${ARG_EXTRA_LIBS} ${PLATFORM_LINKLIBS}) target_link_libraries(${TARGET_NAME} ${ARG_EXTRA_LIBS} ${PLATFORM_LINKLIBS})
@@ -86,7 +74,13 @@ macro(BLENDER_SRC_GTEST_EX)
target_link_libraries(${TARGET_NAME} ${GMP_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${GMP_LIBRARIES})
endif() endif()
GET_BLENDER_TEST_INSTALL_DIR(TEST_INSTALL_DIR) get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)
string(REPLACE "\${BUILD_TYPE}" "$<CONFIG>" TEST_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
else()
string(REPLACE "\${BUILD_TYPE}" "" TEST_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
endif()
set_target_properties(${TARGET_NAME} PROPERTIES set_target_properties(${TARGET_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}" RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
@@ -102,7 +96,6 @@ macro(BLENDER_SRC_GTEST_EX)
set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0) set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
endif() endif()
if(WIN32) if(WIN32)
set_target_properties(${TARGET_NAME} PROPERTIES VS_GLOBAL_VcpkgEnabled "false")
unset(MANIFEST) unset(MANIFEST)
endif() endif()
unset(TEST_INC) unset(TEST_INC)

View File

@@ -128,7 +128,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_changed_files STREQUAL "") if(NOT _git_changed_files STREQUAL "")
string(APPEND MY_WC_BRANCH " (modified)") set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
else() else()
# Unpushed commits are also considered local modifications # Unpushed commits are also considered local modifications
execute_process(COMMAND git log @{u}.. execute_process(COMMAND git log @{u}..
@@ -137,7 +137,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET) ERROR_QUIET)
if(NOT _git_unpushed_log STREQUAL "") if(NOT _git_unpushed_log STREQUAL "")
string(APPEND MY_WC_BRANCH " (modified)") set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
endif() endif()
unset(_git_unpushed_log) unset(_git_unpushed_log)
endif() endif()
@@ -161,7 +161,6 @@ file(WRITE buildinfo.h.txt
"#define BUILD_BRANCH \"${MY_WC_BRANCH}\"\n" "#define BUILD_BRANCH \"${MY_WC_BRANCH}\"\n"
"#define BUILD_DATE \"${BUILD_DATE}\"\n" "#define BUILD_DATE \"${BUILD_DATE}\"\n"
"#define BUILD_TIME \"${BUILD_TIME}\"\n" "#define BUILD_TIME \"${BUILD_TIME}\"\n"
"#include \"buildinfo_static.h\"\n"
) )
# cleanup # cleanup

View File

@@ -1,8 +0,0 @@
/* CMake expanded values that won't change between CMake execution (unlike date/time).
* This is included by `buildinfo.h` generated by `buildinfo.cmake`. */
#define BUILD_PLATFORM "@BUILD_PLATFORM@"
#define BUILD_TYPE "@BUILD_TYPE@"
#define BUILD_CFLAGS "@BUILD_CFLAGS@"
#define BUILD_CXXFLAGS "@BUILD_CXXFLAGS@"
#define BUILD_LINKFLAGS "@BUILD_LINKFLAGS@"
#define BUILD_SYSTEM "@BUILD_SYSTEM@"

View File

@@ -13,7 +13,7 @@ Invocation:
export CLANG_BIND_DIR="/dsk/src/llvm/tools/clang/bindings/python" export CLANG_BIND_DIR="/dsk/src/llvm/tools/clang/bindings/python"
export CLANG_LIB_DIR="/opt/llvm/lib" export CLANG_LIB_DIR="/opt/llvm/lib"
python clang_array_check.py somefile.c -DSOME_DEFINE -I/some/include python2 clang_array_check.py somefile.c -DSOME_DEFINE -I/some/include
... defines and includes are optional ... defines and includes are optional
@@ -76,32 +76,6 @@ defs_precalc = {
"glNormal3bv": {0: 3}, "glNormal3bv": {0: 3},
"glNormal3iv": {0: 3}, "glNormal3iv": {0: 3},
"glNormal3sv": {0: 3}, "glNormal3sv": {0: 3},
# GPU immediate mode.
"immVertex2iv": {1: 2},
"immVertex2fv": {1: 2},
"immVertex3fv": {1: 3},
"immAttr2fv": {1: 2},
"immAttr3fv": {1: 3},
"immAttr4fv": {1: 4},
"immAttr3ubv": {1: 3},
"immAttr4ubv": {1: 4},
"immUniform2fv": {1: 2},
"immUniform3fv": {1: 3},
"immUniform4fv": {1: 4},
"immUniformColor3fv": {0: 3},
"immUniformColor4fv": {0: 4},
"immUniformColor3ubv": {1: 3},
"immUniformColor4ubv": {1: 4},
"immUniformColor3fvAlpha": {0: 3},
"immUniformColor4fvAlpha": {0: 4},
} }
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@@ -126,8 +100,7 @@ else:
if CLANG_LIB_DIR is None: if CLANG_LIB_DIR is None:
print("$CLANG_LIB_DIR clang lib dir not set") print("$CLANG_LIB_DIR clang lib dir not set")
if CLANG_BIND_DIR: sys.path.append(CLANG_BIND_DIR)
sys.path.append(CLANG_BIND_DIR)
import clang import clang
import clang.cindex import clang.cindex
@@ -135,8 +108,7 @@ from clang.cindex import (CursorKind,
TypeKind, TypeKind,
TokenKind) TokenKind)
if CLANG_LIB_DIR: clang.cindex.Config.set_library_path(CLANG_LIB_DIR)
clang.cindex.Config.set_library_path(CLANG_LIB_DIR)
index = clang.cindex.Index.create() index = clang.cindex.Index.create()
@@ -383,8 +355,6 @@ def recursive_arg_sizes(node, ):
# print("adding", node.spelling) # print("adding", node.spelling)
for c in node.get_children(): for c in node.get_children():
recursive_arg_sizes(c) recursive_arg_sizes(c)
# cache function sizes # cache function sizes
recursive_arg_sizes(tu.cursor) recursive_arg_sizes(tu.cursor)
_defs.update(defs_precalc) _defs.update(defs_precalc)

View File

@@ -21,7 +21,7 @@
# <pep8 compliant> # <pep8 compliant>
import sys import sys
if sys.version_info.major < 3: if not sys.version.startswith("3"):
print("\nPython3.x needed, found %s.\nAborting!\n" % print("\nPython3.x needed, found %s.\nAborting!\n" %
sys.version.partition(" ")[0]) sys.version.partition(" ")[0])
sys.exit(1) sys.exit(1)

View File

@@ -182,7 +182,7 @@ def create_nb_project_main():
f.write(' </logicalFolder>\n') f.write(' </logicalFolder>\n')
# default, but this dir is infact not in blender dir so we can ignore it # default, but this dir is infact not in blender dir so we can ignore it
# f.write(' <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>\n') # f.write(' <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>\n')
f.write(r' <sourceFolderFilter>^(nbproject|__pycache__|.*\.py|.*\.html|.*\.blend)$</sourceFolderFilter>\n') f.write(' <sourceFolderFilter>^(nbproject|__pycache__|.*\.py|.*\.html|.*\.blend)$</sourceFolderFilter>\n')
f.write(' <sourceRootList>\n') f.write(' <sourceRootList>\n')
f.write(' <Elem>%s</Elem>\n' % SOURCE_DIR) # base_root_rel f.write(' <Elem>%s</Elem>\n' % SOURCE_DIR) # base_root_rel

View File

@@ -8,7 +8,6 @@ import sys
cmakelists_file = sys.argv[-1] cmakelists_file = sys.argv[-1]
def main(): def main():
options = [] options = []
for l in open(cmakelists_file, 'r').readlines(): for l in open(cmakelists_file, 'r').readlines():

View File

@@ -32,7 +32,7 @@ CHECKER_IGNORE_PREFIX = [
"intern/moto", "intern/moto",
] ]
CHECKER_BIN = "python3" CHECKER_BIN = "python2"
CHECKER_ARGS = [ CHECKER_ARGS = [
os.path.join(os.path.dirname(__file__), "clang_array_check.py"), os.path.join(os.path.dirname(__file__), "clang_array_check.py"),
@@ -49,8 +49,8 @@ def main():
check_commands = [] check_commands = []
for c, inc_dirs, defs in source_info: for c, inc_dirs, defs in source_info:
# ~if "source/blender" not in c: #~if "source/blender" not in c:
# ~ continue #~ continue
cmd = ([CHECKER_BIN] + cmd = ([CHECKER_BIN] +
CHECKER_ARGS + CHECKER_ARGS +

View File

@@ -5,22 +5,24 @@
# #
set(WITH_ALEMBIC ON CACHE BOOL "" FORCE) set(WITH_ALEMBIC ON CACHE BOOL "" FORCE)
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE) set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
set(WITH_BULLET ON CACHE BOOL "" FORCE) set(WITH_BULLET ON CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE) set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE) set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE) set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE) set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE) set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE) set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
set(WITH_DRACO ON CACHE BOOL "" FORCE) set(WITH_DRACO ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 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_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GMP ON CACHE BOOL "" FORCE) set(WITH_GMP ON CACHE BOOL "" FORCE)
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER 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) set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE) set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE) set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
@@ -29,13 +31,12 @@ set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE) set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_LZMA ON CACHE BOOL "" FORCE) set(WITH_LZMA ON CACHE BOOL "" FORCE)
set(WITH_LZO ON CACHE BOOL "" FORCE) set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE) set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE) set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE) set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_OPENAL ON CACHE BOOL "" FORCE) set(WITH_OPENAL ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE) set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE) set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
@@ -44,8 +45,6 @@ set(WITH_OPENMP ON CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE) set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB ON CACHE BOOL "" FORCE) set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE) set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
set(WITH_NANOVDB ON CACHE BOOL "" FORCE)
set(WITH_POTRACE ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE) set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE) set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE) set(WITH_SDL ON CACHE BOOL "" FORCE)

View File

@@ -7,7 +7,6 @@
set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE) set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE) set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
set(WITH_BOOST OFF CACHE BOOL "" FORCE) set(WITH_BOOST OFF CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE) set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
@@ -15,17 +14,20 @@ set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE) set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE) set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE) set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE) set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_EMBREE OFF CACHE BOOL "" FORCE) set(WITH_CYCLES_EMBREE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE) set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEVICE_OPTIX OFF CACHE BOOL "" FORCE) set(WITH_CYCLES_DEVICE_OPTIX OFF CACHE BOOL "" FORCE)
set(WITH_DRACO OFF CACHE BOOL "" FORCE) set(WITH_DRACO OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 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_FREESTYLE OFF CACHE BOOL "" FORCE)
set(WITH_GMP OFF CACHE BOOL "" FORCE) set(WITH_GMP OFF CACHE BOOL "" FORCE)
set(WITH_IK_ITASC OFF CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER 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) set(WITH_IMAGE_CINEON OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_DDS OFF CACHE BOOL "" FORCE) set(WITH_IMAGE_DDS OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_HDR OFF CACHE BOOL "" FORCE) set(WITH_IMAGE_HDR OFF CACHE BOOL "" FORCE)
@@ -35,13 +37,12 @@ set(WITH_IMAGE_TIFF OFF CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE) set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
set(WITH_LZMA OFF CACHE BOOL "" FORCE) set(WITH_LZMA OFF CACHE BOOL "" FORCE)
set(WITH_LZO OFF CACHE BOOL "" FORCE) set(WITH_LZO OFF CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH OFF CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID OFF CACHE BOOL "" FORCE) set(WITH_MOD_FLUID OFF CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM OFF CACHE BOOL "" FORCE) set(WITH_MOD_OCEANSIM OFF CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH OFF CACHE BOOL "" FORCE) set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE) set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE) set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE) set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
@@ -51,7 +52,6 @@ set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENMP OFF CACHE BOOL "" FORCE) set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE) set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE) set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_NANOVDB OFF CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW OFF CACHE BOOL "" FORCE) set(WITH_QUADRIFLOW OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE) set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_TBB OFF CACHE BOOL "" FORCE) set(WITH_TBB OFF CACHE BOOL "" FORCE)

View File

@@ -4,7 +4,6 @@
# cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender # cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender
# #
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_ALEMBIC ON CACHE BOOL "" FORCE) set(WITH_ALEMBIC ON CACHE BOOL "" FORCE)
set(WITH_ASSERT_ABORT OFF CACHE BOOL "" FORCE) set(WITH_ASSERT_ABORT OFF CACHE BOOL "" FORCE)
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE) set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
@@ -12,12 +11,15 @@ set(WITH_BULLET ON CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE) set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE) set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE) set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE) set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE) set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE) set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
set(WITH_DRACO ON CACHE BOOL "" FORCE) set(WITH_DRACO ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 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_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GMP ON CACHE BOOL "" FORCE) set(WITH_GMP ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE) set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
@@ -30,13 +32,12 @@ set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE) set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_LZMA ON CACHE BOOL "" FORCE) set(WITH_LZMA ON CACHE BOOL "" FORCE)
set(WITH_LZO ON CACHE BOOL "" FORCE) set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE) set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE) set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE) set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_OPENAL ON CACHE BOOL "" FORCE) set(WITH_OPENAL ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE) set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE) set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
@@ -45,8 +46,6 @@ set(WITH_OPENMP ON CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE) set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB ON CACHE BOOL "" FORCE) set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE) set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
set(WITH_NANOVDB ON CACHE BOOL "" FORCE)
set(WITH_POTRACE ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE) set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE) set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE) set(WITH_SDL ON CACHE BOOL "" FORCE)
@@ -56,7 +55,7 @@ set(WITH_USD ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE) set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE) set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE) set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75;sm_86;compute_75 CACHE STRING "" FORCE) set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75;compute_75 CACHE STRING "" FORCE)
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE) set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
# platform dependent options # platform dependent options

View File

@@ -28,15 +28,23 @@ set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE) set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE) set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_NANOVDB OFF CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE) set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
# Depends on Python install, do this to quiet warning. # Depends on Python install, do this to quiet warning.
set(WITH_DRACO OFF CACHE BOOL "" FORCE) set(WITH_DRACO OFF CACHE BOOL "" FORCE)
# Jemalloc does not work with dlopen() of Python modules: # Note, if linking errors can be resolved, lines below can be removed.
# https://github.com/jemalloc/jemalloc/issues/1237 # Until then, disable configurations known to fail.
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
if(UNIX AND NOT APPLE)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# jemalloc causes linking error on import, disable.
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
endif()
elseif(APPLE)
# OpenMP causes linking error on build, disable.
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
endif()
if(WIN32) if(WIN32)
set(WITH_WINDOWS_BUNDLE_CRT OFF CACHE BOOL "" FORCE) set(WITH_WINDOWS_BUNDLE_CRT OFF CACHE BOOL "" FORCE)

View File

@@ -114,6 +114,5 @@ def main():
import subprocess import subprocess
subprocess.call(cmd) subprocess.call(cmd)
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View File

@@ -60,19 +60,6 @@ function(list_assert_duplicates
unset(_len_after) unset(_len_after)
endfunction() endfunction()
# Adds a native path separator to the end of the path:
#
# - 'example' -> 'example/'
# - '/example///' -> '/example/'
#
macro(path_ensure_trailing_slash
path_new path_input
)
file(TO_NATIVE_PATH "/" _path_sep)
string(REGEX REPLACE "[${_path_sep}]+$" "" ${path_new} ${path_input})
set(${path_new} "${${path_new}}${_path_sep}")
unset(_path_sep)
endmacro()
# foo_bar.spam --> foo_barMySuffix.spam # foo_bar.spam --> foo_barMySuffix.spam
macro(file_suffix macro(file_suffix
@@ -196,7 +183,7 @@ function(blender_user_header_search_paths
foreach(_INC ${includes}) foreach(_INC ${includes})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE) get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
# _ALL_INCS is a space-separated string of file paths in quotes. # _ALL_INCS is a space-separated string of file paths in quotes.
string(APPEND _ALL_INCS " \"${_ABS_INC}\"") set(_ALL_INCS "${_ALL_INCS} \"${_ABS_INC}\"")
endforeach() endforeach()
set_target_properties(${name} PROPERTIES XCODE_ATTRIBUTE_USER_HEADER_SEARCH_PATHS "${_ALL_INCS}") set_target_properties(${name} PROPERTIES XCODE_ATTRIBUTE_USER_HEADER_SEARCH_PATHS "${_ALL_INCS}")
endif() endif()
@@ -263,11 +250,11 @@ macro(add_cc_flags_custom_test
string(TOUPPER ${name} _name_upper) string(TOUPPER ${name} _name_upper)
if(DEFINED CMAKE_C_FLAGS_${_name_upper}) if(DEFINED CMAKE_C_FLAGS_${_name_upper})
message(STATUS "Using custom CFLAGS: CMAKE_C_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"") message(STATUS "Using custom CFLAGS: CMAKE_C_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"")
string(APPEND CMAKE_C_FLAGS " ${CMAKE_C_FLAGS_${_name_upper}}" ${ARGV1}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_name_upper}}" ${ARGV1})
endif() endif()
if(DEFINED CMAKE_CXX_FLAGS_${_name_upper}) if(DEFINED CMAKE_CXX_FLAGS_${_name_upper})
message(STATUS "Using custom CXXFLAGS: CMAKE_CXX_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"") message(STATUS "Using custom CXXFLAGS: CMAKE_CXX_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"")
string(APPEND CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS_${_name_upper}}" ${ARGV1}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_name_upper}}" ${ARGV1})
endif() endif()
unset(_name_upper) unset(_name_upper)
@@ -315,14 +302,14 @@ function(blender_add_lib__impl
# #
# What this code does it traverses library_deps and extracts information about whether # What this code does it traverses library_deps and extracts information about whether
# library is to provided as general, debug or optimized. This is a little state machine which # library is to provided as general, debug or optimized. This is a little state machine which
# keeps track of which build type library is to provided for: # keeps track of whiuch build type library is to provided for:
# #
# - If "debug" or "optimized" word is found, the next element in the list is expected to be # - If "debug" or "optimized" word is found, the next element in the list is expected to be
# a library which will be passed to target_link_libraries() under corresponding build type. # a library which will be passed to target_link_libraries() under corresponding build type.
# #
# - If there is no "debug" or "optimized" used library is specified for all build types. # - If there is no "debug" or "optimized" used library is specified for all build types.
# #
# NOTE: If separated libraries for debug and release are needed every library is the list are # NOTE: If separated libraries for debug and release ar eneeded every library is the list are
# to be prefixed explicitly. # to be prefixed explicitly.
# #
# Use: "optimized libfoo optimized libbar debug libfoo_d debug libbar_d" # Use: "optimized libfoo optimized libbar debug libfoo_d debug libbar_d"
@@ -388,45 +375,9 @@ function(blender_add_lib
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
endfunction() endfunction()
function(blender_add_test_suite) # blender_add_test_lib() is used to define a test library. It is intended to be
if (ARGC LESS 1) # called in tandem with blender_add_lib(). The test library will be linked into
message(FATAL_ERROR "No arguments supplied to blender_add_test_suite()") # the bf_gtest_runner_test executable (see tests/gtests/CMakeLists.txt).
endif()
# Parse the arguments
set(oneValueArgs TARGET SUITE_NAME)
set(multiValueArgs SOURCES)
cmake_parse_arguments(ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# Figure out the release dir, as some tests need files from there.
GET_BLENDER_TEST_INSTALL_DIR(TEST_INSTALL_DIR)
if(APPLE)
set(_test_release_dir ${TEST_INSTALL_DIR}/Blender.app/Contents/Resources/${BLENDER_VERSION})
else()
if(WIN32 OR WITH_INSTALL_PORTABLE)
set(_test_release_dir ${TEST_INSTALL_DIR}/${BLENDER_VERSION})
else()
set(_test_release_dir ${TEST_INSTALL_DIR}/share/blender/${BLENDER_VERSION})
endif()
endif()
# Define a test case with our custom gtest_add_tests() command.
include(GTest)
gtest_add_tests(
TARGET ${ARGS_TARGET}
SOURCES "${ARGS_SOURCES}"
TEST_PREFIX ${ARGS_SUITE_NAME}
WORKING_DIRECTORY "${TEST_INSTALL_DIR}"
EXTRA_ARGS
--test-assets-dir "${CMAKE_SOURCE_DIR}/../lib/tests"
--test-release-dir "${_test_release_dir}"
)
unset(_test_release_dir)
endfunction()
# Add tests for a Blender library, to be called in tandem with blender_add_lib().
# The tests will be part of the blender_test executable (see tests/gtests/runner).
function(blender_add_test_lib function(blender_add_test_lib
name name
sources sources
@@ -458,50 +409,6 @@ function(blender_add_test_lib
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_deps}") blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_deps}")
set_property(GLOBAL APPEND PROPERTY BLENDER_TEST_LIBS ${name}) set_property(GLOBAL APPEND PROPERTY BLENDER_TEST_LIBS ${name})
blender_add_test_suite(
TARGET blender_test
SUITE_NAME ${name}
SOURCES "${sources}"
)
endfunction()
# Add tests for a Blender library, to be called in tandem with blender_add_lib().
# Test will be compiled into a ${name}_test executable.
#
# To be used for smaller isolated libraries, that do not have many dependencies.
# For libraries that do drag in many other Blender libraries and would create a
# very large executable, blender_add_test_lib() should be used instead.
function(blender_add_test_executable
name
sources
includes
includes_sys
library_deps
)
add_cc_flags_custom_test(${name} PARENT_SCOPE)
## Otherwise external projects will produce warnings that we cannot fix.
remove_strict_flags()
include_directories(${includes})
include_directories(${includes_sys})
setup_libdirs()
BLENDER_SRC_GTEST_EX(
NAME ${name}
SRC "${sources}"
EXTRA_LIBS "${library_deps}"
SKIP_ADD_TEST
)
blender_add_test_suite(
TARGET ${name}_test
SUITE_NAME ${name}
SOURCES "${sources}"
)
endfunction() endfunction()
# Ninja only: assign 'heavy pool' to some targets that are especially RAM-consuming to build. # Ninja only: assign 'heavy pool' to some targets that are especially RAM-consuming to build.
@@ -529,8 +436,8 @@ function(SETUP_LIBDIRS)
# NOTE: For all new libraries, use absolute library paths. # NOTE: For all new libraries, use absolute library paths.
# This should eventually be phased out. # This should eventually be phased out.
# APPLE plaform uses full paths for linking libraries, and avoids link_directories.
if(NOT MSVC AND NOT APPLE) if(NOT MSVC)
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH}) link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
@@ -607,18 +514,33 @@ function(SETUP_LIBDIRS)
endif() endif()
endfunction() endfunction()
# Platform specific linker flags for targets. macro(setup_platform_linker_flags)
function(setup_platform_linker_flags set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
target) set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}")
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${PLATFORM_LINKFLAGS}") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " ${PLATFORM_LINKFLAGS_RELEASE}") endmacro()
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " ${PLATFORM_LINKFLAGS_DEBUG}")
endfunction()
# Platform specific libraries for targets. function(setup_liblinks
function(setup_platform_linker_libs
target target
) )
# NOTE: This might look like it affects global scope, accumulating linker flags on every call
# to setup_liblinks, but this isn't how CMake works. These flags will only affect current
# directory from where the function is called.
# This means that setup_liblinks() called for ffmpeg_test will not affect blender, and each
# of thsoe targets will have single set of linker flags.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
# jemalloc must be early in the list, to be before pthread (see T57998) # jemalloc must be early in the list, to be before pthread (see T57998)
if(WITH_MEM_JEMALLOC) if(WITH_MEM_JEMALLOC)
target_link_libraries(${target} ${JEMALLOC_LIBRARIES}) target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
@@ -727,14 +649,14 @@ endmacro()
macro(add_c_flag macro(add_c_flag
flag) flag)
string(APPEND CMAKE_C_FLAGS " ${flag}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
string(APPEND CMAKE_CXX_FLAGS " ${flag}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
endmacro() endmacro()
macro(add_cxx_flag macro(add_cxx_flag
flag) flag)
string(APPEND CMAKE_CXX_FLAGS " ${flag}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
endmacro() endmacro()
macro(remove_strict_flags) macro(remove_strict_flags)
@@ -1178,7 +1100,6 @@ endfunction()
function(find_python_package function(find_python_package
package package
relative_include_dir
) )
string(TOUPPER ${package} _upper_package) string(TOUPPER ${package} _upper_package)
@@ -1210,10 +1131,7 @@ function(find_python_package
dist-packages dist-packages
vendor-packages vendor-packages
NO_DEFAULT_PATH NO_DEFAULT_PATH
DOC
"Path to python site-packages or dist-packages containing '${package}' module"
) )
mark_as_advanced(PYTHON_${_upper_package}_PATH)
if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}") if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}")
message(WARNING message(WARNING
@@ -1231,50 +1149,6 @@ function(find_python_package
set(WITH_PYTHON_INSTALL_${_upper_package} OFF PARENT_SCOPE) set(WITH_PYTHON_INSTALL_${_upper_package} OFF PARENT_SCOPE)
else() else()
message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'") message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'")
if(NOT "${relative_include_dir}" STREQUAL "")
set(_relative_include_dir "${package}/${relative_include_dir}")
unset(PYTHON_${_upper_package}_INCLUDE_DIRS CACHE)
find_path(PYTHON_${_upper_package}_INCLUDE_DIRS
NAMES
"${_relative_include_dir}"
HINTS
"${PYTHON_LIBPATH}/"
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
PATH_SUFFIXES
"site-packages/"
"dist-packages/"
"vendor-packages/"
NO_DEFAULT_PATH
DOC
"Path to python site-packages or dist-packages containing '${package}' module header files"
)
mark_as_advanced(PYTHON_${_upper_package}_INCLUDE_DIRS)
if(NOT EXISTS "${PYTHON_${_upper_package}_INCLUDE_DIRS}")
message(WARNING
"Python package '${package}' include dir path could not be found in:\n"
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${_relative_include_dir}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${_relative_include_dir}', "
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${_relative_include_dir}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${_relative_include_dir}', "
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/vendor-packages/${_relative_include_dir}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/vendor-packages/${_relative_include_dir}', "
"\n"
"The 'WITH_PYTHON_${_upper_package}' option will be disabled.\n"
"The build will be usable, only add-ons that depend on this package won't be functional."
)
set(WITH_PYTHON_${_upper_package} OFF PARENT_SCOPE)
else()
set(_temp "${PYTHON_${_upper_package}_INCLUDE_DIRS}/${package}/${relative_include_dir}")
unset(PYTHON_${_upper_package}_INCLUDE_DIRS CACHE)
set(PYTHON_${_upper_package}_INCLUDE_DIRS "${_temp}"
CACHE PATH "Path to the include directory of the ${package} module")
message(STATUS "${package} include files found at '${PYTHON_${_upper_package}_INCLUDE_DIRS}'")
endif()
endif()
endif() endif()
endif() endif()
endfunction() endfunction()
@@ -1341,16 +1215,8 @@ endmacro()
macro(without_system_libs_begin) macro(without_system_libs_begin)
set(CMAKE_IGNORE_PATH "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES};${CMAKE_SYSTEM_INCLUDE_PATH};${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}") set(CMAKE_IGNORE_PATH "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES};${CMAKE_SYSTEM_INCLUDE_PATH};${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}")
if(APPLE)
# Avoid searching for headers in frameworks (like Mono), and libraries in LIBDIR.
set(CMAKE_FIND_FRAMEWORK NEVER)
endif()
endmacro() endmacro()
macro(without_system_libs_end) macro(without_system_libs_end)
unset(CMAKE_IGNORE_PATH) unset(CMAKE_IGNORE_PATH)
if(APPLE)
# FIRST is the default.
set(CMAKE_FIND_FRAMEWORK FIRST)
endif()
endmacro() endmacro()

View File

@@ -86,7 +86,7 @@ if(WIN32)
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico) set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma") set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/license/GPL-3.0.txt) set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt)
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico) set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(BLENDER_NAMESPACE_GUID "507F933F-5898-404A-9A05-18282FD491A6") set(BLENDER_NAMESPACE_GUID "507F933F-5898-404A-9A05-18282FD491A6")

View File

@@ -30,49 +30,11 @@ macro(find_package_wrapper)
# do nothing, just satisfy the macro # do nothing, just satisfy the macro
endmacro() endmacro()
function(print_found_status
lib_name
lib_path
)
if(FIRST_RUN)
if(lib_path)
message(STATUS "Found ${lib_name}: ${lib_path}")
else()
message(WARNING "Could NOT find ${lib_name}")
endif()
endif()
endfunction()
# ------------------------------------------------------------------------
# Find system provided libraries.
# Find system ZLIB, not the pre-compiled one supplied with OpenCollada.
set(ZLIB_ROOT /usr)
find_package(ZLIB REQUIRED)
find_package(BZip2 REQUIRED)
list(APPEND ZLIB_LIBRARIES ${BZIP2_LIBRARIES})
if(WITH_OPENAL)
find_package(OpenAL)
if(NOT OPENAL_FOUND)
set(WITH_OPENAL OFF)
endif()
endif()
if(WITH_JACK)
find_library(JACK_FRAMEWORK
NAMES jackmp
)
if(NOT JACK_FRAMEWORK)
set(WITH_JACK OFF)
else()
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
endif()
endif()
if(NOT DEFINED LIBDIR) if(NOT DEFINED LIBDIR)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin) set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
# Prefer lib directory paths
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
else() else()
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}") message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
endif() endif()
@@ -80,19 +42,22 @@ if(NOT EXISTS "${LIBDIR}/")
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'") message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif() endif()
# Prefer lib directory paths if(WITH_OPENAL)
file(GLOB LIB_SUBDIRS ${LIBDIR}/*) find_package(OpenAL)
set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS}) if(OPENAL_FOUND)
set(WITH_OPENAL ON)
# ------------------------------------------------------------------------- else()
# Find precompiled libraries, and avoid system or user-installed ones. set(WITH_OPENAL OFF)
endif()
if(EXISTS ${LIBDIR})
without_system_libs_begin()
endif() endif()
if(WITH_ALEMBIC) if(WITH_ALEMBIC)
find_package(Alembic) set(ALEMBIC ${LIBDIR}/alembic)
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
set(ALEMBIC_LIBRARIES Alembic)
set(ALEMBIC_FOUND ON)
endif() endif()
if(WITH_USD) if(WITH_USD)
@@ -103,27 +68,30 @@ if(WITH_USD)
endif() endif()
if(WITH_OPENSUBDIV) if(WITH_OPENSUBDIV)
find_package(OpenSubdiv) set(OPENSUBDIV ${LIBDIR}/opensubdiv)
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
find_library(OSD_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
find_library(OSD_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
list(APPEND OPENSUBDIV_LIBRARIES ${OSD_LIB_CPU} ${OSD_LIB_GPU})
endif()
if(WITH_JACK)
find_library(JACK_FRAMEWORK
NAMES jackmp
)
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
if(NOT JACK_FRAMEWORK)
set(WITH_JACK OFF)
endif()
endif() endif()
if(WITH_CODEC_SNDFILE) if(WITH_CODEC_SNDFILE)
find_package(SndFile) set(LIBSNDFILE ${LIBDIR}/sndfile)
find_library(_sndfile_FLAC_LIBRARY NAMES flac HINTS ${LIBDIR}/sndfile/lib) set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
find_library(_sndfile_OGG_LIBRARY NAMES ogg HINTS ${LIBDIR}/ffmpeg/lib) set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
find_library(_sndfile_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib) set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
list(APPEND LIBSNDFILE_LIBRARIES
${_sndfile_FLAC_LIBRARY}
${_sndfile_OGG_LIBRARY}
${_sndfile_VORBIS_LIBRARY}
${_sndfile_VORBISENC_LIBRARY}
)
print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
unset(_sndfile_FLAC_LIBRARY)
unset(_sndfile_OGG_LIBRARY)
unset(_sndfile_VORBIS_LIBRARY)
unset(_sndfile_VORBISENC_LIBRARY)
endif() endif()
if(WITH_PYTHON) if(WITH_PYTHON)
@@ -162,27 +130,54 @@ if(WITH_PYTHON)
endif() endif()
if(WITH_FFTW3) if(WITH_FFTW3)
find_package(Fftw3) set(FFTW3 ${LIBDIR}/fftw3)
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
set(FFTW3_LIBRARIES fftw3)
set(FFTW3_LIBPATH ${FFTW3}/lib)
endif() endif()
find_package(Freetype REQUIRED) set(ZLIB /usr)
set(ZLIB_INCLUDE_DIRS "${ZLIB}/include")
set(ZLIB_LIBRARIES z bz2)
set(PNG_LIBRARIES png ${ZLIB_LIBRARIES})
set(JPEG_LIBRARIES jpeg)
set(FREETYPE ${LIBDIR}/freetype)
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
set(FREETYPE_LIBRARY freetype)
if(WITH_IMAGE_OPENEXR) if(WITH_IMAGE_OPENEXR)
find_package(OpenEXR) set(OPENEXR ${LIBDIR}/openexr)
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
set(OPENEXR_LIBRARIES
Iex
Half
IlmImf
Imath
IlmThread)
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
endif() endif()
if(WITH_CODEC_FFMPEG) if(WITH_CODEC_FFMPEG)
set(FFMPEG_FIND_COMPONENTS set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
set(FFMPEG_LIBRARIES
avcodec avdevice avformat avutil avcodec avdevice avformat avutil
mp3lame ogg opus swresample swscale mp3lame swscale x264 xvidcore
theora theoradec theoraenc vorbis vorbisenc theora theoradec theoraenc
vorbisfile vpx x264 xvidcore) vorbis vorbisenc vorbisfile ogg opus
find_package(FFmpeg) vpx swresample)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
endif() endif()
if(WITH_IMAGE_OPENJPEG OR WITH_CODEC_FFMPEG) if(WITH_IMAGE_OPENJPEG OR WITH_CODEC_FFMPEG)
# use openjpeg from libdir that is linked into ffmpeg # use openjpeg from libdir that is linked into ffmpeg
find_package(OpenJPEG) set(OPENJPEG ${LIBDIR}/openjpeg)
set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjp2.a)
endif() endif()
find_library(SYSTEMSTUBS_LIBRARY find_library(SYSTEMSTUBS_LIBRARY
@@ -195,7 +190,7 @@ if(SYSTEMSTUBS_LIBRARY)
list(APPEND PLATFORM_LINKLIBS SystemStubs) list(APPEND PLATFORM_LINKLIBS SystemStubs)
endif() endif()
string(APPEND PLATFORM_CFLAGS " -pipe -funsigned-char -fno-strict-aliasing") set(PLATFORM_CFLAGS "-pipe -funsigned-char")
set(PLATFORM_LINKFLAGS set(PLATFORM_LINKFLAGS
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore" "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore"
) )
@@ -203,84 +198,97 @@ set(PLATFORM_LINKFLAGS
list(APPEND PLATFORM_LINKLIBS c++) list(APPEND PLATFORM_LINKLIBS c++)
if(WITH_JACK) if(WITH_JACK)
string(APPEND PLATFORM_LINKFLAGS " -F/Library/Frameworks -weak_framework jackmp") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
endif() endif()
if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK) if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
# force cmake to link right framework # force cmake to link right framework
string(APPEND PLATFORM_LINKFLAGS " /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
endif() endif()
if(WITH_OPENCOLLADA) if(WITH_OPENCOLLADA)
find_package(OpenCOLLADA) set(OPENCOLLADA ${LIBDIR}/opencollada)
find_library(PCRE_LIBRARIES NAMES pcre HINTS ${LIBDIR}/opencollada/lib)
find_library(XML2_LIBRARIES NAMES xml2 HINTS ${LIBDIR}/opencollada/lib) set(OPENCOLLADA_INCLUDE_DIRS
print_found_status("PCRE" "${PCRE_LIBRARIES}") ${LIBDIR}/opencollada/include/COLLADAStreamWriter
print_found_status("XML2" "${XML2_LIBRARIES}") ${LIBDIR}/opencollada/include/COLLADABaseUtils
${LIBDIR}/opencollada/include/COLLADAFramework
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
${LIBDIR}/opencollada/include/GeneratedSaxParser
)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES
OpenCOLLADASaxFrameworkLoader
-lOpenCOLLADAFramework
-lOpenCOLLADABaseUtils
-lOpenCOLLADAStreamWriter
-lMathMLSolver
-lGeneratedSaxParser
-lbuffer -lftoa -lUTF
)
# PCRE and XML2 are bundled with OpenCollada.
set(PCRE_LIBRARIES pcre)
set(XML2_LIBRARIES xml2)
endif() endif()
if(WITH_SDL) if(WITH_SDL)
find_package(SDL2) set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIRS}) set(SDL_INCLUDE_DIR ${SDL}/include)
set(SDL_LIBRARY ${SDL2_LIBRARIES}) set(SDL_LIBRARY SDL2)
string(APPEND PLATFORM_LINKFLAGS " -framework ForceFeedback") set(SDL_LIBPATH ${SDL}/lib)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
endif() endif()
set(PNG_ROOT ${LIBDIR}/png) set(PNG "${LIBDIR}/png")
find_package(PNG REQUIRED) set(PNG_INCLUDE_DIRS "${PNG}/include")
set(PNG_LIBPATH ${PNG}/lib)
set(JPEG_ROOT ${LIBDIR}/jpeg) set(JPEG "${LIBDIR}/jpeg")
find_package(JPEG REQUIRED) set(JPEG_INCLUDE_DIR "${JPEG}/include")
set(JPEG_LIBPATH ${JPEG}/lib)
if(WITH_IMAGE_TIFF) if(WITH_IMAGE_TIFF)
set(TIFF_ROOT ${LIBDIR}/tiff) set(TIFF ${LIBDIR}/tiff)
find_package(TIFF) set(TIFF_INCLUDE_DIR ${TIFF}/include)
if(NOT TIFF_FOUND) set(TIFF_LIBRARY tiff)
message(WARNING "TIFF not found, disabling WITH_IMAGE_TIFF") set(TIFF_LIBPATH ${TIFF}/lib)
set(WITH_IMAGE_TIFF OFF)
endif()
endif() endif()
if(WITH_BOOST) if(WITH_BOOST)
set(Boost_NO_BOOST_CMAKE ON) set(BOOST ${LIBDIR}/boost)
set(BOOST_ROOT ${LIBDIR}/boost) set(BOOST_INCLUDE_DIR ${BOOST}/include)
set(Boost_NO_SYSTEM_PATHS ON) set(BOOST_POSTFIX)
set(_boost_FIND_COMPONENTS date_time filesystem regex system thread wave) set(BOOST_LIBRARIES
boost_date_time${BOOST_POSTFIX}
boost_filesystem${BOOST_POSTFIX}
boost_regex${BOOST_POSTFIX}
boost_system${BOOST_POSTFIX}
boost_thread${BOOST_POSTFIX}
boost_wave${BOOST_POSTFIX}
)
if(WITH_INTERNATIONAL) if(WITH_INTERNATIONAL)
list(APPEND _boost_FIND_COMPONENTS locale) list(APPEND BOOST_LIBRARIES boost_locale${BOOST_POSTFIX})
endif() endif()
if(WITH_CYCLES_NETWORK) if(WITH_CYCLES_NETWORK)
list(APPEND _boost_FIND_COMPONENTS serialization) list(APPEND BOOST_LIBRARIES boost_serialization${BOOST_POSTFIX})
endif() endif()
if(WITH_OPENVDB) if(WITH_OPENVDB)
list(APPEND _boost_FIND_COMPONENTS iostreams) list(APPEND BOOST_LIBRARIES boost_iostreams${BOOST_POSTFIX})
endif() endif()
find_package(Boost COMPONENTS ${_boost_FIND_COMPONENTS}) set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
set(BOOST_DEFINITIONS) set(BOOST_DEFINITIONS)
mark_as_advanced(Boost_LIBRARIES)
mark_as_advanced(Boost_INCLUDE_DIRS)
unset(_boost_FIND_COMPONENTS)
endif() endif()
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG) if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it ! set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it !
endif()
if(WITH_PUGIXML)
find_package(PugiXML)
if(NOT PUGIXML_FOUND)
message(WARNING "PugiXML not found, disabling WITH_PUGIXML")
set(WITH_PUGIXML OFF)
endif()
endif() endif()
if(WITH_OPENIMAGEIO) if(WITH_OPENIMAGEIO)
find_package(OpenImageIO) set(OPENIMAGEIO ${LIBDIR}/openimageio)
list(APPEND OPENIMAGEIO_LIBRARIES set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES
${OPENIMAGEIO}/lib/libOpenImageIO.a
${PNG_LIBRARIES} ${PNG_LIBRARIES}
${JPEG_LIBRARIES} ${JPEG_LIBRARIES}
${TIFF_LIBRARY} ${TIFF_LIBRARY}
@@ -288,30 +296,69 @@ if(WITH_OPENIMAGEIO)
${OPENJPEG_LIBRARIES} ${OPENJPEG_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
) )
set(OPENIMAGEIO_LIBPATH
${OPENIMAGEIO}/lib
${JPEG_LIBPATH}
${PNG_LIBPATH}
${TIFF_LIBPATH}
${OPENEXR_LIBPATH}
${ZLIB_LIBPATH}
)
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD") set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff") set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
endif() endif()
if(WITH_OPENCOLORIO) if(WITH_OPENCOLORIO)
find_package(OpenColorIO) set(OPENCOLORIO ${LIBDIR}/opencolorio)
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
endif() endif()
if(WITH_OPENVDB) if(WITH_OPENVDB)
find_package(OpenVDB) set(OPENVDB ${LIBDIR}/openvdb)
find_library(BLOSC_LIBRARIES NAMES blosc HINTS ${LIBDIR}/openvdb/lib) set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
print_found_status("Blosc" "${BLOSC_LIBRARIES}") set(OPENVDB_LIBRARIES openvdb blosc)
list(APPEND OPENVDB_LIBRARIES ${BLOSC_LIBRARIES}) set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
set(OPENVDB_DEFINITIONS) set(OPENVDB_DEFINITIONS)
endif() endif()
if(WITH_NANOVDB)
set(NANOVDB ${LIBDIR}/nanovdb)
set(NANOVDB_INCLUDE_DIR ${NANOVDB}/include)
endif()
if(WITH_LLVM) if(WITH_LLVM)
find_package(LLVM) set(LLVM_ROOT_DIR ${LIBDIR}/llvm)
if(NOT LLVM_FOUND) if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
else()
set(LLVM_CONFIG llvm-config)
endif()
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --includedir
OUTPUT_VARIABLE LLVM_INCLUDE_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
# way for LLVM_LIBRARY.
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE ".a /" ".a;/" LLVM_LIBRARY ${LLVM_LIBRARY})
else()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
endif()
else()
message(FATAL_ERROR "LLVM not found.") message(FATAL_ERROR "LLVM not found.")
endif() endif()
endif() endif()
@@ -344,20 +391,7 @@ endif()
if(WITH_CYCLES_EMBREE) if(WITH_CYCLES_EMBREE)
find_package(Embree 3.8.0 REQUIRED) find_package(Embree 3.8.0 REQUIRED)
# Increase stack size for Embree, only works for executables. set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -stack_size -Xlinker 0x100000")
if(NOT WITH_PYTHON_MODULE)
string(APPEND PLATFORM_LINKFLAGS " -Wl,-stack_size,0x100000")
endif()
# Embree static library linking can mix up SSE and AVX symbols, causing
# crashes on macOS systems with older CPUs that don't have AVX. Using
# force load avoids that. The Embree shared library does not suffer from
# this problem, precisely because linking a shared library uses force load.
set(_embree_libraries_force_load)
foreach(_embree_library ${EMBREE_LIBRARIES})
list(APPEND _embree_libraries_force_load "-Wl,-force_load,${_embree_library}")
endforeach()
set(EMBREE_LIBRARIES ${_embree_libraries_force_load})
endif() endif()
if(WITH_OPENIMAGEDENOISE) if(WITH_OPENIMAGEDENOISE)
@@ -373,42 +407,35 @@ if(WITH_TBB)
find_package(TBB) find_package(TBB)
endif() endif()
if(WITH_POTRACE) if(WITH_GMP)
find_package(Potrace) find_package(GMP)
if(NOT POTRACE_FOUND)
message(WARNING "potrace not found, disabling WITH_POTRACE") if(NOT GMP_FOUND)
set(WITH_POTRACE OFF) set(WITH_GMP OFF)
message(STATUS "GMP not found")
endif() endif()
endif() endif()
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags. # CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
if(WITH_OPENMP) if(WITH_OPENMP)
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0") if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
# Use OpenMP from our precompiled libraries. # Use OpenMP from our precompiled libraries.
message(STATUS "Using ${LIBDIR}/openmp for OpenMP") message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
set(OPENMP_CUSTOM ON) set(OPENMP_CUSTOM ON)
set(OPENMP_FOUND ON) set(OPENMP_FOUND ON)
set(OpenMP_C_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'") set(OpenMP_C_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'") set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L'${LIBDIR}/openmp/lib' -lomp") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L'${LIBDIR}/openmp/lib' -lomp")
# Copy libomp.dylib to allow executables like datatoc and tests to work. # Copy libomp.dylib to allow executables like datatoc and tests to work.
# `@executable_path/../Resources/lib/` is a default dylib search path.
# For single config generator datatoc, tests etc.
execute_process( execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
) )
# For multi-config generator datatoc, etc.
execute_process( execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib
) )
# For multi-config generator tests.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib/libomp.dylib
)
endif() endif()
endif() endif()
@@ -428,59 +455,38 @@ if(WITH_GMP)
endif() endif()
endif() endif()
if(EXISTS ${LIBDIR})
without_system_libs_end()
endif()
# ---------------------------------------------------------------------
# Set compiler and linker flags.
set(EXETYPE MACOSX_BUNDLE) set(EXETYPE MACOSX_BUNDLE)
set(CMAKE_C_FLAGS_DEBUG "-g") set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "i386") if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "i386")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3") set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang") if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
string(APPEND CMAKE_C_FLAGS_RELEASE " -ftree-vectorize -fvariable-expansion-in-unroller") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -ftree-vectorize -fvariable-expansion-in-unroller") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
endif() endif()
else() else()
set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic") set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -fno-strict-aliasing")
endif() endif()
if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5) if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv # Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
string(APPEND CMAKE_CXX_FLAGS " -ftemplate-depth=1024") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif() endif()
# Avoid conflicts with Luxrender, and other plug-ins that may use the same # Avoid conflicts with Luxrender, and other plug-ins that may use the same
# libraries as Blender with a different version or build options. # libraries as Blender with a different version or build options.
string(APPEND PLATFORM_LINKFLAGS set(PLATFORM_LINKFLAGS
" -Wl,-unexported_symbols_list,'${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'" "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
) )
string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
string(APPEND PLATFORM_LINKFLAGS " -stdlib=libc++") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -stdlib=libc++")
# Suppress ranlib "has no symbols" warnings (workaround for T48250) # Suppress ranlib "has no symbols" warnings (workaround for T48250)
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
if(WITH_COMPILER_CCACHE)
if(NOT CMAKE_GENERATOR STREQUAL "Xcode")
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
# Makefiles and ninja
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
else()
message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
set(WITH_COMPILER_CCACHE OFF)
endif()
endif()
endif()

View File

@@ -150,36 +150,7 @@ endif()
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode") if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
# Force CMAKE_OSX_DEPLOYMENT_TARGET for makefiles, will not work else (CMake bug?) # Force CMAKE_OSX_DEPLOYMENT_TARGET for makefiles, will not work else (CMake bug?)
string(APPEND CMAKE_C_FLAGS " -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
string(APPEND CMAKE_CXX_FLAGS " -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
add_definitions("-DMACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") add_definitions("-DMACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif() endif()
if(WITH_COMPILER_CCACHE)
if(CMAKE_GENERATOR STREQUAL "Xcode")
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
get_filename_component(ccompiler "${CMAKE_C_COMPILER}" NAME)
get_filename_component(cxxcompiler "${CMAKE_CXX_COMPILER}" NAME)
# Ccache can figure out which compiler to use if it's invoked from
# a symlink with the name of the compiler.
# https://ccache.dev/manual/4.1.html#_run_modes
set(_fake_compiler_dir "${CMAKE_BINARY_DIR}/ccache")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${_fake_compiler_dir})
set(_fake_C_COMPILER "${_fake_compiler_dir}/${ccompiler}")
set(_fake_CXX_COMPILER "${_fake_compiler_dir}/${cxxcompiler}")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CCACHE_PROGRAM}" ${_fake_C_COMPILER})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CCACHE_PROGRAM}" ${_fake_CXX_COMPILER})
set(CMAKE_XCODE_ATTRIBUTE_CC ${_fake_C_COMPILER} CACHE STRING "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_CXX ${_fake_CXX_COMPILER} CACHE STRING "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_LD ${_fake_C_COMPILER} CACHE STRING "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS ${_fake_CXX_COMPILER} CACHE STRING "" FORCE)
unset(_fake_compiler_dir)
unset(_fake_C_COMPILER)
unset(_fake_CXX_COMPILER)
else()
message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
set(WITH_COMPILER_CCACHE OFF)
endif()
endif()
endif()

View File

@@ -52,19 +52,12 @@ if(EXISTS ${LIBDIR})
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}") message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
file(GLOB LIB_SUBDIRS ${LIBDIR}/*) file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
# Ignore Mesa software OpenGL libraries, they are not intended to be
# linked against but to optionally override at runtime.
list(REMOVE_ITEM LIB_SUBDIRS ${LIBDIR}/mesa)
# NOTE: Make sure "proper" compiled zlib comes first before the one # NOTE: Make sure "proper" compiled zlib comes first before the one
# which is a part of OpenCollada. They have different ABI, and we # which is a part of OpenCollada. They have different ABI, and we
# do need to use the official one. # do need to use the official one.
set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS}) set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS})
set(WITH_STATIC_LIBS ON) set(WITH_STATIC_LIBS ON)
# OpenMP usually can't be statically linked into shared libraries, set(WITH_OPENMP_STATIC ON)
# due to not being compiled with position independent code.
if(NOT WITH_PYTHON_MODULE)
set(WITH_OPENMP_STATIC ON)
endif()
set(Boost_NO_BOOST_CMAKE ON) set(Boost_NO_BOOST_CMAKE ON)
set(BOOST_ROOT ${LIBDIR}/boost) set(BOOST_ROOT ${LIBDIR}/boost)
set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib) set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib)
@@ -73,7 +66,7 @@ if(EXISTS ${LIBDIR})
endif() endif()
if(WITH_STATIC_LIBS) if(WITH_STATIC_LIBS)
string(APPEND CMAKE_EXE_LINKER_FLAGS " -static-libstdc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
endif() endif()
# Wrapper to prefer static libraries # Wrapper to prefer static libraries
@@ -264,7 +257,6 @@ endif()
if(WITH_OPENVDB) if(WITH_OPENVDB)
find_package_wrapper(OpenVDB) find_package_wrapper(OpenVDB)
find_package_wrapper(Blosc) find_package_wrapper(Blosc)
if(NOT OPENVDB_FOUND) if(NOT OPENVDB_FOUND)
set(WITH_OPENVDB OFF) set(WITH_OPENVDB OFF)
set(WITH_OPENVDB_BLOSC OFF) set(WITH_OPENVDB_BLOSC OFF)
@@ -275,15 +267,6 @@ if(WITH_OPENVDB)
endif() endif()
endif() endif()
if(WITH_NANOVDB)
find_package_wrapper(NanoVDB)
if(NOT NANOVDB_FOUND)
set(WITH_NANOVDB OFF)
message(STATUS "NanoVDB not found, disabling it")
endif()
endif()
if(WITH_ALEMBIC) if(WITH_ALEMBIC)
find_package_wrapper(Alembic) find_package_wrapper(Alembic)
@@ -350,12 +333,15 @@ if(WITH_BOOST)
endif() endif()
endif() endif()
if(WITH_PUGIXML)
find_package_wrapper(PugiXML)
endif()
if(WITH_OPENIMAGEIO) if(WITH_OPENIMAGEIO)
find_package_wrapper(OpenImageIO) find_package_wrapper(OpenImageIO)
if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE)
find_package_wrapper(PugiXML)
else()
set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}")
set(PUGIXML_LIBRARIES "")
endif()
set(OPENIMAGEIO_LIBRARIES set(OPENIMAGEIO_LIBRARIES
${OPENIMAGEIO_LIBRARIES} ${OPENIMAGEIO_LIBRARIES}
${PNG_LIBRARIES} ${PNG_LIBRARIES}
@@ -441,6 +427,15 @@ if(WITH_TBB)
find_package_wrapper(TBB) find_package_wrapper(TBB)
endif() 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) if(WITH_XR_OPENXR)
find_package(XR_OpenXR_SDK) find_package(XR_OpenXR_SDK)
if(NOT XR_OPENXR_SDK_FOUND) if(NOT XR_OPENXR_SDK_FOUND)
@@ -457,14 +452,6 @@ if(WITH_GMP)
endif() endif()
endif() endif()
if(WITH_POTRACE)
find_package_wrapper(Potrace)
if(NOT POTRACE_FOUND)
message(WARNING "potrace not found, disabling WITH_POTRACE")
set(WITH_POTRACE OFF)
endif()
endif()
if(EXISTS ${LIBDIR}) if(EXISTS ${LIBDIR})
without_system_libs_end() without_system_libs_end()
endif() endif()
@@ -617,7 +604,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}") 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_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_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}")
string(PREPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
unset(GCC_EXTRA_FLAGS_RELEASE) unset(GCC_EXTRA_FLAGS_RELEASE)
if(WITH_LINKER_GOLD) if(WITH_LINKER_GOLD)
@@ -625,8 +612,8 @@ if(CMAKE_COMPILER_IS_GNUCC)
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "GNU gold") if("${LD_VERSION}" MATCHES "GNU gold")
string(APPEND CMAKE_C_FLAGS " -fuse-ld=gold") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
string(APPEND CMAKE_CXX_FLAGS " -fuse-ld=gold") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
else() else()
message(STATUS "GNU gold linker isn't available, using the default system linker.") message(STATUS "GNU gold linker isn't available, using the default system linker.")
endif() endif()
@@ -638,8 +625,8 @@ if(CMAKE_COMPILER_IS_GNUCC)
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "LLD") if("${LD_VERSION}" MATCHES "LLD")
string(APPEND CMAKE_C_FLAGS " -fuse-ld=lld") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=lld")
string(APPEND CMAKE_CXX_FLAGS " -fuse-ld=lld") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld")
else() else()
message(STATUS "LLD linker isn't available, using the default system linker.") message(STATUS "LLD linker isn't available, using the default system linker.")
endif() endif()
@@ -664,12 +651,12 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
endif() endif()
mark_as_advanced(XILD) mark_as_advanced(XILD)
string(APPEND CMAKE_C_FLAGS " -fp-model precise -prec_div -parallel") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
string(APPEND CMAKE_CXX_FLAGS " -fp-model precise -prec_div -parallel") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
# string(APPEND PLATFORM_CFLAGS " -diag-enable sc3") # set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
string(APPEND PLATFORM_LINKFLAGS " -static-intel") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
endif() endif()
# Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may # Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may
@@ -682,17 +669,5 @@ set(PLATFORM_LINKFLAGS
# browsers can't properly detect blender as an executable then. Still enabled # browsers can't properly detect blender as an executable then. Still enabled
# for non-portable installs as typically used by Linux distributions. # for non-portable installs as typically used by Linux distributions.
if(WITH_INSTALL_PORTABLE) if(WITH_INSTALL_PORTABLE)
string(APPEND CMAKE_EXE_LINKER_FLAGS " -no-pie") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
endif()
if(WITH_COMPILER_CCACHE)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
# Makefiles and ninja
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
else()
message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
set(WITH_COMPILER_CCACHE OFF)
endif()
endif() endif()

View File

@@ -49,7 +49,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(NOT EXISTS "${CLANG_OPENMP_DLL}") if(NOT EXISTS "${CLANG_OPENMP_DLL}")
message(FATAL_ERROR "Clang OpenMP library (${CLANG_OPENMP_DLL}) not found.") message(FATAL_ERROR "Clang OpenMP library (${CLANG_OPENMP_DLL}) not found.")
endif() endif()
string(APPEND CMAKE_EXE_LINKER_FLAGS " \"${CLANG_OPENMP_LIB}\"") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \"${CLANG_OPENMP_LIB}\"")
endif() endif()
if(WITH_WINDOWS_STRIPPED_PDB) if(WITH_WINDOWS_STRIPPED_PDB)
message(WARNING "stripped pdb not supported with clang, disabling..") message(WARNING "stripped pdb not supported with clang, disabling..")
@@ -112,9 +112,9 @@ unset(_min_ver)
# needed for some MSVC installations # needed for some MSVC installations
# 4099 : PDB 'filename' was not found with 'object/library' # 4099 : PDB 'filename' was not found with 'object/library'
string(APPEND CMAKE_EXE_LINKER_FLAGS " /SAFESEH:NO /ignore:4099") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
string(APPEND CMAKE_SHARED_LINKER_FLAGS " /SAFESEH:NO /ignore:4099") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
string(APPEND CMAKE_MODULE_LINKER_FLAGS " /SAFESEH:NO /ignore:4099") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
list(APPEND PLATFORM_LINKLIBS list(APPEND PLATFORM_LINKLIBS
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version
@@ -149,23 +149,23 @@ include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
remove_cc_flag("/MDd" "/MD" "/Zi") remove_cc_flag("/MDd" "/MD" "/Zi")
if(WITH_WINDOWS_PDB) if(WITH_WINDOWS_PDB)
set(PDB_INFO_OVERRIDE_FLAGS "/Z7") set(PDB_INFO_OVERRIDE_FLAGS "/Z7")
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO") set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
endif() endif()
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
string(APPEND CMAKE_CXX_FLAGS " ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
else() else()
string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc /bigobj")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj")
endif() endif()
# C++ standards conformace (/permissive-) is available on msvc 15.5 (1912) and up # C++ standards conformace (/permissive-) is available on msvc 15.5 (1912) and up
if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG) if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG)
string(APPEND CMAKE_CXX_FLAGS " /permissive-") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-")
# Two-phase name lookup does not place nicely with OpenMP yet, so disable for now # Two-phase name lookup does not place nicely with OpenMP yet, so disable for now
string(APPEND CMAKE_CXX_FLAGS " /Zc:twoPhase-") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:twoPhase-")
endif() endif()
if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND) if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
@@ -183,33 +183,33 @@ else()
set(SYMBOL_FORMAT /ZI) set(SYMBOL_FORMAT /ZI)
endif() endif()
string(APPEND CMAKE_CXX_FLAGS_DEBUG " /MDd ${SYMBOL_FORMAT}") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
string(APPEND CMAKE_C_FLAGS_DEBUG " /MDd ${SYMBOL_FORMAT}") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
string(APPEND CMAKE_CXX_FLAGS_RELEASE " /MD ${PDB_INFO_OVERRIDE_FLAGS}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_C_FLAGS_RELEASE " /MD ${PDB_INFO_OVERRIDE_FLAGS}") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL " /MD ${PDB_INFO_OVERRIDE_FLAGS}") set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_C_FLAGS_MINSIZEREL " /MD ${PDB_INFO_OVERRIDE_FLAGS}") set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /MD ${SYMBOL_FORMAT}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " /MD ${SYMBOL_FORMAT}") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
unset(SYMBOL_FORMAT) unset(SYMBOL_FORMAT)
# JMC is available on msvc 15.8 (1915) and up # JMC is available on msvc 15.8 (1915) and up
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG) if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
string(APPEND CMAKE_CXX_FLAGS_DEBUG " /JMC") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /JMC")
endif() endif()
string(APPEND PLATFORM_LINKFLAGS " /SUBSYSTEM:CONSOLE /STACK:2097152") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152")
set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib") set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
string(APPEND PLATFORM_LINKFLAGS_DEBUG " /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib") set(PLATFORM_LINKFLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG} /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
# Ignore meaningless for us linker warnings. # Ignore meaningless for us linker warnings.
string(APPEND PLATFORM_LINKFLAGS " /ignore:4049 /ignore:4217 /ignore:4221") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
set(PLATFORM_LINKFLAGS_RELEASE "${PLATFORM_LINKFLAGS} ${PDB_INFO_OVERRIDE_LINKER_FLAGS}") set(PLATFORM_LINKFLAGS_RELEASE "${PLATFORM_LINKFLAGS} ${PDB_INFO_OVERRIDE_LINKER_FLAGS}")
string(APPEND CMAKE_STATIC_LINKER_FLAGS " /ignore:4221") set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
if(CMAKE_CL_64) if(CMAKE_CL_64)
string(PREPEND PLATFORM_LINKFLAGS "/MACHINE:X64 ") set(PLATFORM_LINKFLAGS "/MACHINE:X64 ${PLATFORM_LINKFLAGS}")
else() else()
string(PREPEND PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ") set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
endif() endif()
if(NOT DEFINED LIBDIR) if(NOT DEFINED LIBDIR)
@@ -239,24 +239,9 @@ if(NOT EXISTS "${LIBDIR}/")
message(FATAL_ERROR "\n\nWindows requires pre-compiled libs at: '${LIBDIR}'. Please run `make update` in the blender source folder to obtain them.") message(FATAL_ERROR "\n\nWindows requires pre-compiled libs at: '${LIBDIR}'. Please run `make update` in the blender source folder to obtain them.")
endif() endif()
if(CMAKE_GENERATOR MATCHES "^Visual Studio.+" AND # Only supported in the VS IDE
MSVC_VERSION GREATER_EQUAL 1924 AND # Supported for 16.4+
WITH_CLANG_TIDY # And Clang Tidy needs to be on
)
set(CMAKE_VS_GLOBALS
"RunCodeAnalysis=false"
"EnableMicrosoftCodeAnalysis=false"
"EnableClangTidyCodeAnalysis=true"
)
set(VS_CLANG_TIDY On)
endif()
# Mark libdir as system headers with a lower warn level, to resolve some warnings # Mark libdir as system headers with a lower warn level, to resolve some warnings
# that we have very little control over # that we have very little control over
if(MSVC_VERSION GREATER_EQUAL 1914 AND # Available with 15.7+ if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG AND NOT WITH_WINDOWS_SCCACHE)
NOT MSVC_CLANG AND # But not for clang
NOT WITH_WINDOWS_SCCACHE AND # And not when sccache is enabled
NOT VS_CLANG_TIDY) # Clang-tidy does not like these options
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0) add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
endif() endif()
@@ -268,11 +253,6 @@ foreach(child ${children})
endif() endif()
endforeach() endforeach()
if(WITH_PUGIXML)
set(PUGIXML_LIBRARIES optimized ${LIBDIR}/pugixml/lib/pugixml.lib debug ${LIBDIR}/pugixml/lib/pugixml_d.lib)
set(PUGIXML_INCLUDE_DIR ${LIBDIR}/pugixml/include)
endif()
set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include) set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib) set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include) set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
@@ -555,11 +535,6 @@ if(WITH_OPENVDB)
set(OPENVDB_DEFINITIONS -DNOMINMAX -D_USE_MATH_DEFINES) set(OPENVDB_DEFINITIONS -DNOMINMAX -D_USE_MATH_DEFINES)
endif() endif()
if(WITH_NANOVDB)
set(NANOVDB ${LIBDIR}/nanoVDB)
set(NANOVDB_INCLUDE_DIR ${NANOVDB}/include)
endif()
if(WITH_OPENIMAGEDENOISE) if(WITH_OPENIMAGEDENOISE)
set(OPENIMAGEDENOISE ${LIBDIR}/OpenImageDenoise) set(OPENIMAGEDENOISE ${LIBDIR}/OpenImageDenoise)
set(OPENIMAGEDENOISE_LIBPATH ${LIBDIR}/OpenImageDenoise/lib) set(OPENIMAGEDENOISE_LIBPATH ${LIBDIR}/OpenImageDenoise/lib)
@@ -590,7 +565,7 @@ if(WITH_IMAGE_OPENJPEG)
endif() endif()
if(WITH_OPENSUBDIV) if(WITH_OPENSUBDIV)
set(OPENSUBDIV_INCLUDE_DIRS ${LIBDIR}/opensubdiv/include) set(OPENSUBDIV_INCLUDE_DIR ${LIBDIR}/opensubdiv/include)
set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib) set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib)
set(OPENSUBDIV_LIBRARIES set(OPENSUBDIV_LIBRARIES
optimized ${OPENSUBDIV_LIBPATH}/osdCPU.lib optimized ${OPENSUBDIV_LIBPATH}/osdCPU.lib
@@ -671,10 +646,11 @@ if(WITH_CYCLES_OSL)
optimized ${OSL_LIB_COMP} optimized ${OSL_LIB_COMP}
optimized ${OSL_LIB_EXEC} optimized ${OSL_LIB_EXEC}
optimized ${OSL_LIB_QUERY} optimized ${OSL_LIB_QUERY}
optimized ${CYCLES_OSL}/lib/pugixml.lib
debug ${OSL_LIB_EXEC_DEBUG} debug ${OSL_LIB_EXEC_DEBUG}
debug ${OSL_LIB_COMP_DEBUG} debug ${OSL_LIB_COMP_DEBUG}
debug ${OSL_LIB_QUERY_DEBUG} debug ${OSL_LIB_QUERY_DEBUG}
${PUGIXML_LIBRARIES} debug ${CYCLES_OSL}/lib/pugixml_d.lib
) )
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include) find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin) find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
@@ -739,24 +715,14 @@ if(WINDOWS_PYTHON_DEBUG)
string(REPLACE "/" "\\" _group_path "${_source_path}") string(REPLACE "/" "\\" _group_path "${_source_path}")
source_group("${_group_path}" FILES "${_source}") source_group("${_group_path}" FILES "${_source}")
endforeach() endforeach()
# Include the user scripts from the profile folder in the blender_python_user_scripts project.
# If the user scripts env var is set, include scripts from there otherwise set(USER_SCRIPTS_ROOT "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}")
# include user scripts in the profile folder.
if(DEFINED ENV{BLENDER_USER_SCRIPTS})
message(STATUS "Including user scripts from environment BLENDER_USER_SCRIPTS=$ENV{BLENDER_USER_SCRIPTS}")
set(USER_SCRIPTS_ROOT "$ENV{BLENDER_USER_SCRIPTS}")
else()
message(STATUS "Including user scripts from the profile folder")
# Include the user scripts from the profile folder in the blender_python_user_scripts project.
set(USER_SCRIPTS_ROOT "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}/scripts")
endif()
file(TO_CMAKE_PATH ${USER_SCRIPTS_ROOT} USER_SCRIPTS_ROOT) file(TO_CMAKE_PATH ${USER_SCRIPTS_ROOT} USER_SCRIPTS_ROOT)
FILE(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/*.*" ) FILE(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/scripts/*.*" )
ADD_CUSTOM_TARGET(blender_python_user_scripts SOURCES ${inFiles}) ADD_CUSTOM_TARGET(blender_python_user_scripts SOURCES ${inFiles})
foreach(_source IN ITEMS ${inFiles}) foreach(_source IN ITEMS ${inFiles})
get_filename_component(_source_path "${_source}" PATH) get_filename_component(_source_path "${_source}" PATH)
string(REPLACE "${USER_SCRIPTS_ROOT}" "" _source_path "${_source_path}") string(REPLACE "${USER_SCRIPTS_ROOT}/scripts" "" _source_path "${_source_path}")
string(REPLACE "/" "\\" _group_path "${_source_path}") string(REPLACE "/" "\\" _group_path "${_source_path}")
source_group("${_group_path}" FILES "${_source}") source_group("${_group_path}" FILES "${_source}")
endforeach() endforeach()
@@ -794,9 +760,3 @@ if(WITH_GMP)
set(GMP_ROOT_DIR ${LIBDIR}/gmp) set(GMP_ROOT_DIR ${LIBDIR}/gmp)
set(GMP_FOUND On) set(GMP_FOUND On)
endif() endif()
if(WITH_POTRACE)
set(POTRACE_INCLUDE_DIRS ${LIBDIR}/potrace/include)
set(POTRACE_LIBRARIES ${LIBDIR}/potrace/lib/potrace.lib)
set(POTRACE_FOUND On)
endif()

View File

@@ -5,14 +5,6 @@ if(WITH_WINDOWS_BUNDLE_CRT)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP}) set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
# This sometimes can change when updates are installed and the compiler version
# changes, so test if it exists and if not, give InstallRequiredSystemLibraries
# another chance to figure out the path.
if(MSVC_REDIST_DIR AND NOT EXISTS "${MSVC_REDIST_DIR}")
unset(MSVC_REDIST_DIR CACHE)
endif()
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)
# Install the CRT to the blender.crt Sub folder. # Install the CRT to the blender.crt Sub folder.
@@ -31,7 +23,7 @@ if(WITH_WINDOWS_BUNDLE_CRT)
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}) foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
get_filename_component(filename ${lib} NAME) get_filename_component(filename ${lib} NAME)
file(SHA1 "${lib}" sha1_file) file(SHA1 "${lib}" sha1_file)
string(APPEND CRTLIBS " <file name=\"${filename}\" hash=\"${sha1_file}\" hashalg=\"SHA1\" />\n") set(CRTLIBS "${CRTLIBS} <file name=\"${filename}\" hash=\"${sha1_file}\" hashalg=\"SHA1\" />\n")
endforeach() endforeach()
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.crt.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.crt.manifest @ONLY) configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.crt.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.crt.manifest @ONLY)
file(TOUCH ${manifest_trigger_file}) file(TOUCH ${manifest_trigger_file})

View File

@@ -25,8 +25,8 @@ __all__ = (
import sys import sys
if sys.version_info.major < 3: if not sys.version.startswith("3"):
print("\nPython3.x or newer needed, found %s.\nAborting!\n" % print("\nPython3.x needed, found %s.\nAborting!\n" %
sys.version.partition(" ")[0]) sys.version.partition(" ")[0])
sys.exit(1) sys.exit(1)
@@ -242,6 +242,5 @@ def main():
for s in build_info(): for s in build_info():
print(s) print(s)
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View File

@@ -12,7 +12,6 @@ from make_utils import call
# Parse arguments # Parse arguments
def parse_arguments(): def parse_arguments():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("--ctest-command", default="ctest") parser.add_argument("--ctest-command", default="ctest")
@@ -23,7 +22,6 @@ def parse_arguments():
parser.add_argument("build_directory") parser.add_argument("build_directory")
return parser.parse_args() return parser.parse_args()
args = parse_arguments() args = parse_arguments()
git_command = args.git_command git_command = args.git_command
svn_command = args.svn_command svn_command = args.svn_command

View File

@@ -14,15 +14,12 @@ import sys
import make_utils import make_utils
from make_utils import call, check_output from make_utils import call, check_output
def print_stage(text): def print_stage(text):
print("") print("")
print(text) print(text)
print("") print("")
# Parse arguments # Parse arguments
def parse_arguments(): def parse_arguments():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("--no-libraries", action="store_true") parser.add_argument("--no-libraries", action="store_true")
@@ -34,13 +31,10 @@ def parse_arguments():
parser.add_argument("--use-centos-libraries", action="store_true") parser.add_argument("--use-centos-libraries", action="store_true")
return parser.parse_args() return parser.parse_args()
def get_blender_git_root(): def get_blender_git_root():
return check_output([args.git_command, "rev-parse", "--show-toplevel"]) return check_output([args.git_command, "rev-parse", "--show-toplevel"])
# Setup for precompiled libraries and tests from svn. # Setup for precompiled libraries and tests from svn.
def svn_update(args, release_version): def svn_update(args, release_version):
svn_non_interactive = [args.svn_command, '--non-interactive'] svn_non_interactive = [args.svn_command, '--non-interactive']
@@ -92,32 +86,30 @@ def svn_update(args, release_version):
print_stage("Updating Precompiled Libraries and Tests") print_stage("Updating Precompiled Libraries and Tests")
if os.path.isdir(lib_dirpath): if os.path.isdir(lib_dirpath):
for dirname in os.listdir(lib_dirpath): for dirname in os.listdir(lib_dirpath):
dirpath = os.path.join(lib_dirpath, dirname) dirpath = os.path.join(lib_dirpath, dirname)
if dirname == ".svn": if dirname == ".svn":
# Cleanup must be run from svn root directory if it exists. # Cleanup must be run from svn root directory if it exists.
if not make_utils.command_missing(args.svn_command): if not make_utils.command_missing(args.svn_command):
call(svn_non_interactive + ["cleanup", lib_dirpath]) call(svn_non_interactive + ["cleanup", lib_dirpath])
continue continue
svn_dirpath = os.path.join(dirpath, ".svn") svn_dirpath = os.path.join(dirpath, ".svn")
svn_root_dirpath = os.path.join(lib_dirpath, ".svn") svn_root_dirpath = os.path.join(lib_dirpath, ".svn")
if ( if os.path.isdir(dirpath) and \
os.path.isdir(dirpath) and (os.path.exists(svn_dirpath) or os.path.exists(svn_root_dirpath)):
(os.path.exists(svn_dirpath) or os.path.exists(svn_root_dirpath)) if make_utils.command_missing(args.svn_command):
): sys.stderr.write("svn not found, can't update libraries\n")
if make_utils.command_missing(args.svn_command): sys.exit(1)
sys.stderr.write("svn not found, can't update libraries\n")
sys.exit(1)
# Cleanup to continue with interrupted downloads. # Cleanup to continue with interrupted downloads.
if os.path.exists(svn_dirpath): if os.path.exists(svn_dirpath):
call(svn_non_interactive + ["cleanup", dirpath]) call(svn_non_interactive + ["cleanup", dirpath])
# Switch to appropriate branch and update. # Switch to appropriate branch and update.
call(svn_non_interactive + ["switch", svn_url + dirname, dirpath], exit_on_error=False) call(svn_non_interactive + ["switch", svn_url + dirname, dirpath], exit_on_error=False)
call(svn_non_interactive + ["update", dirpath]) call(svn_non_interactive + ["update", dirpath])
# Test if git repo can be updated. # Test if git repo can be updated.
def git_update_skip(args, check_remote_exists=True): def git_update_skip(args, check_remote_exists=True):
@@ -129,11 +121,9 @@ def git_update_skip(args, check_remote_exists=True):
rebase_merge = check_output([args.git_command, 'rev-parse', '--git-path', 'rebase-merge'], exit_on_error=False) rebase_merge = check_output([args.git_command, 'rev-parse', '--git-path', 'rebase-merge'], exit_on_error=False)
rebase_apply = check_output([args.git_command, 'rev-parse', '--git-path', 'rebase-apply'], exit_on_error=False) rebase_apply = check_output([args.git_command, 'rev-parse', '--git-path', 'rebase-apply'], exit_on_error=False)
merge_head = check_output([args.git_command, 'rev-parse', '--git-path', 'MERGE_HEAD'], exit_on_error=False) merge_head = check_output([args.git_command, 'rev-parse', '--git-path', 'MERGE_HEAD'], exit_on_error=False)
if ( if os.path.exists(rebase_merge) or \
os.path.exists(rebase_merge) or os.path.exists(rebase_apply) or \
os.path.exists(rebase_apply) or os.path.exists(merge_head):
os.path.exists(merge_head)
):
return "rebase or merge in progress, complete it first" return "rebase or merge in progress, complete it first"
# Abort if uncommitted changes. # Abort if uncommitted changes.
@@ -143,14 +133,13 @@ def git_update_skip(args, check_remote_exists=True):
# Test if there is an upstream branch configured # Test if there is an upstream branch configured
if check_remote_exists: if check_remote_exists:
branch = check_output([args.git_command, "rev-parse", "--abbrev-ref", "HEAD"]) branch = check_output([args.git_command, "rev-parse", "--abbrev-ref", "HEAD"])
remote = check_output([args.git_command, "config", "branch." + branch + ".remote"], exit_on_error=False) remote = check_output([args.git_command, "config", "branch." + branch + ".remote"], exit_on_error=False)
if len(remote) == 0: if len(remote) == 0:
return "no remote branch to pull from" return "no remote branch to pull from"
return "" return ""
# Update blender repository. # Update blender repository.
def blender_update(args): def blender_update(args):
print_stage("Updating Blender Git Repository") print_stage("Updating Blender Git Repository")
@@ -189,7 +178,7 @@ def submodules_update(args, release_version, branch):
os.chdir(submodule_path) os.chdir(submodule_path)
msg = git_update_skip(args, check_remote_exists=False) msg = git_update_skip(args, check_remote_exists=False)
if msg: if msg:
skip_msg += submodule_path + " skipped: " + msg + "\n" skip_msg += submodule_path + " skipped: " + msg + "\n"
else: else:
if make_utils.git_branch(args.git_command) != submodule_branch: if make_utils.git_branch(args.git_command) != submodule_branch:
call([args.git_command, "fetch", "origin"]) call([args.git_command, "fetch", "origin"])

View File

@@ -7,7 +7,6 @@ import shutil
import subprocess import subprocess
import sys import sys
def call(cmd, exit_on_error=True): def call(cmd, exit_on_error=True):
print(" ".join(cmd)) print(" ".join(cmd))
@@ -20,7 +19,6 @@ def call(cmd, exit_on_error=True):
sys.exit(retcode) sys.exit(retcode)
return retcode return retcode
def check_output(cmd, exit_on_error=True): def check_output(cmd, exit_on_error=True):
# Flush to ensure correct order output on Windows. # Flush to ensure correct order output on Windows.
sys.stdout.flush() sys.stdout.flush()
@@ -37,7 +35,6 @@ def check_output(cmd, exit_on_error=True):
return output.strip() return output.strip()
def git_branch(git_command): def git_branch(git_command):
# Get current branch name. # Get current branch name.
try: try:
@@ -48,7 +45,6 @@ def git_branch(git_command):
return branch.strip().decode('utf8') return branch.strip().decode('utf8')
def git_tag(git_command): def git_tag(git_command):
# Get current tag name. # Get current tag name.
try: try:
@@ -58,18 +54,16 @@ def git_tag(git_command):
return tag.strip().decode('utf8') return tag.strip().decode('utf8')
def git_branch_release_version(branch, tag): def git_branch_release_version(branch, tag):
release_version = re.search("^blender-v(.*)-release$", branch) release_version = re.search("^blender-v(.*)-release$", branch)
if release_version: if release_version:
release_version = release_version.group(1) release_version = release_version.group(1)
elif tag: elif tag:
release_version = re.search(r"^v([0-9]*\.[0-9]*).*", tag) release_version = re.search("^v([0-9]*\.[0-9]*).*", tag)
if release_version: if release_version:
release_version = release_version.group(1) release_version = release_version.group(1)
return release_version return release_version
def svn_libraries_base_url(release_version): def svn_libraries_base_url(release_version):
if release_version: if release_version:
svn_branch = "tags/blender-" + release_version + "-release" svn_branch = "tags/blender-" + release_version + "-release"
@@ -77,7 +71,6 @@ def svn_libraries_base_url(release_version):
svn_branch = "trunk" svn_branch = "trunk"
return "https://svn.blender.org/svnroot/bf-blender/" + svn_branch + "/lib/" return "https://svn.blender.org/svnroot/bf-blender/" + svn_branch + "/lib/"
def command_missing(command): def command_missing(command):
# Support running with Python 2 for macOS # Support running with Python 2 for macOS
if sys.version_info >= (3, 0): if sys.version_info >= (3, 0):

View File

@@ -92,5 +92,5 @@ echo if "%%VSCMD_VER%%" == "" ^( >> %BUILD_DIR%\rebuild.cmd
echo call "%VCVARS%" %BUILD_ARCH% >> %BUILD_DIR%\rebuild.cmd echo call "%VCVARS%" %BUILD_ARCH% >> %BUILD_DIR%\rebuild.cmd
echo ^) >> %BUILD_DIR%\rebuild.cmd echo ^) >> %BUILD_DIR%\rebuild.cmd
echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
echo ninja install %%* >> %BUILD_DIR%\rebuild.cmd echo ninja install >> %BUILD_DIR%\rebuild.cmd
echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = "V2.92" PROJECT_NUMBER = "V2.91"
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
@@ -453,7 +453,7 @@ TYPEDEF_HIDES_STRUCT = NO
# the optimal cache size from a speed point of view. # the optimal cache size from a speed point of view.
# Minimum value: 0, maximum value: 9, default value: 0. # Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 3 LOOKUP_CACHE_SIZE = 0
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Build related configuration options # Build related configuration options
@@ -1321,7 +1321,7 @@ DOCSET_PUBLISHER_NAME = Publisher
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_HTMLHELP = NO GENERATE_HTMLHELP = YES
# The CHM_FILE tag can be used to specify the file name of the resulting .chm # The CHM_FILE tag can be used to specify the file name of the resulting .chm
# file. You can add a path in front of the file if the result should not be # file. You can add a path in front of the file if the result should not be

View File

@@ -121,10 +121,6 @@
* \ingroup editors * \ingroup editors
*/ */
/** \defgroup edasset asset
* \ingroup editors
*/
/** \defgroup edcurve curve /** \defgroup edcurve curve
* \ingroup editors * \ingroup editors
*/ */

View File

@@ -1,6 +1,6 @@
""" """
Introduction Intro
------------ -----
.. warning:: .. warning::
@@ -9,8 +9,9 @@ Introduction
and the :func:`register`/:func:`unregister` functions! The :func:`pgettext` family of functions and the :func:`register`/:func:`unregister` functions! The :func:`pgettext` family of functions
should only be used in rare, specific cases (like e.g. complex "composited" UI strings...). should only be used in rare, specific cases (like e.g. complex "composited" UI strings...).
To add translations to your python script, you must define a dictionary formatted like that: | To add translations to your python script, you must define a dictionary formatted like that:
``{locale: {msg_key: msg_translation, ...}, ...}`` where: | ``{locale: {msg_key: msg_translation, ...}, ...}``
| where:
- locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``), - locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``),
a lang+variant code (e.g. ``sr@latin``), or a full code (e.g. ``uz_UZ@cyrilic``). a lang+variant code (e.g. ``sr@latin``), or a full code (e.g. ``uz_UZ@cyrilic``).

View File

@@ -9,24 +9,15 @@ When calling an operator you may want to pass the execution context.
This determines the context that is given for the operator to run in, and whether This determines the context that is given for the operator to run in, and whether
invoke() is called or only execute(). invoke() is called or only execute().
``EXEC_DEFAULT`` is used by default, running only the ``execute()`` method, but you may 'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
want the operator to take user interaction with ``INVOKE_DEFAULT`` which will also want the operator to take user interaction with 'INVOKE_DEFAULT' which will also
call invoke() if existing. call invoke() if existing.
The execution context is one of: The execution context is one of:
('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS',
- ``INVOKE_DEFAULT`` 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT',
- ``INVOKE_REGION_WIN`` 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA',
- ``INVOKE_REGION_CHANNELS`` 'EXEC_SCREEN')
- ``INVOKE_REGION_PREVIEW``
- ``INVOKE_AREA``
- ``INVOKE_SCREEN``
- ``EXEC_DEFAULT``
- ``EXEC_REGION_WIN``
- ``EXEC_REGION_CHANNELS``
- ``EXEC_REGION_PREVIEW``
- ``EXEC_AREA``
- ``EXEC_SCREEN``
""" """
# collection add popup # collection add popup

View File

@@ -1,30 +0,0 @@
"""
.. note::
Properties defined at run-time store the values of the properties as custom-properties.
This method checks if the underlying data exists, causing the property to be considered *set*.
A common pattern for operators is to calculate a value for the properties
that have not had their values explicitly set by the caller
(where the caller could be a key-binding, menu-items or Python script for example).
In the case of executing operators multiple times, values are re-used from the previous execution.
For example: subdividing a mesh with a smooth value of 1.0 will keep using
that value on subsequent calls to subdivision, unless the operator is called with
that property set to a different value.
This behavior can be disabled using the ``SKIP_SAVE`` option when the property is declared (see: :mod:`bpy.props`).
The ``ghost`` argument allows detecting how a value from a previous execution is handled.
- When true: The property is considered unset even if the value from a previous call is used.
- When false: The existence of any values causes ``is_property_set`` to return true.
While this argument should typically be omitted, there are times when
it's important to know if a value is anything besides the default.
For example, the previous value may have been scaled by the scene's unit scale.
In this case scaling the value multiple times would cause problems, so the ``ghost`` argument should be false.
"""

View File

@@ -33,12 +33,11 @@ fragment_shader = '''
uniform float u_Scale; uniform float u_Scale;
in float v_ArcLength; in float v_ArcLength;
out vec4 FragColor;
void main() void main()
{ {
if (step(sin(v_ArcLength * u_Scale), 0.5) == 1) discard; if (step(sin(v_ArcLength * u_Scale), 0.5) == 1) discard;
FragColor = vec4(1.0); gl_FragColor = vec4(1.0);
} }
''' '''

View File

@@ -23,11 +23,10 @@ fragment_shader = '''
uniform float brightness; uniform float brightness;
in vec3 pos; in vec3 pos;
out vec4 FragColor;
void main() void main()
{ {
FragColor = vec4(pos * brightness, 1.0); gl_FragColor = vec4(pos * brightness, 1.0);
} }
''' '''

Some files were not shown because too many files have changed in this diff Show More