Commit Graph

4865 Commits

Author SHA1 Message Date
Campbell Barton
21e988a51c Fix error in fix for #87219, accidental assignment in conditional 2024-06-04 10:46:57 +10:00
Germano Cavalcante
4439e39530 Fix: assignment in a condition
Error in 042a1327ca
2024-06-03 19:35:31 -03:00
Richard Antalik
f98b01e492 VSE: Improved handle tweaking
This commit changes how users can interact with handles:

Unselected handles are not drawn anymore by default. Handles are bit
thinner. If handle can't be selected, because strip is too small,
it is not drawn.

When hovering over strip handle a cursor is changed to represent a
handle shape. It is possible to select 2 handles at once if strips are
adjoined.

When tweak event happens on unselected handle, handle selection is lost
ater tweaking.

This behavior can be disabled in preferences:
Editing > Video Sequencer > Tweak Handles.

Moving strips with G key works same way as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/109522
2024-06-03 23:17:41 +02:00
Germano Cavalcante
042a1327ca Fix #87219: 'affect transform' not working for Pose Space
`affect transform` was never supported for Pose Space in Limit
constraints.

This commit implements this space in the transform code.

Pull Request: https://projects.blender.org/blender/blender/pulls/113363
2024-06-03 18:14:49 -03:00
Harley Acheson
02798f8438 UI: Mesh Shear Status Display
While using Mesh Shear, show only changing values in the area header and
only keymap entries on the Status Bar

Pull Request: https://projects.blender.org/blender/blender/pulls/122341
2024-05-31 21:51:42 +02:00
Pratik Borhade
c80e30684c GPv3: Lock material layer property
This ports the `lock_material` layer property to GPv3.
For this, the `layer_index` is also required in `retrieve_editable_points`
and `retrieve_editable_strokes` to choose strokes based on
the `lock_material` property.
In `retrieve_editable_elements` we now pass the `MutableDrawingInfo`
to get both the `drawing` and `layer_index`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119913
2024-05-31 15:13:35 +02:00
Damien Picard
b37d121e0a I18n: extract and disambiguate a few messages
Extract
- Add to Quick Favorites tooltip.
- "Mask", the name of a newly created mask (DATA_).
- "New" in the context of the new mask ID button.
- A few strings using BLI_STR_UTF8_ defines were not extracted.
  Take the special characters out of the translation macros.
- "External" menu items from the filebrowser's Files context
  menu (right-click on a file). These items were already extracted,
  but not translated.

Improve
- Separate formatted error message "%s is not compatible with
  ["the specified", "any"] 'refresh' options" into two messages.

Disambiguate
- Use Action context for new F-modifiers' names. This is already used
  for the "type" operator prop.
- Translate ImportHelper's default confirmation text using the
  Operator context, as it uses the operator name which is extracted
  with this context.
- "Scale" can be a noun, the scale of something, or a verb, to scale
  something. The latter mostly uses the Operator context, so apply
  this context to verbs, and the default contexts to nouns.
- "Scale Influence" can mean "Influence on Scale" (tracking
  stabilization) and "to Scale the Influence" (dynamic paint canvas).
- "Object Line Art" as type of Line Art to add, as opposed to the
  active object's Line Art settings.
- Float to Integer node: use NodeTree context for the node label, as
  this is already extracted and used for the enum.

Do not translate
- Sequencer labels containing only a string formatting field.

Some issues reported by Gabriel Gazzán and Ye Gui.

Pull Request: https://projects.blender.org/blender/blender/pulls/122283
2024-05-27 19:33:35 +02:00
Nathan Vegdahl
ec0a3e966c Refactor: Anim: make insert_key_rna() take RNAPath's instead of strings
This allows each path to optionally specify a single array index,
enabling `insert_key_rna()` to optionally insert keys for just a single
element of an array property. This will allow us to use it in more
places, and eventually reduce the total number of keying functions
needed in the code base.

PR #121879

Pull Request: https://projects.blender.org/blender/blender/pulls/121879
2024-05-24 15:06:21 +02:00
Jacques Lucke
ebb61ef30f Nodes: avoid removing link when inserting incompatible node
Previously, when dropping a node on a link with incompatible sockets, the link
would be removed. While sometimes useful in super simple setup, it is generally
useless for most work. Even worse, users might not notice that they accidentally
removed a link (this has been reported in the recent geometry nodes workshop).

