Age | Commit message (Collapse) | Author |
|
Also add groups in some files.
|
|
Ref T92709
|
|
Error introduced in rB69d6222481b4 and partially fixed in rB24310441ddc8.
When gizmo was turned on but the scene has more than one 3D viewport, one of them the snap cursor did not appear.
|
|
The snap cursor continued to appear even when the workspace is changed for example.
So add the region to check in the cursor pool.
|
|
Avoid using underscore prefix since these typically mean the variable
shouldn't be accessed directly (it may be accessed from a macro,
or memory on the stack which is assigned to a pointer).
In this case a more meaningful name can be used for the argument
that was shadowed.
|
|
3 is a small amount as each viewport creates a gizmo that creates its own state
Now if the state is not created, the gizmos use the last state.
|
|
Use arrays for wmEvent coordinates, this quiets warnings with GCC11.
- `x, y` -> `xy`.
- `prevx, prevy` -> `prev_xy`.
- `prevclickx, prevclicky` -> `prev_click_xy`.
There is still some cleanup such as using `copy_v2_v2_int()`,
this can be done separately.
Reviewed By: campbellbarton, Severin
Ref D12901
|
|
|
|
Make the snap system consistent with the placement tool and leak-safe.
**Changes:**
- Store `SnapCursorDataIntern` in a `static` variable;
- Initialize (lazily) `SnapCursorDataIntern` only once (for the keymap).
- Move setup members of `V3DSnapCursorData` to a new struct `V3DSnapCursorState`
- Merge `ED_view3d_cursor_snap_activate_point` and `ED_view3d_cursor_snap_activate_plane` into `state = ED_view3d_cursor_snap_active()`
- Merge `ED_view3d_cursor_snap_deactivate_point` and `ED_view3d_cursor_snap_deactivate_plane` into `ED_view3d_cursor_snap_deactive(state)`
- Be sure to free the snap context when closing via `ED_view3d_cursor_snap_exit`
- Use RNA properties callbacks to update the properties of the `"Add Primitive Object"` operator
|
|
Move most of the gizmo snap and placement code to `view_cursor_snap.c`.
Simplify and extend the snap API.
Differential Revision: https://developer.blender.org/D12868
|
|
This is caused by removing `gizmo_cage2d_modal()` code in 482806c8167.
Some areas use cage gizmo to modify RNA properties without using
transform operator like area light, image empty, and compositor preview.
This functionality is implemented in code that was removed.
Add this code back.
Reviewed By: zeddb, campbellbarton
Differential Revision: https://developer.blender.org/D12859
|
|
|
|
|
|
Move runtime parameters out of context creation.
Not being able to choose another region and v3d limits the use of the
snap API.
|
|
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
|
|
Add a warning to quickly pinpoint the problem.
This would have simplified tracking down this problem in D12105.
|
|
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
|
|
Hack to bypass drag events, eventually the gizmo API
should support this use case without hacks.
|
|
|
|
|
|
gizmo_button2d_bounds result wasn't valid when the gizmo was part
of a 3D gizmo group.
Regression in cf6d17a6aa421e0038fc1f8e60e3f1f708887c3e
|
|
|
|
The Snap Gizmo now has options for occlusion, selection filter and edit
geometry.
It will be useful to implement in current tools.
|
|
This allows the addition of the `SNAP_GEOM_CAGE` option.
Currently unused.
|
|
Better distinction between modifier key events and mouse position events.
No functional changes.
|
|
Do not compare the x and y values of the mouse to check inversion.
Also remove "Lazy Initialization".
|
|
Comparison of event change has to be more specific and compare the x and y
values of the mouse as well.
|
|
The non-enabled gizmo was overwriting the projected coordinate value.
|
|
This simplifies the addition of future improvements.
Also make it more practical to expose as a parameter of gizmo for Python.
|
|
No functional changes.
This makes the `ED_gizmotypes_snap_3d_update` function more specialized.
|
|
As the Snap Gizmo properties are used as return of snapping values and
therefore updated with each change, use callbacks to get these values
through RNA properties.
Differential Revision: https://developer.blender.org/D8525
|
|
|
|
Remove redundant headers using
`./source/tools/utils_maintenance/code_clean.py`
Reviewed By: jmonteath
Ref D10364
|
|
Position Gizmo tooltips below their bounds so they do not obscure the content.
Differential Revision: https://developer.blender.org/D9793
Reviewed by Julian Eisel
|
|
This adds a "Snap to" option that allows using all the scenes snap
settings which includes incremental & absolute grid snapping options.
This is optional because always following scene snapping would not
snap to geometry by default (which seems to be the most useful default).
|
|
Now the gizmo is drawn only when the eventstate located in
`wm->winactive->eventstate` has not changed.
So it doesn't matter if it's "selected" or not.
This commit also removes the use of the private header "wm.h"
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D9539
|
|
toolshelf
`invert_snap` could be called before `snap_gizmo->keymap` was found.
Use the lazy initialization in `invert_snap` then.
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
|
|
|
|
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
|
|
This is a first step into removing uniforms from GPU_batch and Imm.
|
|
And a minor fix when there is no `USE_SNAP_DETECT_FROM_KEYMAP_HACK`.
|
|
|