Age | Commit message (Collapse) | Author |
|
In rBed6c8d82b804 it was wrongly assumed that the constraint functions
always apply the transformations.
But that is not the case for when axes are aligned.
The `mul_m3_v3(t->con.pmtx, out)` fallback is still required.
|
|
|
|
Caused due to an inaccuracy when the values of `in` and `out` are too
close.
The solution is to project the value of `in` directly onto the plane.
|
|
|
|
|
|
This commit adds a new face nearest snapping mode, adds new snapping
options, and (lightly) refactors code around snapping.
The new face nearest snapping mode will snap transformed geometry to the
nearest surface in world space. In contrast, the original face snapping
mode uses projection (raycasting) to snap source to target geometry.
Face snapping therefore only works with what is visible, while nearest
face snapping can snap geometry to occluded parts of the scene. This new
mode is critical for retopology work, where some of the target mesh
might be occluded (ex: sliding an edge loop that wraps around the
backside of target mesh).
The nearest face snapping mode has two options: "Snap to Same Target"
and "Face Nearest Steps". When the Snap to Same Object option is
enabled, the selected source geometry will stay near the target that it
is nearest before editing started, which prevents the source geometry
from snapping to other targets. The Face Nearest Steps divides the
overall transformation for each vertex into n smaller transformations,
then applies those n transformations with surface snapping interlacing
each step. This steps option handles transformations that cross U-shaped
targets better.
The new snapping options allow the artist to better control which target
objects (objects to which the edited geometry is snapped) are considered
when snapping. In particular, the only option for filtering target
objects was a "Project onto Self", which allowed the currently edited
mesh to be considered as a target. Now, the artist can choose any
combination of the following to be considered as a target: the active
object, any edited object that isn't active (see note below), any non-
edited object. Additionally, the artist has another snapping option to
exclude objects that are not selectable as potential targets.
The Snapping Options dropdown has been lightly reorganized to allow for
the additional options.
Included in this patch:
- Snap target selection is more controllable for artist with additional
snapping options.
- Renamed a few of the snap-related functions to better reflect what
they actually do now. For example, `applySnapping` implies that this
handles the snapping, while `applyProject` implies something entirely
different is done there. However, better names would be
`applySnappingAsGroup` and `applySnappingIndividual`, respectively,
where `applySnappingIndividual` previously only does Face snapping.
- Added an initial coordinate parameter to snapping functions so that
the nearest target before transforming can be determined(for "Snap to
Same Object"), and so the transformation can be broken into smaller
steps (for "Face Nearest Steps").
- Separated the BVH Tree getter code from mesh/edit mesh to its own
function to reduce code duplication.
- Added icon for nearest face snapping.
- The original "Project onto Self" was actually not correct! This option
should be called "Project onto Active" instead, but that only matters
when editing multiple meshes at the same time. This patch makes this
change in the UI.
Reviewed By: Campbell Barton, Germano Cavalcante
Differential Revision: https://developer.blender.org/D14591
|
|
If the `Automatic Constraint` modifier was activated while an axis
constraint was already set, the orientation used would be the default
orientation of the mode and not that of the scene.
This was because the `initSelectConstraint` function was not called in
this case and the `Automatic Constraint` mode was enabled by other
indirect means.
So the solution is to call `initSelectConstraint` in either case and
remove these "indirect means" of enabling `Automatic Constraint`.
|
|
This reverts commit 6cc83f9079de11ddb53af5bab3e0442a234aadb2.
That commit removed the feature of cancel the 'Auto Constraint'
if it is enabled without drag.
|
|
If the `Automatic Constraint` modifier was activated while an axis
constraint was already set, the orientation used would be the default
orientation of the mode and not that of the scene.
This was because the `initSelectConstraint` function was not called in
this case and the `Automatic Constraint` mode was enabled by other
indirect means
So the solution is to call `initSelectConstraint` in either case and
remove these "indirect means" of enabling `Automatic Constraint`.
|
|
- Rename ED_view3d_win_to_delta `mval` argument to `xy_delta` as it
as it was misleading since this is an screen-space offset not a region
relative cursor position (typical use of the name `mval`).
Also rename the variable passed to this function which also used the
term `mval` in many places.
- Re-order the output argument of ED_view3d_win_to_delta last.
use an r_ prefix for return arguments.
- Document how the `zfac` argument is intended to be used.
- Split ED_view3d_calc_zfac into two functions as the `r_flip` argument
was only used in some special cases.
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
Ref T92709
|
|
Support gimbal orientation for objects & bones.
|
|
Make the "xform" tool/gizmo available for strip transformations in the
sequencer preview window.
Because of the amount of hacks needed to make the gizmo work nicely with
multiple strips at the same time, it was decided to only show the
translate gizmo when multiple strips are selected.
This is because the transforms with multiple strips would appear buggy
because of our lack of shearing support in the transform system.
There is also currently no way to properly sync the gizmo drawing with
the transform when using multiple strips.
Reviewed By: Richard Antalik, Campbell Barton
Differential Revision: http://developer.blender.org/D12729
|
|
|
|
|
|
Use const arguments to simplify further optimizations.
Transforming elements shouldn't need to change their containers
data-structures.
ElementResize for grease pencil stroke thickness was
modifying TransInfo.num & TransInfo.values_final.
Now copies are operated on to preserve const correctness although
it's worth investigating if this can be avoided altogether.
|
|
It does not make sense to maintain automatic constraint selection when
you manually set the constraint.
|
|
Make them more descriptive.
|
|
Improves readability.
|
|
|
|
|
|
The constraint was not set when redoing.
This commit also removes `postInputRotation`. I really couldn't see a use for it.
|
|
Flags unified:
T_CURSOR -> CTX_CURSOR
T_TEXTURE -> CTX_TEXTURE
Flags moved:
T_CAMERA -> CTX_CAMERA
T_POSE -> CTX_POSE_BONE
T_OBJECT -> CTX_OBJECT
T_TEXTURE -> CTX_TEXTURE_SPACE
Flag renamed:
CTX_EDGE -> CTX_EDGE_DATA
|
|
|
|
The rotation direction was flipped recently.
This meant that rotation on a single axis gave negative results compared
with previous Blender releases.
This partially reverts a9b53daf23ba8b6cb4c930e06154ffd35522b00d.
Differential Revision: https://developer.blender.org/D10299
|
|
Use the more common abbreviation for `implementation`.
|
|
# Conflicts:
# source/blender/editors/transform/transform_constraints.c
|
|
This is an old bug (strange not to have been reported before).
To define the direction of rotation, the View Vector is used.
However, only the projection matrix was being considered, but in
perspective mode, the position of the pivot also matters.
|
|
This function is only being used by the constraint code.
|
|
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.
|
|
Unused argument in rB216ebe0b7392d6
|
|
This reverts commit 780857f8e8139613711cba041f5f0af9799804ec.
The `axismtx` argument was supposed to be used.
|
|
|
|
|
|
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.
|
|
local orientation
In fact, the drawing was that of the local contraint axis (which is
summarized so as not to fill the screen with too much information).
Use the local contraint axis only when more than one object is selected.
|
|
This reverts commit 54f248fa87afd4836fb7154056cd0e8d920401f1.
And fixes T84259.
Apparently the ideal behavior was the previous one.
|
|
|
|
|
|
This feature was added in D5608.
But in practice this confuses more than it helps.
This fixes T82386.
|
|
To fix the problem, it was necessary to create a fallback for the
zero-sized axis in local orientation.
This also affects the gizmos.
|
|
Improves the organization and identification of the API.
|
|
locking
The result was being affected by the view alignment correction.
Regression introduced in rB4eda60c2d82d
|
|
Fix T81429.
This was an intentional change in rBc75a665c442e as it maintains the
same behavior as the constraint with or without modifier.
But from the user's PoV, it is better to keep the old behavior.
This makes drawing and behavior more intuitive.
|
|
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.
|
|
This fixes and reverts commit c7287ffaec59cecd4b63b4bb2ea1aaf44f09f704
Due to hardcodded keys, the modifier for auto contrain plane did not
work with custom keymaps and was in conflict with other keyitems.
Its usability is also confusing since it cannot be used without
`MOD_PRECISION`
But instead of removing it, it is better to make this modifier compatible
with custom keymaps and keep the conflict.
|
|
The last usage was removed in {rB4eda60c2d82de0d7f7ded8ddf1036aea040e9c0d}.
|
|
Regression introduced in rB546b900194f0
|
|
|