Age | Commit message (Collapse) | Author |
|
We have our own assert implementation, `BLI_assert()` that is prefered over the
C standard library one. Its output is more consistent across compilers and
makes termination on assert failure optional (through `WITH_ASSERT_ABORT`).
In many places we'd include the C library header without ever accessing it.
|
|
|
|
|
|
This was fine in those cases with current code, but that kind of
assumption is always risky, and an open door to hard-to-track bugs when
code changes in the future...
|
|
This patch changes the BVHCache implementation. It will use
a primitive array in stead of the ListBase. The locking is also
changed from a global lock to a per cache instance lock.
The performance of `gabby.blend` available on the cloud increased from 9.7
fps to 10.5 fps.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D7817
|
|
|
|
|
|
While it might be handy to have type-less functionality which is
similar to how C++ math is implemented it can not be easily achieved
with just preprocessor in a way which does not have side-effects on
wrong usage.
There macros where often used on a non-trivial expression, and there
was at least one usage where it was causing an actual side effect/bug
on Windows (see change around square_f(sh[index++]) in studiolight.c).
For such cases it is handy to have a function which is guaranteed to
have zero side-effects. The motivation behind actually removing the
macros is that there is already a way to do similar calculation. Also,
not having such macros is a way to guarantee that its usage is not
changed in a way which have side-effects and that it's not used as an
inspiration for cases where it should not be used.
Differential Revision: https://developer.blender.org/D7051
|
|
The BVHTree was erroneously marked as not cached.
|
|
|
|
|
|
Accidentally unused in rB7c3bbe93aaa2
|
|
The stored value was always false because of shadowing.
Also disable unused code.
|
|
With this function it is easier to create and have control over editmeshes `BHVtree`s.
|
|
This is a step that allow using `bvh_cache` for `EditMeshe`s.
|
|
It was a stupid mistake with the wrong pointer being referenced.
It was a serious problem because the memory leak was considerable.
|
|
I'm not very fond of adding new types of bvhtrees.
But this is probably the most efficient solution.
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
Free the BVH tree immediately along with the mesh, otherwise we might access
invalid mesh data.
Differential Revision: https://developer.blender.org/D4201
|
|
There is no point having operations that iterate over the whole
bit array as macros, so convert BLI_BITMAP_SET_ALL to a function.
Also, add more utilities for copying and manipulating masks.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D4101
|
|
|
|
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
|
|
|
|
|
|
|
|
|
|
multiple objects.
- Use the object referenced in `BMEditMesh` as the `ghash` key to save the bvhtrees in cache;
- Create a boundbox around edit_mesh to test the snap before creating bvhtree;
- Save the `edit_mesh`s bvhtree in the mesh bvh_cache;
This is a part of the D3504.
|
|
|
|
|
|
|
|
|
|
|
|
This prevents zero-leafs bvhtrees from being recalculated multiple times.
|
|
|
|
|
|
|
|
|
|
|
|
loose edges
|
|
Same issue as in DM-based on, so follow up of rBf3efa9e15f58...
|
|
|
|
Could lead to atempt to free NULL pointer, and/or memory leak.
|
|
BLI_bvhkdop functions were not made to work with zero-leaf trees.
Perhaps a better solution would be to modify BLI_bvhkdop to work with zero leaf trees.
But this solution of returning NULL was already used for bvhtrees of looptris.
|
|
DerivedMesh.
Differential Revision: https://developer.blender.org/D3227
|