This patch changes this behavior in two ways:
* A node can't be inserted onto an incompatible link anymore.
* A link will be dimmed while dragging a node over it, if it is incompatible or if
  alt is pressed.

Pull Request: https://projects.blender.org/blender/blender/pulls/121975
2024-05-23 19:52:37 +02:00
Harley Acheson
5a643cfa74 UI: Edge Slide Comments
Comments explaining why some properties might be not set in some
circumstances.

Pull Request: https://projects.blender.org/blender/blender/pulls/122172
2024-05-23 17:51:16 +02:00
Hans Goudey
3f6217c208 Cleanup: Sculpt: Use const and references
Just a general propagation of const and references, mainly for
`Object` and `SculptSession` variables, but also others.

Pull Request: https://projects.blender.org/blender/blender/pulls/121993
2024-05-20 02:56:25 +02:00
Campbell Barton
096eed9d7f Cleanup: spelling in comments 2024-05-20 10:23:54 +10:00
Brecht Van Lommel
a926f5b67d Refactor: Replace ID_IS_LINKED by !ID_IS_EDITABLE
Add new ID_IS_EDITABLE macro that checks if the ID can be edited in the
user interface. Replace usage of ID_IS_LINKED where it is used with this
meaning.

Also add a corresponding ID.is_editable property for Python.

This prepares for the ability to edit some linked datablocks for brush
assets.

Pull Request: https://projects.blender.org/blender/blender/pulls/121838
2024-05-16 14:53:09 +02:00
Falk David
e78fbad5fa Cleanup: GPv3: Rename "null" frames to "end" frames
The end of a fixed duration frame is stored as a special
`GreasePencilFrame`, notably with a `drawing_index` of
-1.

