Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-10Cleanup: Clang tidyHans Goudey
2022-06-02Fix T98552: Experimental Tweak Select: Curve handle tweak is difficultCampbell Barton
When this preference is enabled, use selection behavior matching the graph editor. We may want to make this default (see T98552).
2022-05-13Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-13Fix T89909: Circle Select tool status bar doesn't match the operationsCampbell Barton
Assign get_name functions for select picking and circle select so modifier keys show the result of holding the modifiers.
2022-05-04Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-04Fix T95165: Custom Normals tools dont update immediately.Jeroen Bakker
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.
2022-05-04Docs: add doc-string for ED_view3d_viewcontext_init_objectCampbell Barton
2022-04-14View 3D: disable object mode selection cycling on first-clickCampbell Barton
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.
2022-04-04Cleanup: pass selection threshold to curve pickingCampbell Barton
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.
2022-03-30Cleanup: use utility function to initialize SelectPick_ParamsCampbell Barton
2022-03-30Keymap: "Mouse Select & Move" now uses click to de-select othersCampbell Barton
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.
2022-03-243D View: preference to disable selection cycling on first clickCampbell Barton
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.
2022-03-24Keymap: experimental preference always use "Mouse Select & Move"Campbell Barton
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.
2022-03-24Cleanup: localize finding the nearest non-active object on selectionCampbell Barton
Move this into it's own block since it only needs to run if the nearest object is currently selected & active.
2022-03-24View 3D: Don't prioritize pose objects unless in pose-modeCampbell Barton
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.
2022-03-243D View: order by depth when selecting cycles through objectsCampbell Barton
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.
2022-03-23Fix outliner/selection updates when selecting in the 3D viewCampbell Barton
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.
2022-03-23Cleanup: various improvements to ed_object_select_pickCampbell Barton
- 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.
2022-03-22Cleanup: remove unused code from ed_object_select_pickCampbell Barton
- 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.
2022-03-22Cleanup: refactor 3D view selection picking to early exit for menusCampbell Barton
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.
2022-03-22Cleanup: de-duplicate object-mode locking when selectingCampbell Barton
2022-03-22Fix pose-selection from menu not activating the objectCampbell Barton
Unlike the regression from T96663 selecting pose bones from menus never activated the object.
2022-03-22Fix T96663: Selecting a pose-bone doesn't activate the objectCampbell Barton
Regression in [0] that removed object selection changes while remaining in pose-mode. This unintentionally removed object activation. [0]: 859c062a2a3083f53d801fce4b722dcc52482e7e
2022-03-22Fix pose-bone menu selecting before activating the menuCampbell Barton
Regression in 1d88aeb95fc40771be7ef3a835af4206c845aa9b.
2022-03-22Cleanup: variable names for menu selectionCampbell Barton
- 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.
2022-03-17View 3D: scale object center selection penalty by the pixel sizeCampbell Barton
All screen-space UI thresholds should scale by the interface scale.
2022-03-17Fix unintended de-selection when selecting the object centerCampbell Barton
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
2022-03-17View 3D: the select operator now uses the cancel flag on failureCampbell Barton
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).
2022-03-17View 3D: multi-object pose selection no longer de-selects objectsCampbell Barton
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.).
2022-03-17Cleanup: simplify logic for skipping object selectionCampbell Barton
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.
2022-03-17Cleanup: minor clarifications to comments & use const variablesCampbell Barton
2022-03-17Fix 3D view movie-clip track selectionCampbell Barton
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.
2022-03-17Cleanup: split movie clip track selection into it's own functionCampbell Barton
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.
2022-03-17View 3D: support for select passthrough when picking selected itemsCampbell Barton
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.
2022-03-16Fix error with pose & deselect_all with 5e5285baf621a0c225cb5fc06fceCampbell Barton
2022-03-16Cleanup: incorrect comments, use C commentsCampbell Barton
2022-03-16Cleanup: rename variables in view3d_select_execCampbell Barton
- 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.
2022-03-16View 3D: move picking arguments into a struct & minor refactorCampbell Barton
- 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.
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
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.
2022-02-18Cleanup: Rename original curve object type enumHans Goudey
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
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2022-01-31Cleanup: use struct for GPU the select bufferCampbell Barton
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).
2022-01-06Cleanup: spelling in commentsCampbell Barton
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-12-03Cleanup: Remove unused codeHans Goudey
This is very old and is unlikely to be useful in the near future.
2021-10-27WM: de-duplicate cursor motion checks for selection pickingCampbell Barton
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.
2021-09-23Cleanup: spelling in commentsCampbell Barton
2021-09-21WM: only return PASS_THROUGH on PRESS for selection operatorsCampbell Barton
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.
2021-09-17UI: enable the depend-on-cursor flag for some operatorsCampbell Barton
- Bend (Transform). - Extrude to Cursor. - Lasso Select (related operators such as node-cut links, mask.. etc). - Rip Mesh / UV's. - Vertex/Edge Slide.
2021-09-08Asset: Dropping Material assets on material slot under mouse cursor.Jeroen Bakker
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