diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-25 10:03:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-26 10:07:05 +0300 |
commit | b5542c1ea4c29c56338706158578c41f6e65df5c (patch) | |
tree | 2d6c0a62a7f9b91a5172ef96ef1076904566545f /source/blender/editors/transform/transform_data.h | |
parent | c1fe58244646c7ecc58fba1bdbf7c511750b14c9 (diff) |
Edit Mesh: optimize common use-cases for partial updates
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.
Diffstat (limited to 'source/blender/editors/transform/transform_data.h')
-rw-r--r-- | source/blender/editors/transform/transform_data.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_data.h b/source/blender/editors/transform/transform_data.h index 5b01433c96b..59b76c2eec5 100644 --- a/source/blender/editors/transform/transform_data.h +++ b/source/blender/editors/transform/transform_data.h @@ -173,10 +173,12 @@ enum { /** For Graph Editor - curves that can only have int-values * need their keyframes tagged with this. */ TD_INTVALUES = 1 << 11, +#define TD_MIRROR_AXIS_SHIFT 12 /** For editmode mirror. */ TD_MIRROR_X = 1 << 12, TD_MIRROR_Y = 1 << 13, TD_MIRROR_Z = 1 << 14, +#define TD_MIRROR_EDGE_AXIS_SHIFT 12 /** For editmode mirror, clamp axis to 0 */ TD_MIRROR_EDGE_X = 1 << 12, TD_MIRROR_EDGE_Y = 1 << 13, |