These were previously called "null" frames (because they
don't point to a drawing). But this name wasn't great.

This commit renames these to the more descriptive
"end" frame. In code, they are `GreasePencilFrame::end()`
and can be checked for with `frame.is_end()`.

All comments and function names referring to "null"
frames have also been updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/121868
2024-05-16 14:34:29 +02:00
Pratik Borhade
8e6b276f84 Fix #121660: Auto-keyframe icon Overlapping when Navigation Controls are off
This is due to the wrong offset when "navigation controls" is off. Axis
gizmo is still visible so "else" codeblock is expected to handle the
correct offset value.

Pull Request: https://projects.blender.org/blender/blender/pulls/121775
2024-05-15 14:22:32 +02:00
Harley Acheson
d42e507c14 UI: Fix AutoKeying Text
Recent changes overlay drawing code resulted in a call to draw the
"Autokeying" text being removed, showing only the icon.  This PR just
replaces one removed line.

Pull Request: https://projects.blender.org/blender/blender/pulls/121811
2024-05-15 01:41:10 +02:00
YimingWu
9512daee2d Fix #121751: Free CurvesTransformData on no selection
A `CurvesTransformData` is created to store transform points, but it's
not deleted when there's nothing selected, causing memory leak. Now
fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/121767
2024-05-14 17:43:42 +02:00
Pratik Borhade
60c9f4026b GPv3: Display layers in dopesheet and timeline
Include GPv3 layers/groups in dopesheet and timeline editor.
Call `animdata_filter_grease_pencil_data` in `animdata_filter_dopesheet_ob`
to draw layers.
Crash when transforming keys due to missing recalculation is also handled
in this PR.

Part of #110056

Pull Request: https://projects.blender.org/blender/blender/pulls/120605
2024-05-14 11:03:11 +02:00
Harley Acheson
92e0545e9f UI: Remove BLF_draw_default_shadowed
With Aras's recent changes in #121383, our text shader now supports
outline shadows, which gives a result that has more contrast than can
be achieved with BLF_draw_default_shadowed. This removes that function.

Pull Request: https://projects.blender.org/blender/blender/pulls/121676
2024-05-13 22:32:59 +02:00
Iliya Katueshenock
75d17b1db5 Cleanup: Move BKE_node to namespace
Move all header file into namespace.
Unnecessary namespaces was removed from implementations file.
Part of forward declarations in header was moved in the top part
of file just to do not have a lot of separate namespaces.

Pull Request: https://projects.blender.org/blender/blender/pulls/121637
2024-05-13 16:07:12 +02:00
Sybren A. Stüvel
6212c3c374 Fix #121161: Regression: Frame Selected Includes Hidden Bones
Refactor `BKE_armature_min_max()` so that it calls `BKE_pose_minmax(ob,
use_hidden=false)`. The former took neither bone visibility nor custom
bone shapes into account when computing the bounding box. Now these two
are unified, fixing the regression.

`BKE_armature_min_max()` is now basically a thin wrapper that uses more
modern C++ types in its signature. This will be cleaned up in a
follow-up refactor commit.

Another difference is that these functions return the AABB in different
coordinate spaces (object vs. world). This isn't done entirely correctly
(just transforming the two extreme points), but in a way that is
symmetrical with `BKE_object_minmax()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/121739
2024-05-13 15:42:33 +02:00
Aras Pranckevicius
ddc423b81c VSE: Make strip translate/grab tool round resulting position
Make the preview window translate/grab too round the resulting strip positions
to integer pixels. Resulting strip will more often end up using faster
interpolation (without bilinear), and avoids "text edges are too dark"
artifacts with light text strips on light backgrounds.
The latter happens because bilinear filtering does not do full alpha
premultiplication, so a text strip pixel that is just outside the glyph ends up
being (0,0,0,0) which under bilinear filtering sneaks in a dark color into the
glyph edge.

Example images in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/121652
2024-05-10 17:46:04 +02:00
Falk David
2fb752b168 Refactor: GPv3: Return 0 from get_frame_duration_at for implicitly held frames
This function returned the duration in frames for a keyframe, but
for keyframes that are implicitly held until the next keyframe,
it makes more sense to return 0.
For `insert_frame` a duration of 0 also creates an implicit hold
so this is more consistent with this API and removes a few checks
elsewhere.
2024-05-10 13:36:20 +02:00
Pratik Borhade
71157c998a Fix #121257: Only insert available not working for VSE transform
It is possible to exit early from `autokeyframe_property` when fcurve
is nullptr and `only_if_property_keyed` boolean is true. Pass status of
`AUTOKEY_FLAG_INSERTAVAILABLE` instead of "false" to only add keys in
existing channels when "only insert available" is enabled in
preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/121299
2024-05-09 13:39:18 +02:00
Harley Acheson
03cd8b359b UI: Edge Slide Status Display
While using Edge Slide show only changing values in the area header and
only keymap entries on the Status Bar

Pull Request: https://projects.blender.org/blender/blender/pulls/121585
2024-05-09 00:06:31 +02:00
Falk David
a3c9baacae Cleanup: GPv3: Remove drawing_index parameter from Layer::add_frame
This is part of #121565.
Since the function `Layer::add_frame` returns the `GreasePencilFrame`,
the `drawing_index` can be assigned after it's created.

This brings us a bit closer to the goal of only changing drawing indices
of frames in the internal API.
2024-05-08 15:41:21 +02:00
Campbell Barton
7456d716f4 Fix #120811: Loop cut crash with symmetry enabled
Resolve regression introduced in [0].

[0]: 7f1b70ac50
2024-05-07 17:02:03 +10:00
Christoph Lendenfeld
08de3fa0b6 Anim: extract constant variables out of sorting loop
No functional changes expected.

This PR extracts the `IndexRange` of the `BeztMap` span and its `size()` call out
of the sorting loop. Doing this removes one `if` condition within the loop and gives a
small performance boost.
(Before: 0.93ms, After: 0.65ms average run of `sort_time_beztmaps`)

Pull Request: https://projects.blender.org/blender/blender/pulls/121267
2024-04-30 15:14:49 +02:00
Christoph Lendenfeld
c6c7d3d8c4 Anim: Graph Editor - use Map to update TransInfo pointers instead of searching
This is a performance improvement when moving a bunch
of keys on the same `FCurve` in heavy scenes.

When moving keys in such a way that the `BezTriple` array of the FCurve
has to be sorted, the pointers of `TransInfo` also have to be  updated.
This used to happen by doing a nested loop over all `BeztMap` and all `TransData2D`.
There was a bit of optimization with the
`blender::Vector<bool> adjusted` which stored if a `TransData2D` has been fixed yet.
But in general the complexity was still `BeztMap.size() * TransData.size()`.

There are two optimizations that can be done here.
* Skip any BeztMap if `old_index == new_index`.
If the Key is not going to move any pointers to it will still be valid.
* Use a `Map<float *, int>` built beforehand to quickly get
the `TransData2D` that needs updating instead of searching.
The `int` in this case is the index to the `TransData2D` array.

Doing this reduces the complexity to `BeztMap.size() + TransData.size()`.

Measurements of `beztmap_to_data`
| - | Before | After |
| - | - | - |
| Moving 1 key of 1 FCurve | ~24000 ns | ~5800ns |
| Moving ~1000 keys of 1 FCurve | 17ms | 0.02ms |

Measurements of `remake_graph_transdata`
| - | Before | After |
| - | - | - |
| Moving 1 key of 279 FCurves | 290ms | 22ms |
| Moving ~300 keys of 279 FCurves | 82 **SECONDS** | 80ms |

Test file used
https://download.blender.org/ftp/sybren/animation-rigging/heavy_mocap_test.blend

The deeper technical explanation.
`TransInfo` has an array of `TransData`.
`TransData` has pointers to the float arrays of a `BezTriple`.
The `BezTriple` array is sorted by swapping data,
meaning the `TransData` will now point to the wrong data in the array.
This has to be updated and we can do that by using the `BeztMap`.
This is all under the assumption that `BeztMap` is sorted in the exact
same way as `BezTriple` otherwise this method will fail.
But by doing it the same way, we can know at which
index the `BezTriple` is before and after sorting.
Now we just need to find the corresponding `TransData`.
That can be done by comparing pointers. The `BeztMap` stores the
`BezTriple` it represents and from it we can
get the pointers to its `vec` 0, 1 and 2. (key and handles)

Pull Request: https://projects.blender.org/blender/blender/pulls/120816
2024-04-30 10:46:48 +02:00
Christoph Lendenfeld
8b852f2ac2 Refactor: rename beztmap_to_data
No functional changes.

This just renames the function `beztmap_to_data` to
`update_transdata_bezt_pointers` to better represent what it is doing.

Pull Request: https://projects.blender.org/blender/blender/pulls/121125
2024-04-26 14:06:42 +02:00
Laurynas Duburas
12df5a68ba Curves: support transforming Bezier handles in edit mode
Allows user to transform Bezier handles.

Pull Request: https://projects.blender.org/blender/blender/pulls/120222
2024-04-26 09:32:26 +02:00
Christoph Lendenfeld
c464426475 Refactor: swap handle logic in Graph Editor transform code
This PR changes the `swap_handles` variable of the
`BeztMap` from `short` to `bool`.
The only reason it was a `short` was so that 0 could be
interpreted as "not checked" within the sorting loop.
Instead, I moved the checking for swapping to a separate loop.
That means the `BeztMap` array needs to be traversed one more time,
but given sorting might already do that multiple times that won't be
a performance issue
(plus we don't have the `if` within the sorting loop potentially messing up branch prediction).

In addition to that this PR also removes `prev_ipo` and
`current_ipo` from the `BeztMap` struct. Those were never used.

This is also partly a fix to restore 3.6 behavior.
With the move to C++, `swap_handles` was never initalized,
so the logic ` if (bezm->swap_handles == 0)` would always be false.
That resulted in the following behavior when
**rotating a bunch of keys 180deg** around their common center.

Pull Request: https://projects.blender.org/blender/blender/pulls/121076
2024-04-25 16:52:16 +02:00
Hans Goudey
ab3f05d3ec Cleanup: Move sculpt_transform.cc to C++ namespace 2024-04-24 08:19:57 -04:00
John Swenson
cff532e134 VSE: Implement Snapping to Markers
This patch adds the ability to snap strips to markers. Previously, there
only existed options to snap to hold offsets and the current frame.

This snap type works identically to other snapping options by checking
for the relevant bit (here `SEQ_SNAP_TO_MARKERS`) and adding the marker
frame numbers to `snap_data->target_snap_points` within
`seq_snap_target_points_build()`.

To enable `seq_get_snap_target_points_count()` to have access to marker
information, the current Scene object is now passed to the function.

Pull Request: https://projects.blender.org/blender/blender/pulls/120450
2024-04-23 01:54:14 +02:00
Laurynas Duburas
3d9519544d Transform: support properly transforming implicitly shared curves positions
The issue was that the transform code kept non-const pointers into the
position arrays of `CurvesGeometry` for an extended period if time and
changed the positions through those pointers. This is not safe, because
the underlying position array may become shared (e.g. with the
corresponding evaluated object), in which case it's not allowed to change
the position array anymore without making a copy.

Generally, the scope at which some code has multiple access to data
should be as small as possible to avoid this kind of issue.

The solution is to store the positions that are modified by the transform
code in a new array and to copy those back into the `CurvesGeometry`
in one go. This way, the program scope in which the positions may be
modified is more obvious and much smaller.

Pull Request: https://projects.blender.org/blender/blender/pulls/120824
2024-04-22 20:02:52 +02:00
Campbell Barton
fd589fdca4 Cleanup: various non functional C++ changes 2024-04-20 13:46:14 +10:00
Germano Cavalcante
f5f05c99c9 Fix: Snap with 'Backface Culling' skipping edges and vertices of faces in edit mode
After 1c77779160, the snap logic in Edit Mode became the same as in
Object Mode, so Backface Culling started to ignore edges and vertices
of faces seen from behind.
2024-04-19 09:47:49 -03:00
Germano Cavalcante
3fc29d8080 Fix #120239: Snap in edit mode is ignoring some self elements
Fix snapping issues caused by commit 1c77779160, where a mesh
representing the edited mesh was introduced.

Mesh snap to vertex now works in the following order:
- Snap to vertices of visible triangles
- Snap to vertices of loose edges
- Snap to loose vertices

The problem arises because in editing mode, faces whose vertices are
being transformed are ignored, marked as hidden in the snap, resulting
in the loss of some vertices in triangles.

The solution involves considering the edges and vertices of hidden
faces as loose elements since, despite being connected to faces, they
are still visible to snap. Two new types of BVHTree were created for
this purpose:

- BVHTREE_FROM_LOOSEVERTS_NO_HIDDEN
- BVHTREE_FROM_LOOSEEDGES_NO_HIDDEN

This modification addresses two related issues:
- snapping in edit mode to vertices and edges of a face being
  transformed
- snapping to mesh with hidden loose elements

Optionally, the first issue could be tackled separately by generating
BVHTrees within the snap system itself and storing them in a
`SnapCache_EditMesh *em_cache`, then passing this cache as a parameter
to the `snap_object_mesh` function.

Pull Request: https://projects.blender.org/blender/blender/pulls/120270
2024-04-18 16:48:19 +02:00
Germano Cavalcante
93e47ad9a8 Fix #120744: Shrink/Fatten Even with Alt not working
Continuation of 3d6bb6ce04

This 'alt' hotkey is captured in the modal map
`TFM_MODAL_PASSTHROUGH_NAVIGATE` in order to appear in the header.
But this modal map is not necessary.
2024-04-17 12:25:00 -03:00
Damien Picard
c306677119 I18n: extract and disambiguate a few messages
Extract
- Statuses for the external text editor
- Newly created enum node item
- Newly created plane track data
- Newly created custom orientation data
- Operator names in drag and drop menu (need to use operator's
  translation context)
- GN attribute statistic node inputs

Disambiguate
- Single-letter colors: A and B can mean Alpha and Blue, or simply A
  and B as in two operands in an operation
- Dissolve: issue reported by Tamar Mebonia in #43295
- Translate in the User Preferences. This introduces a new
  BLT_I18NCONTEXT_EDITOR_PREFERENCES ("Preferences") translation
  context
- Planar (reported by deathblood)
  This one is incomplete, because there is currently no way to
  disambiguate presets or GN fields. I don't see how either could be
  achieved cleanly.
  The former would need to define the context inside the preset and
  evaluate the file prior to showing it in the presets menu, which
  sound bad.
  The latter would need to introduce an additional string inside
  `FieldInput`s, which would be controversial given how little it
  would be used.

Remove
- Unused translation `iface_("%s")` in toolbar
- Remove obsolete N_() tags in a few node descriptions.

Pull Request: https://projects.blender.org/blender/blender/pulls/119065
2024-04-15 12:02:17 +02:00
Christoph Lendenfeld
fb22ee6f0c Refactor: BeztMap Array to C++ Vector
Instead of using `MEM_callocN` to create an array of `BeztMap`
use a `blender::Vector`. This has the advantage that we don't need to worry about
freeing the memory.
In addition to that it can be passed as a `Span`, removing the need to pass the
length as a separate argument.
Doing that also allows to use the C++ syntax for `for` loops.

This also gives a small performance boost
| Before | After |
| - | - |
| 288ms | 260ms |

Pull Request: https://projects.blender.org/blender/blender/pulls/120507
2024-04-11 11:47:15 +02:00
Amelie Fondevilla
d0d4bf2068 Fix #118509: GPv3: frames disappear during transform in the timeline
While selecting and transforming multiple grease pencil frames in the
timeline, frames would sometimes disappear. This happened when the
transformation overlapped, meaning when a frame replaced another moving
one in the timeline. The frames transformation was happening in place
and in series, and thus leaded to the initial position of the frame to
be removed, even if it was occupied by a freshly transformed framed.

This commit fixes the issue by storing two separate maps in the
transform data structure instead of one, one map to store the static
data, meaning the frames that are not affected by the transform, and
another one for the moving data, meaning the frames that are affected by
the transform.

Some changes were made to account for the potential duplication of the
frames (move + duplicate):
* the map of the duplicated frames was renamed to a more explicit name,
* when a duplication occurs, the original frame is stored in the static
  frames map, and the duplicate is stored in the moving frames map,
* thus the check for the duplicate flag of the operator is now done at
  the init step of the transform, instead of the update step, so that
  the maps are initialized accordingly.

Co-authored-by: Lukas Tönne <lukas@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/119337
2024-04-09 16:44:34 +02:00
Christoph Lendenfeld
8a79212031 Anim: thread remake_graph_transdata
On animations with high key counts, `remake_graph_transdata`
takes most of the compute time when moving keys.
This patch threads the loop over FCurves in that function to speed things up.

Test file with 10.000 keys per F-Curve
| - | Before | After |
| - | - | - |
| Moving 1 key of each FCurve |  ~2200ms | ~285ms |
| Moving a single key | ~0.70ms | ~0.72ms |

As demonstrated in the measurements, this speeds up the
case of modifying a lot of data, while not impacting the case
of modifying very little data.
The measurements were taken on an 8c/16t CPU.
The higher the thread count, the better the performance gain.

Measurements of `remake_graph_transdata` using the following test file.
https://download.blender.org/ftp/sybren/animation-rigging/heavy_mocap_test.blend

Pull Request: https://projects.blender.org/blender/blender/pulls/119497
2024-04-09 11:46:05 +02:00
Germano Cavalcante
727979c1a8 Fix #120366: Snap to Grid is affected by geometry occlusion
To maintain the previous and more useful behavior, disable the
occlusion test in the snap to gird.
2024-04-07 11:23:55 -03:00
Germano Cavalcante
115a925ffe Fix: Incremental snap not matching grid resolution
Caused by f0479e915f

`t->snap_spatial` is still required for Incremental snap.
2024-04-07 10:26:21 -03:00
Germano Cavalcante
1180a25c23 Fix #120245: Grid snap not working when constraining axis before moving
`sctx->grid.size` was only updated while the constraint was not
enabled.

This was causing division by zero.
2024-04-04 11:42:27 -03:00
Campbell Barton
7e9f7320e4 Cleanup: spelling in comments & comment blocks 2024-04-04 11:26:28 +11:00
Campbell Barton
52ce8d408f Cleanup: use const arguments & variables 2024-04-04 10:55:10 +11:00
Hans Goudey
935666a622 Fix #120104: Snap ignores evaluated geometry bounds
Previously the bounds were accessed on the original object.
That used to implicitly get the evaluated geometry's bounds,
but now that is an explicit choice.
2024-04-01 11:01:19 -04:00
Germano Cavalcante
ea3f938c07 Fix #120109: Grid snap crash when locking axis before base selection
The functionality of snap with constraints relies on the position of
the transformed object.

Previously, snap to grid with constraints was restricted to the Move
operation.
Consequently, the 'Set Snap Base' mode, as well as other transformation
modes, failed to compute the moved position.
As a result, it lacked support for snap to grid with constraints and
would even crash under such circumstances.

The solution involves eliminating the reliance on the Move operator and
instead calculating the position based on mouse position.
2024-04-01 11:22:03 -03:00