100641 Commits

Author SHA1 Message Date
Aaron Carlisle
72335d5e89 Pydoc: Move builtin GPU shader information to code
This fixes a compile warning for sphinx.
This commit includes some reformating of the information.
2020-10-11 18:21:28 -04:00
Aaron Carlisle
1b575cbb75 Cleanup: Pydoc strings 2020-10-11 18:19:42 -04:00
Aaron Carlisle
e8a2931299 Pydoc: Cleanup: Rename function
The new name makes more sense as the file is called index and we are not 
writing the contents of all rst files
2020-10-11 17:02:41 -04:00
Aaron Carlisle
a38c2dcfe6 Pydoc: Add index and genindex to main index 2020-10-11 16:54:52 -04:00
Aaron Carlisle
c95ab2c6f0 Pydoc: Remove old note about new module in 2.65 2020-10-11 16:46:21 -04:00
Aaron Carlisle
fbcb26fb33 Pydoc: Add submodule heading to submodule lists 2020-10-11 16:09:42 -04:00
Aaron Carlisle
c9a9b03204 Pydoc: Fix duplicate totree for freestyle 2020-10-11 15:50:24 -04:00
Aaron Carlisle
a0886d1b6e Cleanup: make format 2020-10-11 13:00:49 -04:00
Howard Trickey
1b04eb6c44 Exact Boolean: let Collection be empty.
With an empty collection, Exact Boolean performs the useful function
of removing self-intersections.
2020-10-10 12:05:09 -04:00
Ankit Meel
c68338ee89 CMake/macOS/OpenMP: copy the library near tests.
For multi-config generators, tests are in `bin/tests/<config>` folder.
and OpenMP cannot be found at `@executable_path/../Resources/lib`.
So create that folder and put the library there to be used by tests.

It is not ideal to copy the library around. When minimum CMake version
is changed to 3.12, FindOpenMP by CMake can be used for this whole
block of code. Then a nice rpath based solution can be used.
2020-10-10 19:31:03 +05:30
Campbell Barton
4427a67c86 Cleanup: use macro for comparing file versions
Already done in most of the versioning code.
2020-10-10 22:43:11 +11:00
Campbell Barton
5336555c31 Cleanup: spelling 2020-10-10 22:04:51 +11:00
Campbell Barton
d9a43a107f Cleanup: remove unused Modifier stackindex struct member 2020-10-10 22:04:51 +11:00
Campbell Barton
3fe98a473c Cleanup: remove unnecessary comments 2020-10-10 22:04:51 +11:00
Campbell Barton
2abfcebb0e Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
2020-10-10 22:04:51 +11:00
Ankit Meel
c735aca42e CMake/macOS/OpenMP: allow use of LLVM-Clang with OpenMP.
The "Apple" part is guaranteed by the platform file.
"Clang" is enough to differentiate it from other compilers.

Came across this due to the custom built LLVM toolchain I'm using.
2020-10-10 16:28:42 +05:30
Hans Goudey
7ab8d7c939 Cleanup: Declare variables where initialized 2020-10-09 16:39:39 -05:00
Hans Goudey
c1394c89a7 UI: Fix incorrect inactive status for curve properties
The "Geometry start & End" panel was grayed when using an object
to create the curve bevel. It should only be grayed out in this case
when no object is chosen in the "Bevel" subpanel.
2020-10-09 16:26:28 -05:00
Hans Goudey
89491d67d9 Fix T81545: Moving nested collections changes view layer flags
The code that restored collection flags after they are rebuilt when
moving a collection didn't take into account collection children. The
flag for the active collection was properly restored, but all of its
children would take on the exclude flag of the collection the active
collection was dragged into.

This commit builds a temporary tree structure to store the flags for
the moving collection and its children. Then it reapplies these flags
after `BKE_main_collection_sync`.

Differential Revision: https://developer.blender.org/D9158
2020-10-09 16:00:12 -05:00
Hans Goudey
4173877e87 Cleanup: Declare variables where initialized
Also use LISTBASE_FOREACH macro in a few places.
2020-10-09 15:08:01 -05:00
Hans Goudey
e6d1c8272e Cleanup: Use LISTBASE_FOREACH macro 2020-10-09 13:51:13 -05:00
Ankit Meel
32d4623f44 Cleanup: alias: use const, remove unused variable.
`targetIsDirectory` slipped through the code review of
{D6679}/{rBafb1a64ccb81}.
`BLI_is_dir` exists to check for directory status of a file.

Remove some `else-after-return`s.

