Age | Commit message (Collapse) | Author |
|
This might change the rotation of some instances after a Curve to Points.
Unfortunately, there is not much we can do about that, the math before
was just wrong. The forward and up axis stayed the same though.
Differential Revision: https://developer.blender.org/D12006
|
|
When the new "need_ids" flag is false and the output type is not
one of the valid BMesh kinds, there is no need to propagate even
a dummy id to all of the faces.
|
|
|
|
Some asserts were never raised because of invalid checks.
|
|
Assert was trying to say x coords of arcs lined up, and didn't do that.
|
|
No functional changes.
|
|
No functional changes
|
|
No functional changes.
|
|
While doxygen supports both, conform to our style guide.
Note that single back-tick's are already used in a majority of comments.
|
|
These used their own ad-hoc syntax.
|
|
|
|
The test forgot to set the new need_ids field, which luckily
exposed a bug in the C api for delaunay when that field is false.
Fixed the bug and the test, and added a test for the need_ids false
case.
|
|
Use C comments for plain text.
|
|
|
|
|
|
Some uses of delaunay_2d_calc don't need to know the original verts,
edges, and faces that correspond to output elements.
This change adds a "need_ids" value to the CDT input spec, default true,
which tracks the input ids only when true.
The python api mathutils.geometry.delaunay_2d_cdt gets an optional
final bool argument that is the value of need_ids. If the argument
is not supplied, it is true by default, so this won't break old uses
of the API.
On a sample text test, not tracking ids save about 30% of the runtime.
For most inputs the difference will not be so dramatic: it only really
kicks in if there are a lot of holes.
|
|
From Erik Abrahamsson, this uses parallel loops for raycasting.
It speeds up one example with many crossings of a bezier curve,
from 0.68s to 0.28s.
|
|
Using part of a patch from Erik Abrahamsson, this replaces the
use of linked lists for original id tracking by Sets.
I had thought that the lists were unlikely to grow to more than
a few elements, but when the mesh has a lot of holes (whose
original ids go *outside* the hole, and therefore, most of the
mesh), this assumption can be very wrong.
On a Text regression test, the time went from 11.67s to 0.16s
with this fix. I also tested to make sure that Boolean didn't
slow down with this, and found it actually had a very slight speedup.
Using Sets exposed a dependency on the ordering of the items
in the id lists, luckily caught by a mesh intersect regression test,
so fixed that.
|
|
Would have prevented the error in
15cdcb4e9085c3cf35528c2f7e559955b4ff531a.
|
|
Single threaded operation used the state before it had variables
written into it.
Error in 15cdcb4e9085c3cf35528c2f7e559955b4ff531a.
|
|
|
|
|
|
|
|
This shows the text as part of the assertion message.
|
|
Useful when TLS requires it's own allocated structures.
|
|
Useful when thread-local storage has it's own memory arena containing
data which is kept after the multi-threaded operation has finished.
|
|
Docs: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
Differential Revision: https://developer.blender.org/D11460
|
|
It always bothered me that we'd do the `BLI_assert(... || !"message")` trick to
print a message alongside the assert, while it should be trivial to have a way
to pass an extra string as additional argument.
This adds `BLI_assert_msg()` with a second argument for a message. E.g.:
```
BLI_assert_msg(
params->rename_id == NULL,
"File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile.");
```
On failure this will print like this:
```
0 Blender 0x00000001140647a3 BLI_system_backtrace + 291
[...]
13 Blender 0x00000001092647a6 main + 3814
14 libdyld.dylib 0x00007fff203d8f5d start + 1
BLI_assert failed: source/blender/editors/space_file/file_ops.c:2352, file_directory_new_exec(), at 'params->rename_id == ((void*)0)'
File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile.
```
Reviewed by: Sybren Stüvel, Jacques Lucke, Sergey Sharybin, Campbell Barton
Differential Revision: https://developer.blender.org/D11827
|
|
For some reason, the Windows compiler didn't like the
static function being used in the parallel_reduece.
|
|
|
|
|
|
Previously, this did not compile in VS 2017, because
`new T(initializer_())` would try to call the copy constructor of `T`.
Now, `initializer_` will construct the `T` inplace.
|
|
|
|
|
|
|
|
From patch D11780 from Erik Abrahamsson.
It parallelizes making the vertices, destruction of map entries,
finding if the result is PWN, finding triangle adjacencies,
and finding the ambient cell.
The latter needs a parallel_reduce from tbb, so added one into
BLI_task.hh so that if WITH_TBB is false, the code will still work.
On Erik's 6-core machine, the elapsed time went from 17.5s to 11.8s
(33% faster) on an intersection of two spheres with 3.1M faces.
On Howard's 24-core machine, the elapsed time went from 18.7s to 10.8s
for the same test.
|
|
Went back to using Blender's polyfill for triangulation, which is much
faster (time for a 3.1M face boolean went from 103s to 48s).
Had to put in detection for the case that needs the exact triangulator
(bug T86805), and also a fix for non-convex quads (bug T89330).
|
|
|
|
* Make the wrapper enumerable.
* Support an initializer function.
|
|
This allows converting between different `destruct_ptr` types (which is
just a `std::unique_ptr` with a custom deleter).
The most common use case is to convert from a derived type to
the type of the base class.
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
This constraint can be naturally viewed as a prototype for a future
4x4 matrix math node (or subset thereof), since its basic semantics
already is matrix assignment. Thus it makes sense to add math options
to this constraint to increase flexibility in the meantime.
This patch adds support for several operations that would be useful:
- An option to remove shear in the incoming target matrix.
Shear is known to cause issues for various mathematical operations,
so an option to remove it at key points is useful.
Constraints based on Euler like Copy Rotation and Limit Rotation
already have always enabled shear removal built in, because their
math doesn't work correctly with shear.
In the future node system shear removal would be a separate node
(and currently Limit Rotation can be used as a Remove Shear constraint).
However removing shear from the result of the target space conversion
before mixing (similar to Copy Rotation) has to be built into
Copy Transforms itself as an option.
- More ways to combine the target and owner matrices.
Similar to multiple Inherit Scale modes for parenting, there are
multiple ways one may want to combine matrices based on context.
This implements 3 variants for each of the Before/After modes
(one of them already existing).
- Full implements regular matrix multiplication as the most basic
option. The downside is the risk of creating shear.
- Aligned emulates the 'anti-shear' Aligned Inherit Scale mode,
and basically uses Full for location, and Split for rotation/scale.
(This choice already existed.)
- Split Channels combines location, rotation and scale separately.
Looking at D7547 there is demand for Split Channels in some cases,
so I think it makes sense to include it in Copy Transforms too, so that
the Mix menu items can be identical for it and the Action constraint.
Differential Revision: https://developer.blender.org/D9469
|
|
|
|
|
|
|
|
|
|
Sometimes the current spline list isn't part of the original curve, like
when using the deformed control points, etc. This will be helpful in
the curve modifier stack.
|
|
* Use unsigned integer types for bit operations.
* Use 64 bit integer instead of 32 bit.
* Support scoped enumes (aka `enum class`) by adding some more casts.
|
|
Add utility functions:
- BLI_bitmap_randomize
- BLI_rng_shuffle_bitmap
Part of D11685
|