Age | Commit message (Collapse) | Author |
|
Also add groups in some files.
|
|
Ref T92709
|
|
|
|
This reverts commits
bfa3dc91b75407b063f2ac991b176d98c050f92d,
52b94049f2a71a74f52247f83657cf3a5c8712b4,
ae379714e4f1eca74f5f77532a6e959f29445236,
a770faa811ee62837eb540b0bd83ca0770f16663,
4ed029fc02b022cb5ff28ed3ce70992c450d2be5,
101a493ab556c6597ac91fba204059be67b35990 and
62a2faa7ef39130446716d7a06215cd1df1eb2ac.
And fixes T89955.
Changing the dependency graph is a can of worms and the result is
a kind of unpredictable.
A different solution will be planned.
|
|
Depending on the modifiers, geometry can be destructive which is not safe.
|
|
With this option enabled, updating the geometry is no longer deform only.
|
|
During a mesh transformation in edit mode (Move, Rotate...), only part of
the batch cache needs to be updated.
This commit allows only update only the drawn batches seen in
`BKE_object_data_eval_batch_cache_deform_tag` if the new
`ID_RECALC_GEOMETRY_DEFORM` flag is used.
This new flag is used in the transforms operation for edit-mesh and
results in 1.6x overall speedup in heavy subdiv cube.
Differential Revision: https://developer.blender.org/D11599
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
Edit-mesh partial update logic assumed translate didn't need normals
to be recalculated (for faces with all vertices being transformed).
However translate can optionally rotate which requires
all transformed normals to be updated.
Check for this case and use the previous partial-update method
when it modified extra geometry, so the normals are properly reset.
Further updates need not recalculate them.
|
|
Skip updating normals & tessellation for contiguous geometry regions
for operations such as translate & uniform scale.
This means when all geometry is selected, no updates are needed
as the relative locations of vertices aren't being modified.
Performance:
As this is skipping a multi-threaded operation,
larger improvements are noticeable on systems with fewer cores.
- ~1.15x to ~1.3x overall gain for 32 cores.
- ~1.7x to ~2.2x overall gain for 1 core (limited using `-t 1` argument).
Details:
- Rotate & non-uniform scale only skip tessellation.
- Proportional editing and axis-mirror have special handling
ensure geometry is properly grouped before considering
a face part of a single group that can be skipped.
- Loose vertices always need their normals to be recalculated
since they're calculated based on the location.
- Non-affine transform operations such as shrink-fatten & bend,
don't take advantage of this optimization.
- Snap projection also disables the optimization.
|
|
Support calculating face normals when tessellating. When this is done
before updating vertex normals it gives ~20% performance improvement.
Now vertex normal calculation only needs to perform a single pass on the
mesh vertices when called after tessellation.
Extended versions of normal & looptri update functions have been added:
- BM_mesh_calc_tessellation_ex
- BM_mesh_normals_update_ex
Most callers don't need to be aware of this detail by using:
- BKE_editmesh_looptri_and_normals_calc
- BKE_editmesh_looptri_and_normals_calc_with_partial
- EDBM_update also takes advantage of this,
where calling EDBM_update with calc_looptri & calc_normals
enabled uses the faster normal updating logic.
|
|
This patch exposes functionality for performing partial mesh updates
for normal calculation and face tessellation while transforming a mesh.
The partial update data only needs to be generated once,
afterwards the cached connectivity information can be reused
(with the exception of changing proportional editing radius).
Currently this is only used for transform, in the future it could be
used for other operators as well as the transform panel.
The best-case overall speedup while transforming geometry is about
1.45x since the time to update a small number of normals and faces is
negligible.
For an additional speedup partial face tessellation is multi-threaded,
this gives ~15x speedup on my system (timing tessellation alone).
Exact results depend on the number of CPU cores available.
Ref D11494
Reviewed By: mano-wii
|
|
While this doesn't provide any noticeable benefits at the moment,
it allows for geometry updates skipping copy-on-write in edit-mode
in the future.
|
|
|
|
Regression in 21b9231d7f5a248027c32dcc7daab3318390c20f
|
|
|
|
The creation of `TransCustomData` is best located at the beginning of the
file as it is a specific struct of the file and can be used a lot locally.
|
|
|
|
So we can reuse the same loop for different corrections.
|
|
|
|
|
|
different orientation than set
The problem happened when the selection only allowed "single_islands"
(only vertices are selected, no edges or faces).
The result of `is_zero_v3(v->no)` was erroneously being compared to `0.0f`
This commit corrects the wrong condition and optimizes it by adding a
earlier return when the islands don't need to be calculated.
(It also improves the code's readability by joining some variables in the
`struct TransIslandData`).
|
|
This was introduced in the new geodesic distances algorithm for proportional
editing. When all faces of an edge are hidden, that edge should be considered
as loose geometry.
Initial patch by Pablo with modifications by Brecht.
Differential Revision: https://developer.blender.org/D10488
|
|
|
|
Comment blocks not conforming to convention.
|
|
Use approximate geodesic distance computatiom that crosses through triangles
rather than only along edges. Using only edges would give artifacts already
on a simple grid.
Fixes T78752, T35590, T43393, T53602
Differential Revision: https://developer.blender.org/D10068
|
|
Since the `TransData` converted from vertices is the same used for other
transform modes (Move, Rotate, Resize), the logic used for mirroring
focused only on the position of the vertices.
The solution here is to create a specific `TansData` for `CD_MVERT_SKIN`.
|
|
Add an optional callback to check source/destination loops for
BM_mesh_calc_face_groups.
This is needed so it can be used to calculate UV islands.
|
|
Corrects incorrect usages of the words 'then' and 'than'.
Differential Revision: https://developer.blender.org/D9246
Reviewed by Campbell Barton
|
|
`CustomData_bmesh_interp` use the same CustomData decryptor (in this case, `bm->ldata`) in both blocks.
So make sure that all CustomData layers match.
This commit also removes redundant `BM_elem_attrs_copy_ex` calls.
Maniphest Tasks: T81060
Differential Revision: https://developer.blender.org/D9159
|
|
Improves the organization and identification of the API.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
|
|
Some transform modes (such as Mirror) are not listed to have UV corrected
during the transformation.
It messed up the UV of all of these.
|
|
Mirror
The mirror map can reference a hidden vertex that is currently ignored
in the transformation.
Thus the mirror element array is not filled.
|
|
|
|
|
|
`EDBM_verts_mirror_cache_begin_ex` could do a better work avoiding these
duplicates, but this is a separate problem.
|
|
|
|
The result was somewhat unpredictable.
This error was recently introduced.
|
|
A face must have area in order to be possible calculate interpolation weights.
The same to the reference UVs.
But the new faces created with the extrude operator, have no area (before moving).
The solution was to get the loop data from some neighbor face.
Differential Revision: https://developer.blender.org/D8278
|
|
Keeping face attributes connected is now optional.
Keeping UV's connected is useful for organic modeling, but bad for
architectural.
Differential Revision: https://developer.blender.org/D8360
|
|
|
|
|
|
Called when canceling a transform operation.
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/transform` module.
No functional changes.
|
|
|
|
Support custom-data correction based on surrounding geometry for all
transformation modes of the mesh transform operators.
The is the same logic used in Vert and Edge Slide.
In order not to change the current default behavior,
this property does not affect Vert and Edge Slide modes.
|
|
|