Age | Commit message (Collapse) | Author |
|
|
|
|
|
The old trick seems to no longer work in newer VS version.
|
|
|
|
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4596
|
|
|
|
|
|
Function to remove exact duplicates from the tree before balancing.
|
|
|
|
Instead of making the entire body of the function conditional, it now
returns early, unindenting the entire function and preventing the reader
from searching for a non-existent `else` clause.
No semantic changes.
|
|
The `BLI_path_frame_strip` function was completely broken, unless the
number of digits in the sequence number was the same as the length of
the extension. In other words, it would work fine for `file.0001.abc` (4
digit `0001` and 4 char `.abc`), but other combinations would truncate
to the shortest (`file.001.abc` would become `file.###.ab` and
`file.00001.a` would become `file.##.a`). The dependency between the
sequence number and the file extension is now removed.
The behaviour has changed a little bit in the case where there are no
numbers in the filename. Previously, `path="filename.abc"` would result
in `path="filename.abc"` and `ext=""`, but now it results in
`path="filename"` and `ext=".abc"`. This way `ext` always contains the
extension, and the behaviour is consistent regardless of whether there
were any numbers found.
Furthermore, I've removed the `bool set_frame_char` parameter, because
it was unclear, probably also buggy, and most importantly, never used.
I've also added a unit test for the `BLI_path_frame_strip` function.
|
|
Most API's already use this convention.
|
|
Some users only use the tree to store a single value.
|
|
Some users of the 3D versions were storing 2D data in it.
Using a 3D tree for 2D data adds a spatially redundant branch
every 3rd level, as well as some extra memory use, best avoid this.
|
|
Use prefix now there isn't only the 3d version.
|
|
This moves logic into kdtree_impl.h which is included in a source
file that defines the number of dimensions - so we can easily support
different numbers of dimensions as needed
(currently 3D and 4D are supported).
Macro use isn't so nice but avoids a lot of duplicate code.
|
|
Copy the new value when the compatible quaternion isn't usable.
|
|
|
|
|
|
There isn't any advantage to this over comparing the squared length.
|
|
|
|
Logic to for boids to avoid head-on collisions was in BLI_kdtree.
Move this into a callback which is now defined in boids.c
so the kdtree code can be kept generic.
|
|
|
|
|
|
Mostly functions wrapping args, not confirming to our style guide.
|
|
|
|
Use the term "AFTER" instead of "OFS" since it wasn't obvious these
macros operate on everything after the struct member passed.
Avoid casting to non-const types when only reading.
|
|
|
|
Differential Revision: https://developer.blender.org/D4466
|
|
|
|
Reset nodes after the first balance call.
|
|
This reverts commit 301bcf771dec827138412ca6e7a25e2269eb5e9e.
Caused crash entering particle edit mode.
|
|
Detects invalid memory use when WITH_COMPILER_ASAN is enabled.
|
|
|
|
The problem was that `balance` expected that all node children
are set to `KD_NODE_UNSET` by default.
However, this might not be the case when `balance` is called
more than once.
The balance function might change the order of nodes even
when no new point has been inserted.
|
|
This reverts the changes from ce927e1 to put the main and job threads on
node 0. The problem is that all threads created as children from these
threads will inherit the NUMA node and so will end up on the same node.
This can be fixed case-by-case by assigning the NUMA node for every child
thread, however this is difficult for external libraries and OpenMP, and
out of our control for plugins like external renderers.
|
|
Also ensure elements fit evenly into the chunk size
causing allocations to be slightly smaller in some cases.
In own tests reduces overall memory use by about ~4.5%
for high poly meshes in edit-mode.
|
|
|
|
There is no reason to keep the option for separate allocations,
it makes code harder to follow.
|
|
|
|
Detects invalid memory use when WITH_COMPILER_ASAN is enabled.
|
|
|
|
This actually makes more sense than removing them in the
load-post callback. During load, the file might register
timers that would be removed immediately.
|
|
When there was no rotation the axis was zerod,
while not exactly a bug, it means changing the angle does nothing
and all axis-angle values are initialized with Y=1,
use this convention when resetting the axis too.
|
|
|
|
hash & hashsizes are generic names, be more specific & define the
generic names locally.
Quiet undeclared variable warnings.
|
|
Avoids manually defining 'for' loops that store the next item in the
linked list.
|
|
Original and localized particle settings were sharing some
of the runtime pointers.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|