Age | Commit message (Collapse) | Author |
|
Some RNA structs, like operators or keymaps, are not allowed to have ID
pointer properties. now this check will ignore those, and report an
error message in the console.
Related to T82597.
Notes: While a bit more involved than rBf39fbb3e6046, this commit
remains fairly localized and non-intrusive.
It relies on some rather obscure and weird behaviors of our RNA code
though, a cleaner solution could be e.g. to add a tye to
`StructOrFunctionRNA`, so that we could properly 'rebuild' (re-cast) the
pointer to either `StructRNA` or `FunctionRNA` when needed in internal
code...
|
|
Line gesture use always the right side of the line as active (the area
of the mesh that is going to be modified) by default.
This adds the ability to change the active side when the line gesture is
active by pressing the F key.
This allows more freedom to position the line after starting the
gestures, as it won't be required to cancel the operation or undo if the
line was used in the wrong direction.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D9301
|
|
This means if a keymap item is set to ignore repeat events,
it may do so accidentally from this setting being copied.
|
|
Access as 2D array, loop forwards over the pointer since it's
more common and simpler to read.
|
|
17cb2a6da0c88 missed a break statement after a nested switch,
while it didn't cause a bug nesting switch doesn't read well
and is prone to errors like this.
Split modal-keymap checks into their own branch to avoid this happening,
also use matching event checks for all gesture operators.
|
|
This adds support for snapping for line gesture tool. It is implemented
in the modal keymap as Snap, which is a toggle (similar to how snapping
in the transform operator works).
Right now it snaps the angle of the line to 15 degree increments, which
is defined in code. This should be easy to expose in the UI in the future
if we need to.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D9115
|
|
I accidentally commited a file without saving it
|
|
This patch adds a modal key to move the selection box/lasso/line while
drawing it. It also sets "repeat": False on the animation playback key
to prevent accidental playback if the spacebar is released after the
mouse button.
Reviewed By: #user_interface, pablovazquez, Severin
Differential Revision: https://developer.blender.org/D9227
|
|
This adds a small gradient to the right side of the line to preview
which side of the mesh is going to be affected by the gesture operation.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D9106
|
|
|
|
This adds support for line gesture to SculptGestureContext and
implements a Mask Line tool, which affects everything to the right of a plane
defined by the straightline gesture.
For this to work, a new WM_gesture_straightline_oneshot_modal is needed
which only runs exec when the gesture is over.
Added as experimental as it does not have icon.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D8722
|
|
The operator's return was ignored by the gesture ops that always
returned `OPERATOR_FINISHED`.
This ends by adding a undo step that brings no change.
|
|
|
|
- 'coords' is an abbreviation for coordinates, not 'cords'.
- Rename 'moves' to 'coords_len'.
|
|
|
|
Both the MS headers and blender headers define the HKEY
which gives all kind of inclusion order issues.
This diff renames all *KEY constants to EVT_*KEY to resolve
this conflict.
Reviewed By: brecht , dfelinto
Differential Revision: http://developer.blender.org/D7164
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Part of https://developer.blender.org/T74429.
There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
|
|
Move redraw tagging to the gesture modal operator
to make sure this only runs when it's needed.
Caused by d591c8a350310, which tagged the region to redraw when the
gizmos were tagged to refresh, however they wont redraw when hidden.
Thanks to @jbakker for finding the root cause.
|
|
Prepare for adding extra logic on free (next).
|
|
|
|
Simplifies future changes to dragging checks and avoids
each check for drag using slightly different logic.
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
Needed for circle select to replace the current selection.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
- Key-map items properties now override tool-options
so modifier keys can have different behavior to the default action.
- Box & circle select now have `wait_for_input` properties
instead of detecting this based on selection options being set or not.
This relied on the key-map setting properties which may need to be
initialize from the tool settings.
|
|
|
|
See: T56648
|
|
Add tool options to control how select operates (add/sub/set/and/xor).
Note: edit mode armature select still needs to support all options,
this is complicated by how it handles partial end-point selection.
|
|
These no longer made much sense after regions were added, they just
duplicated state that was already in the regions.
|
|
`wm_operators.c` is near 5k LOC with lots of mixed functionality,
extract gesture callbacks since they aren't closely related.
|