Age | Commit message (Collapse) | Author |
|
Renamed or removed parameters which no longer exist.
|
|
Also add groups in some files.
|
|
Some doc-strings were skipped because of blank-lines between
the doc-string and the symbol and needed to be moved manually.
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
Ref T92709
|
|
|
|
Some minor improvements to doc-strings too.
Ref T92709
|
|
Correct assert for edit-mesh normal calculation.
|
|
Use a counter for loop indices as they're being iterated in order.
|
|
Storing and restoring custom normals was broken by
39b2a7bb7e815e051348bf5c5ec777d091324164
This also caused "Sharp Edge" option for Weld by Distance to fail,
reported as T92875.
|
|
Ensure the layers from the source mesh are used instead of the
object referenced by the boolean modifier.
|
|
|
|
|
|
`v_other` -> `v_step`
|
|
Sometimes the `use_partial_connect` option could trigger the assert:
```
BLI_assert(!BM_elem_flag_test(l_iter->v, VERT_NOT_IN_STACK));
```
This can happen when `v_delimit->e` is not part of edgenet, so `v_other` will not have the flag.
|
|
Creating some primitives allows for a scale value (via python) that will
scale the object accordingly. For objects with a radius parameter
(like cylinders, spheres, etc.) passing a scale different to (1,1,1)
would result in unexpected behavior.
For example:
`>>> bpy.ops.mesh.primitive_uv_sphere_add(radius=2, scale=(1,1,2))`
We would expect this to create a sphere with a radius of 2
(dimensions 4,4,4) and then be scaled *2 along the z-axis
(dimensions 4,4,8). But this would previously create a scaled sphere
with dimensions (2,2,4).
The scale was simply divided by two. Maybe because the "radius"
parameter for creating the primitives was confusingly named "diameter"
(but used as the radius).
The fix adds a scale parameter to `ED_object_new_primitive_matrix`
and also renames the wrongly named "diameter" parameters to "radius".
Reviewed By: campbellbarton
Maniphest Tasks: T84638
Ref D10093
|
|
This changes the search for unprocessed faces to only search
from the previously found face. Local testing on 1.5 million
triangle meshes gives a 75x speedup
(of the code affected, which is the first half of the work).
The former code would traverse all faces of a mesh until a face was
found that had not been processed. This ended up being slow mainly
because it had to load face-data to determine the state of the flag.
Secondarily, the way it iterated and marked the mesh, it would end up
traversing all previously processed faces to find and unprocessed one.
The same optimization has been made for edge-group calculation.
Reviewed By: campbellbarton
Ref D12379
|
|
Use an assert since this should never happen.
|
|
This reverts commit 41e650981861c2f18ab0548e18851d1d761066ff.
This broke "CubeMaskFirst" test.
Any value even slightly outside the [-1.0..1.0] range
caused the result to be nan, which can happen when calculating
the dot-product between two unit length vectors.
|
|
The clamped version of acos isn't needed as degenerate (nan) coordinates
result in zeroed vectors which don't need clamping.
|
|
Caused by fix for T90256 and a misunderstanding in D11928.
Don't skip tagging edges when the auto-smooth angle is 180 degrees
since this skips topology checks which are needed for properly
calculating edge loop normals.
|
|
Regression in 39b2a7bb7e815e051348bf5c5ec777d091324164.
|
|
This makes the internal naming consistent with the public API. And also gives
us a visibility_flag rather than restrictflag that can be extended with more
flags.
|
|
Error in 39b2a7bb7e815e051348bf5c5ec777d091324164
which failed to set edge flags with single threaded calculation,
used for low poly models.
|
|
|
|
Regression in 39b2a7bb7e815e051348bf5c5ec777d091324164
that meant non-manifold edges were not being tagged
when they should have been.
|
|
This BMesh iterator hadn't been used in C++ code yet, and needed
a macro for a proper cast. The parameter structs need to be initialized
when declared without designated initializers.
|
|
|
|
|
|
Share functionality for single and multi-threaded edge-split tagging.
Remove logic that ensured vert & loop indices in bm_mesh_edges_sharp_tag
(missing from fd9fc809b76d625a1ead6e1fbe5e486cc012f5f3).
|
|
The only difference with BM_loops_calc_normal_vcos was passing in
custom coordinates which may be NULL.
|
|
bm_mesh_edges_sharp_tag was called with setting sharp edges enabled.
Error in 39b2a7bb7e815e051348bf5c5ec777d091324164.
|
|
This was added in 0b7f5813973c515b84cd7c18ef6d7d1e59374237
but seems not to be needed as the assignment was never correct
since only one corner on either side of the smooth edge had the
vertex normal written to it.
|
|
Merge the sharp edge tagging into bm_mesh_loops_calc_normals,
this has the advantage that edge tagging can be performed as part of
walking over each vertices edges - instead of tagging in a separate loop.
Even though this will tag edges twice (once for each vertex),
the computation isn't heavy as it's only calculating a dot-product
between the two face users to compare the angle.
This change combined with 4ba06ad0a8cdec66d9a9cb06f982736d46c40f4c
makes BM_loops_calc_normal_vcos around 5.68x faster,
with an overall speedup over 2.6x when transforming a high poly mesh.
(tested on a system with 32 cores).
Reviewed By: mont29
Ref D11970
|
|
Supported multi-threading for bm_mesh_loops_calc_normals.
This is done by operating on vertex-loops instead of face-loops.
Single threaded operation still loops over faces since iterating
over vertices adds some overhead in the case of custom-normals
as the order used for accessing loops must be the same as iterating
of a faces loops.
From isolated timing tests of bm_mesh_loops_calc_normals on high
poly models, this gives between 3.5x to 10x speedup,
with larger gains for meshes with custom-normals.
NOTE: this is part one of two patches for multi-threaded auto-smooth,
tagging edges as sharp is still single threaded.
Reviewed By: mont29
Ref D11928
|
|
While doxygen supports both, conform to our style guide.
Note that single back-tick's are already used in a majority of comments.
|
|
|
|
|
|
|
|
This shows the text as part of the assertion message.
|
|
Use more direct access to next/previous vertices.
- `BM_edge_other_vert(l_curr->e, l_curr->v)` -> `l_curr->next->v`.
- `BM_edge_other_vert(l_curr->prev->e, l_curr->v)` -> `l_curr->prev->v`.
Add asserts to keep the intention clear.
|
|
Only DNA_customdata_types.h is needed for BMEditMesh.
|
|
|
|
|
|
Reserve the term count for values that require calculation
(typically linked lists).
|
|
Using BMesh operators through the edit-mesh API created a full copy
of the mesh so it was possible to restore the mesh in case
one of the operators raised an error.
Remove support for automatic backup/restore from the EDBM_op_* API's
as it adds significant overhead and was rarely used.
Operators that need this can use the BMBackup API to backup & restore
the mesh in case of failure.
Add warning levels to BMO_error_raise so operators can report problems
without it being interpreted as a request to cancel the operation.
For high-poly meshes creating and freeing a full copy is an expensive
operation, removing this gives a speedup of ~1.77x for most operators
except for "connect_verts" / "connect_vert_pair"
which still uses this functionality.
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
The error codes could be used to look up messages from a table
of messages however this wasn't especially useful.
Now all calls to BMO_error_raise must inclue a message.
|
|
Normals now includes many functions including normal splitting &
custom normal manipulation split this into it's own file
to centralize related functions.
|
|
|
|
|
|
|