Use `r_` prefix for return value arguments, and move it to the end
in the list of arguments.
2020-10-09 22:46:39 +05:30
Bastien Montagne
62f5232f37 Fix T81573: Users refcount not incremented when creating a proxy.
Proxies are refcounting usages of objects, historical code was
apparently missing that.
2020-10-09 17:52:49 +02:00
Ankit Meel
50ffcf12b2 Cleanup: CMake/macOS: remove boost from OIIO libs.
Introduced by me in {rB1f6b7387ad0177c1dec9bb83b7}.
2020-10-09 20:39:58 +05:30
Bastien Montagne
e340f943f5 Fix (unreported) install_deps: broken compilation of OIDN.
When OIDN version was bumped recently the required dependency to build
it (ISPC) was not updated accordingly.
2020-10-09 17:07:16 +02:00
Andreas Bergmeier
9aef0283a0 install_deps: Do not request elevated rights when creating directory in owned directory.
This only creates elevated directory when necessary.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D1596
2020-10-09 17:05:03 +02:00
Clément Foucault
2d94b0d6b0 GPU: Add more safeguard for BGL calls
This makes sure no BGL call before window drawing locks the GPUState.
2020-10-09 17:00:10 +02:00
Howard Trickey
16ca295278 Fix New Boolean bug that left some stray vertices.
The routine to find dissolvable vertices had a check to ensure
that the vertex was exactly in line with the two neighbors.
I have convinced myself that this check is unneccesary (it was
failing with only a 1e-9 difference from 0 on a cross check),
so have removed it.
2020-10-09 10:43:07 -04:00
Clément Foucault
14c53c5018 BGL: fix issues with addons using BGL at startup
This was an issue for Cycles.

This also makes the `GPU_bgl*` functions less fragile by checking for
null pointers.
2020-10-09 16:33:59 +02:00
Clément Foucault
d39043b5ae Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor""
This reverts commit f23bf4cb109cb8f39f873c4f80acbec3f33b098c.
2020-10-09 16:33:59 +02:00
Ankit Meel
1f6b7387ad CMake/macOS: Remove _LIBPATH, avoid link_directories.
After tests were bundled in a single executable and cycles and libmv
created their own tests, the warnings on macOS have gone over 800.
The reason is setting `*_LIBRARIES` to names of the libraries
and later using `link_directories` to link them properly.

https://cmake.org/cmake/help/latest/command/link_directories.html

> Note This command is rarely necessary and should be avoided where
> there are other choices. Prefer to pass full absolute paths to
> libraries where possible, since this ensures the correct library
> will always be linked. The find_library() command provides the
> full path, which can generally be used directly in calls to
> target_link_libraries().

Warnings like the following popup for every target/executable,
for every library it links to.
```
ld: warning: directory not found for option
'-L/Users/me/blender-build/blender/../lib/darwin/jpeg/lib/Debug'
```

The patch completes a step towards removing `link_directories` as
mentioned in TODO at several places.
The patch uses absolute paths to link libraries and removes
all `*_LIBPATH`s except `PYTHON_LIBPATH` from
`platform_apple.cmake` file. (The corner case where it's used seems
like dead code. Python is no longer shipped with that file structure.)

Also, unused code for LLVM-3.4 has been removed.
Also, guards to avoid searching libraries in system directories have
been added.

`APPLE` platform now no longer needs `setup_libdirs`,
`cycles_link_directories`, and `link_directories`.
The number of warnings now is less than 100, most of them being
deprecation ones in dependencies.

This patch depended on {rBb746179d0add}, {rB2fdbe4d05011},
{rB402a4cadba49} and {rBd7f482f88ecb}.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8855
2020-10-09 19:41:58 +05:30
Ankit Meel
83e91485d0 GPU: Fix NOT ~ operator for eGPUSamplerState
The real maximum was `GPU_SAMPLER_ICON`, not `GPU_SAMPLER_REPEAT`, my
bad. {rBa31a87f8943aa40}

Move `GPU_SAMPLER_MAX` out of the enum since it's used as an `int`
at many places.
Also, the macro `ENUM_OPERATORS` needs a maximum, and this enumerator
cannot be used as the argument of that macro. It creates wrong values
in the `~` NOT operator.

Thanks @deadpin for catching this.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D9157
2020-10-09 17:35:23 +05:30
Jacques Lucke
701fc52cc6 Volumes: lower minimal voxel size in Mesh to Volume modifier
The 0.1 limit was too large. The issue with making it smaller is that
one can easily crash blender by making it to small. To counteract this,
the step has been reduced as well.

