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
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
2021-08-18Fix T90718: Object selection toggle do not work inside edit modeGermano Cavalcante
The object was not deselected as it was expected that it would be activated. But this activation does not happen in edit mode.
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-03WM: don't store selection properties typically set in the key-mapCampbell Barton
While this was already the case for the most part some selection operators stored common settings for reuse such as "toggle", "extend" & "deselect". Disabling storing these settings for later execution as it means failure to set these options in the key-map re-uses the value of the shortcut that was last called. Skip saving these settings since this is a case where reusing them isn't helpful. Resolves T90275.
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-22Fix bone select failing with end-points outside the viewCampbell Barton
Apply the same fix for T32214 (edge-select failing) to bones which also failed when their end-points were outside of the view. - Add V3D_PROJ_TEST_CLIP_CONTENT support for edit & pose bone iterator and use for selection operators. - Remove unnecessarily complicated checks with pose-mode lasso tagging. - Correct error in pose-mode LassoSelectUserData.is_changed (currently harmless as it's not read back).
2021-06-22Cleanup: use early return for selection callbacksCampbell Barton
2021-06-21Refactor: Do not keep a copy of depth buffer in RegionView3DGermano Cavalcante
The depth cache (located in `RegionView3D::depths`) is used for quick and simple occlusion testing in: - particle selection, - "Draw Curve" operator and - "Interactive Light Track to Cursor" operator, However, keeping a texture buffer in cache is not a recommended practice. For displays with high resolution like 8k this represents something around 132MB. Also, currently, each call to `ED_view3d_depth_override` invalidates the depth cache. So that depth is never reused in multiple calls from an operator (this was not the case in blender 2.79). This commit allows to create a depth cache and release it in the same operator. Thus, the buffer is kept in cache for a short time, freeing up space. No functional changes.
2021-06-21Fix T32214: Wireframe edge select fails with verts behind the viewCampbell Barton
This resolves a long standing bug in edge selection (picking, circle, box & lasso). Now when one of the edges vertices fails to project into screen space, the edge is clipped by the viewport to calculate an on-screen location that can be used instead. This isn't default as it may be important for the on the screen location not to be clipped by the viewport.
2021-06-18Performance: Limit recounting during selection mode flushing.Jeroen Bakker
This patch ensures that selection mode flushing updates total selection counts internally. This reduces recounting when we are sure that the input total selection counts were up to date. For example for circle selection the total selection counts were correct. But during flushing the selection could have been changed and therefore the selection was always recounted. This increased the performance on selected system from 6.90 FPS to 8.25 FPS during circle selection operations. Before: {F10179981} After: {F10179982} Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11647
2021-04-08Add ability to get a selection list of bonesSebastian Parborg
This adds the ability to get a selection list for both edit mode bones and pose mode bones. To do this the selection menu list logic had to be reworked a bit. Before it only stored the names of objects. This might work will of objects, however as stated in the code, it might fail for linked objects (so multiple object can have the same name in some corner cases). For bones it is a very common occurance where you can have multiple armature that has the same bone names. So now it also stores the object and bone pointers for this case. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D10570 Fix T85796
2021-03-22Fix T86666: Lasso and Circle select tools selecting objects behind clip_minGermano Cavalcante
Although it works well in most cases, the algorithm to detect if a point is within the limits of the camera does not work well in othographic mode. This commit also adds the option `V3D_PROJ_TEST_CLIP_FAR` (currently unused). Differential Revision: https://developer.blender.org/D10771
2021-03-08Cleanup: use ofs instead of offs as an abbreviation for offsetCampbell Barton
Used for local structs/variables, since `ofs` is by far the most widely used abbreviation.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2021-01-05Cleanup: typos (repeated words)Campbell Barton
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923
2020-12-11Fix T82881: Paint mask 'deselect on nothing' missed viewport updatePhilipp Oeser
Was failing for weightpaint and vertexpaint. Selection flags were actually changed, but the update in the viewport wasnt immediate, leading to confusion when the update happened later (e.g. when using the weight gradient tool as done in the report). We need to tag ID_RECALC_SELECT and send ND_SELECT notifier here. This could be done explicitly, but there is also existing functionality available that does this. Note: the way updates happen for paintfaces vs. paintverts looks a bit inconsistent (so this could be part of a later cleanup commit) Maniphest Tasks: T82881 Differential Revision: https://developer.blender.org/D9631
2020-10-19Spelling: MiscellaneousHarley Acheson
Corrects 34 miscellaneous misspelled words. Differential Revision: https://developer.blender.org/D9248 Reviewed by Campbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-09-16Cleanup: use uint8_t for various flags in curvesJacques Lucke
Previously, it was kind of a mess. In different places it was using `char`, `short` and `int`. The changed properties are flags that are operated upon using bit operations. Therefore, the integer type should be unsigned. Since we only use 2 bits of these flags, `uint8_t` is large enough. Especially note the change I had to make in `RNA_define.h` to make this work. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8844
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-03Fix missing cursor changes with "Lock Object Modes" disabledJulian Eisel
Changing the active object would change the mode, but the necessary toolsystem update to change the cursor was not run. Steps to recreate were: * Duplicate default cube * Enter sculpt mode with one of the cubes * Disable Edit > Lock Object Modes * Select back-and-forth between the objects Same would happen with other modes.
2020-09-03Fix T63125: Gpencil: bones cannot be selected in weightpaint modePhilipp Oeser
Some underlying functionality was not ready for greasepencil: - BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist) - BKE_modifiers_is_deformed_by_armature - checks in drawing code - checks in (pose) selection code A couple of changes to make this work: - `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`) - `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) -- (now use new `OB_MODE_ALL_WEIGHT_PAINT`) - `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint` This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode) Reviewed By: campbellbarton Maniphest Tasks: T63125 Differential Revision: https://developer.blender.org/D8483
2020-08-28Merge branch 'blender-v2.90-release'Philipp Oeser
2020-08-28Fix T80182: Curve [Edit Mode] : Can't Deselect Control Point with Select BoxPhilipp Oeser
Caused by rB49f59092e7c8: Curves: Implement Handles for selected points only Changes from deselecting all were not considered as changes anymore. Maniphest Tasks: T80182 Differential Revision: https://developer.blender.org/D8744
2020-08-04Sculpt: Split Box Mask into its own operatorPablo Dobarro
Box mask is not a selection, so it should not be part of the select operator. This allows to add more sculpt mode specific functionality and properties and to share more code with the lasso mask operator in a later refactor. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8456
2020-08-04Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-04Fix T79503: Selecting edit-bones while holding Ctrl crashesCampbell Barton
2020-07-26Cleanup: GPU: Remove GPU_glew.h outside of GPU moduleClément Foucault
Remove use of GL* constants and types inside the codebase. There is still a few occurence to get rid of.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-03Cleanup: Editors/Space/View3D, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/space_view3d` module. No functional changes.
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-10Cleanup: remove unused MBALL_NOSEL flagCampbell Barton
2020-05-26Curves: Implement Handles for selected points onlyAntonio Vazquez
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves. I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel.. Reviewed By: fclem, #user_interface, billreynish, Severin Differential Revision: https://developer.blender.org/D7754
2020-05-06Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-06Fix T76445: Selecting an object no longer cycles past the activeCampbell Barton
In 2.79, selecting an object would cycle past the first object even if selection cycling wasn't in use. Restore this behavior as it wasn't intentionally removed and it's useful to be able to select an object behind the current active object.
2020-05-05Cleanup: use int instead of short for lasso array lengthCampbell Barton
There was no reason to use a short here, this was just a convention from existing code.
2020-05-04Cleanup: rename mcords to mcoordsCampbell Barton
- 'coords' is an abbreviation for coordinates, not 'cords'. - Rename 'moves' to 'coords_len'.
2020-05-04Cleanup: pass ARegion, View2D as constCampbell Barton
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-04-03Cleanup: bone cursor picking APICampbell Barton
There was one function to access both pose/edit bones, which returned a void pointer type. Split these into 3 functions which return EditBone, bPoseChannel or Bone types. Internally the logic is still shared, this just makes it clearer to callers which type is expected. Also use more conventional prefix for picking API: - ED_armature_pick_(ebone/pchan/bone) - ED_armature_pick_(ebone/pchan/bone)_from_selectbuffer
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-12Cleanup: spelling, clang-formatCampbell Barton