Age | Commit message (Collapse) | Author |
|
Multi-threading support for transform modes: bevel-weight, crease,
push-pull, rotate, shear, shrink-fatten, skin-resize, to-sphere,
trackball & translate.
This is done using a parallel loop over transform data.
From testing a 1.5million polygon mesh on a 32 core system
the overall performance gains were between ~20-28%
To ensure the code is thread-safe arguments to shared data are const.
Reviewed By: mano-wii
|
|
`t->values` does not necessarily represent a final value of the
transformation, as each mode treats this value differently.
So, unfortunately, we cannot have a generic offset solution for modal
transform operations. Offset needs to be handled by each mode.
Note: Currently only, `Move`, `Rotate` and `Resize` support this.
|
|
Pass the string size as this is less error prone in general.
|
|
When activated in modal, `translate`, `resize`, `rotate`, `shear` and
`edge_rotate_normal` use a different orientation than the set in scene.
This orientation needed to match since some of these modes can be switched
during operation.
The default orientation for these modes was `V3D_ORIENT_VIEW`.
And this changed when finishing the `translate` and `resize` to
`V3D_ORIENT_GLOBAL`.
But this could cause inconsistencies when inputting values from the
keyboard.
The solution now is to change the orientation when you change the mode.
---
Note: Although the user can expect the value entered to reflect the
orientation set in the scene, it would require a lot of changes and would
not be really useful.
|
|
The constraint was not set when redoing.
This commit also removes `postInputRotation`. I really couldn't see a use for it.
|
|
This solution replaces {rBf9e994d0f463}.
That commit created an inverted orientation matrix but the 'Align to
Transform Orientation' operator doesn't work well with inverted matrices.
This new solution makes the rotate operator use the negative vector of the
axis.
|
|
The incremental was taking priority but the other elements are mandatory.
|
|
Follow our code style for doxygen sections.
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
This commit removes `t->snap[0]` and `t->snap_spatial[0]`.
They were not actually being used, and could add overhead for
transformation without snap.
|
|
This was the behavior in old versions of blender.
During a transformation operation, when pressing a contrain key, the chosen
orientation is that of the scene.
If you press the same key, the orientation changes to Global or Local.
However, if you choose another contrain axis with the orientation changed,
the orientation does not return to the set for the scene.
It remains Global or Local.
Now when changing a contrain axis, no matter what the current orientation is,
it always returns to the scene orientation.
|
|
Now we have a better distinction of what is snap to grid and what is
snap to increments.
The code also allows the implementation of mixed snap for these modes.
|
|
These functions are very specific to the mode.
More modes can support snap, and there is no reason to keep all
callbacks for each mode in the transform_snap.c file.
|
|
|
|
This was so because of the rotate transformation mode but it can make
other modes confusing and add unnecessary complexity.
|
|
- Use `t->spacemtx` as the orientation matrix instead `t->orient_matrix`.
- Unify constraint behavior between modal and non-modal.
- Simplify code to remove old workarounds and rearrange struct members.
This fix T66142 since the actual `orient_type` (in the case
`V3D_ORIENT_NORMAL`) is used during Redo instead of always using
`V3D_ORIENT_CUSTOM_MATRIX`).
Differential Revision: https://developer.blender.org/D7469
|
|
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|
|
|
|
Differential Revision: https://developer.blender.org/D5819
|