Age | Commit message (Collapse) | Author |
|
|
|
When this preference is enabled, use selection behavior matching the
graph editor. We may want to make this default (see T98552).
|
|
|
|
Assign get_name functions for select picking and circle select
so modifier keys show the result of holding the modifiers.
|
|
|
|
Recalc selection count at the end of the circle selection.
This was removed from circle selection as it became a performance
bottleneck, helas some operators rely on it.
|
|
|
|
Unlike regular selection cycling that is activated when clicking again
in the same location, object mode would cycle to another object
if the object that was selected happened to already be active.
This made it impossible to click-drag to tweak the active object
if there were other objects behind it as those would be activated first.
Resolves T96752.
|
|
Remove the extended version of ED_curve_editnurb_select_pick,
pass the size threshold directly to this function but as the distance in
pixels instead of a multiplier for ED_view3d_select_dist_px.
Using a multiplier is a less direct way to reference the threshold.
|
|
|
|
While it's useful for click-drag to leave the selection as-is
(when clicking on items that are already selected), it's useful
for a single click to de-select all other elements.
This also removes the need for the initial selection to set the object
as active since this is possible by clicking on it.
|
|
Object mode selection does a kind of cycling that excludes the active
selected object. This is separate from regular selection cycling which
is enabled when clicking multiple times without moving the cursor.
This has the down-side that clicking on an object to drag it always
selects the object behind it (in the case of overlapping objects).
Since object mode selection is fundamental functionality, this is
exposed as an experimental preference for user feedback & testing.
See T96752 for details.
|
|
This was already as a preference for the tweak tool,
this preference enables the option for all selection
in the 3D view & UV editor.
This extends on changes from T96544.
|
|
Move this into it's own block since it only needs to run if the
nearest object is currently selected & active.
|
|
Always prioritizing bones caused pose-objects to be selected in object
mode even if they were behind other objects.
Now prioritizing pose bones is limited to pose mode.
|
|
When cycling through objects select the nearest first
instead of using the order of object-bases in the view_layer.
This matches how pose selection works.
|
|
The checks for calling outliner flushing didn't account for
entering pose mode for the first time or that pose-bone selection
can also change the object selection.
Resolve by recording what changed and refresh accordingly.
Also de-duplicate calls to DEG_id_tag_update.
|
|
- Document parameters.
- Add code-comments.
- Remove some historic/unhelpful code-comments.
- Rename argument names that were ambiguous
(object was a boolean for e.g.).
- Move `gpu` picking into an allocated struct which is only
allocated & used when using GPU picking.
- Move variable declarations after menu picking has been handled.
|
|
- No need to store is_pose_mode, check the object_mode flag instead.
- Remove redundant pose-mode check which now skips object selection.
- Remove disabled grease pencil cursor toggling,
since I couldn't manage to reproduce a situation where the cursor
failed to update - also, as there are other places the active object
can change this would need a more general solution anyway.
|
|
Selecting that opens a menu is now returns early. Handling the menu
selection in-line made this function more difficult to follow.
Also split out selecting an object by it's center into it's own function.
|
|
|
|
Unlike the regression from T96663 selecting pose bones from menus
never activated the object.
|
|
Regression in [0] that removed object selection changes while remaining
in pose-mode. This unintentionally removed object activation.
[0]: 859c062a2a3083f53d801fce4b722dcc52482e7e
|
|
Regression in 1d88aeb95fc40771be7ef3a835af4206c845aa9b.
|
|
- Rename baseCount to bone_count, was copy-pasted from object code.
- Also rename baseCount to base_count for object selection,
following snake case naming conventions.
- Use int instead of short for counters, as there is no reason to use
short ints.
|
|
All screen-space UI thresholds should scale by the interface scale.
|
|
Selecting an object that was already active & selected would de-select
it when the cursor was over the objects center.
This was caused by [0] that added a check which assumed more than one
hits from GPU_select meant there were multiple objects to select from.
This is not necessarily the case since bones, camera tracks or the
objects own center can add additional hits.
Resolve by keeping track of the best hit with & without the
active-selected object, only using the non-active-selected if it's found.
[0] 1550573360241ef5be0839d2652e9e092f510b63
|
|
Needed so mapping selection to click doesn't pass the click event
through to setting the 3D cursor for e.g.
While this doesn't happen with the default key-map, setting selection
to LMB-click would set the 3D cursor as well (when the selection
fell through to nothing).
|
|
De-selecting objects meant that selecting a bone would de-select
all the other pose objects - making exiting & entering pose-mode
loose the current set of pose objects.
Match edit-mode behavior: avoid de-selecting objects in the current mode
(unless the action is explicitly performed in the outliner for e.g.).
|
|
Previously setting the 'basact' to NULL was done, but this wasn't
so simple to use with deselect_all which needs to check if there was
anything found at the cursor.
Add a 'handled' variable to differentiate this case, when set
don't attempt object selection.
|
|
|
|
While basic single track selection worked,
toggling and de-selection has been broken since at least 2.83.
Support SelectPick_Params with the exception of deselect_all
which doesn't make sense for tracks as de-selecting all objects
is expected in that case.
|
|
This was an involved operation to include inline,
making ed_object_select_pick more difficult to follow.
Prepare for track selection to properly support SelectPick_Params.
|
|
Currently this isn't used in the key-map, it will eventually
allow the 3D viewports tweak tool to match the behavior of other
editors that support tweaking a selection without first de-selecting
all other elements.
|
|
|
|
|
|
- Rename 'location' to 'mval', typically used for region cursor coords.
- Rename 'retval' to 'changed', typically used for operators
when their return value depends on a change being made.
|
|
- Add SelectPick_Params struct to make picking logic more
straightforward and easier to extend.
- Use `eSelectOp` instead of booleans (extend, deselect, toggle)
which were used to represent 4 states (which wasn't obvious).
- Handle deselect_all when pocking instead of view3d_select_exec,
de-duplicate de-selection which was already needed in when replacing
the selection in picking functions.
- Handle outliner update & notifiers in the picking functions
instead of view3d_select_exec.
- Fix particle select deselect_all option which did nothing.
|
|
Activating a gizmo used the windows eventstate which may have values
newer than the event used to activate the gizmo.
This meant transforms check for the key that activated transform
could be incorrect.
Support passing an event when calling operators to avoid this problem.
|
|
This commit renames enums related the "Curve" object type and ID type
to add `_LEGACY` to the end. The idea is to make our aspirations clearer
in the code and to avoid ambiguities between `CURVE` and `CURVES`.
Ref T95355
To summarize for the record, the plans are:
- In the short/medium term, replace the `Curve` object data type with
`Curves`
- In the longer term (no immediate plans), use a proper data block for
3D text and surfaces.
Differential Revision: https://developer.blender.org/D14114
|
|
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
|
|
GPU_select originally used GL_SELECT which defined the format for
storing the selection result.
Now this is no longer the case, define our own struct - making the code
easier to follow:
- Avoid having to deal with arrays in both `uint*` and `uint(*)[4]`
multiplying offsets by 4 in some cases & not others.
- No magic numbers for the offsets of depth & selection-ID.
- No need to allocate unused members to match GL_SELECT
(halving the buffer size).
|
|
|
|
Ref T92709
|
|
This is very old and is unlikely to be useful in the near future.
|
|
Replace local static mouse coordinate storage with a single function.
also resolve inconsistencies.
- Edit-mesh selection used equality check (ignoring `U.move_threshold`).
- Motion to clear tooltips checked the value without scaling by the DPI.
Also prevent the unlikely case of the previous motion check matching
a different area by resetting the value when the active region changes.
|
|
|
|
Some selection operators return (PASS_THROUGH & FINISHED) so the tweak
event isn't suppressed from the PRESS event having been handled.
This is now restricted to events with a PRESS action.
Without this, using CLICK for selection was passing the event through
which could run other actions unintentionally.
|
|
- Bend (Transform).
- Extrude to Cursor.
- Lasso Select (related operators such as node-cut links, mask.. etc).
- Rip Mesh / UV's.
- Vertex/Edge Slide.
|
|
This patch allows dropping material assets from material slot under the mouse
cursor. Before this change the material slot had to be hand-picked from the
properties panel.
For consistency it is chosen to do this in any shading mode as the tooltip shows
what is exactly going to happen during release.
The feature also works for other object types than Meshes as it uses the drawn surface on the
GPU to detect the material slots. Performance of this patch has been tested with AMD GCN3.0
cards and are very responsive.
Reviewed By: fclem, Severin
Differential Revision: https://developer.blender.org/D12190
|