Blender Git Loki

Blenderin Git "master"-kehityshaaran kommitit.

Page: 543 / 5574

Revision c735aca by Ankit Meel
October 10, 2020, 10:58 (GMT)
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.
Revision 7ab8d7c by Hans Goudey
October 9, 2020, 21:39 (GMT)
Cleanup: Declare variables where initialized
Revision c1394c8 by Hans Goudey
October 9, 2020, 21:26 (GMT)
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.
Revision 89491d6 by Hans Goudey
October 9, 2020, 21:00 (GMT)
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
Revision 4173877 by Hans Goudey
October 9, 2020, 20:08 (GMT)
Cleanup: Declare variables where initialized

Also use LISTBASE_FOREACH macro in a few places.
Revision e6d1c82 by Hans Goudey
October 9, 2020, 18:51 (GMT)
Cleanup: Use LISTBASE_FOREACH macro
Revision 32d4623 by Ankit Meel
October 9, 2020, 17:16 (GMT)
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.
October 9, 2020, 15:52 (GMT)
Fix T81573: Users refcount not incremented when creating a proxy.

Proxies are refcounting usages of objects, historical code was
apparently missing that.
Revision 50ffcf1 by Ankit Meel
October 9, 2020, 15:09 (GMT)
Cleanup: CMake/macOS: remove boost from OIIO libs.

Introduced by me in {rB1f6b7387ad0177c1dec9bb83b7}.
October 9, 2020, 15:07 (GMT)
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.
October 9, 2020, 15:05 (GMT)
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
October 9, 2020, 15:00 (GMT)
GPU: Add more safeguard for BGL calls

This makes sure no BGL call before window drawing locks the GPUState.
October 9, 2020, 14:43 (GMT)
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.
October 9, 2020, 14:33 (GMT)
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.
October 9, 2020, 14:33 (GMT)
Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor""

This reverts commit f23bf4cb109cb8f39f873c4f80acbec3f33b098c.
Revision 1f6b738 by Ankit Meel
October 9, 2020, 14:11 (GMT)
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
Revision 83e9148 by Ankit Meel
October 9, 2020, 12:05 (GMT)
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
October 9, 2020, 10:55 (GMT)
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.
October 9, 2020, 10:37 (GMT)
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%
October 9, 2020, 09:56 (GMT)
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
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021