A voxel size/amount of 0 disables the modifier.
2020-10-09 12:55:13 +02:00
Jacques Lucke
2f339eb745 BKE: improve calculating edges
This is a follow up commit for rB309c919ee9.
Clearing hash tables is now parallelized as well. Surprisingly, most of
the time is actually spent in `free` (a couple of milliseconds per call
in my test).

Benchmark of individual functions:
reserve_hash_maps: 17%
add_polygon_edges_to_hash_maps: 49%
serialize_and_initialize_deduplicated_edges: 12%
update_edge_indices_in_poly_loops: 14%
clear_hash_tables: 5%
2020-10-09 12:37:42 +02:00
Jacques Lucke
309c919ee9 BKE: parallelize BKE_mesh_calc_edges
`BKE_mesh_calc_edges` was the main performance bottleneck in D9141.
While openvdb only needed ~115ms, calculating the edges afterwards
took ~960ms. Now with some parallelization this is reduced to ~210ms.

Parallelizing `BKE_mesh_calc_edges` is not entirely trivial, because it
has to perform deduplication and some other things that have to happen
in a certain order. Even though the multithreading improves performance
with more threads, there are diminishing returns when too many threads
are used in this function.

The speedup is mainly achieved by having multiple hash tables that are
filled in parallel. The distribution of the edges to hash tables is based on
a hash (that is different from the hash used in the actual hash tables).

I moved the function to C++, because that made it easier for me to
optimize it. Furthermore, I added `BLI_task.hh` which contains some
light tbb wrappers for parallelization.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D9151
2020-10-09 11:56:12 +02:00
Bastien Montagne
963b45f574 Fix T81468: Missing NULL check for F-curve rna_path in versionning code. 2020-10-09 09:47:40 +02:00
Yevgeny Makarov
07bd16de5b UI: Fix node label overflow on high-DPI
Ref D9099
2020-10-09 18:20:50 +11:00
Andreas Bergmeier
2a39b6d4d1 Cleanup: spelling
Ref D9138
2020-10-09 18:08:38 +11:00
Jeroen Bakker
774905f7e8 CleanUp: Introduce eMeshBatchDirtyMode enum
It used to be an int mode.
2020-10-09 07:27:18 +02:00
Jeroen Bakker
048c5580c2 Revert "CleanUp: Introduce eMeshBatchDirtyMode enum"
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
2020-10-09 07:25:43 +02:00
Yevgeny Makarov
b96f1f8091 UI: use Ctrl-TrackPad to cycle values
Minor change missing from 9bfea67751dc59554c8928802b4e1f04278ab537

Ref D8530
2020-10-09 14:04:34 +11:00
Aaron Carlisle
f735491b9f PyDoc: Set max width to 1000px
While not full width this gives a nice trade off between improved screen 
use space and readibility.
The old value was 80 so this gives 25% more screen space.

See T73223
2020-10-08 21:37:28 -04:00
Campbell Barton
decb3b10aa Cleanup: operator execution types didn't read well on one line 2020-10-09 12:14:22 +11:00
Campbell Barton
afc090f339 Cleanup: spelling 2020-10-09 12:12:29 +11:00
Campbell Barton
05710171cb PyDoc: resolve duplicate module warnings
Remove submodule listings from the module docstring,
as this information already exists in the generator.
2020-10-09 12:11:00 +11:00
Campbell Barton
c69df6728a Cleanup: use real-module for 'bmesh.ops'
Replace module-like object with Python module,
this simplifies checks for generating API docs and is more correct.
2020-10-09 12:11:00 +11:00
Kévin Dietrich
2d5e38d4ec Cycles: fix incorrect default value for node array socket type 2020-10-09 00:15:24 +02:00
Kévin Dietrich
70634ba438 Cycles: fix incorrect asserts in node socket set functions 2020-10-09 00:15:24 +02:00
Bastien Montagne
3fae33b22c Fix broken compilation after adding particles DNA defaults.
Was failing because of a mismatch between RNA and DNA defaults on
`courant_target` property, removed RNA one (DNA came from initial value
defined in BKE's particle creation code, think it's best to keep that
one).
2020-10-08 23:10:36 +02:00
Yevgeny Makarov
3d4231babf UI: Fix opacity of the popover arrow outline
Due to the old AA method, it was necessary to add transparency to the
outline of the popover arrow to match the box outline opacity. This is
no longer required after rB15dda0115c78.

See the differential for before and after screenshots.

Differential Revision: https://developer.blender.org/D9026
2020-10-08 14:25:22 -05:00