Commit Graph

11 Commits

Author SHA1 Message Date
cfd7b4d1cd BLI: New 'BLI_array_iter_spiral_square'
No functional changes.

This function replaces some of the logic in
`DRW_select_buffer_find_nearest_to_point` that traverses a buffer in a
spiral way to search for a closer pixel (not the closest).

Differential Revision: https://developer.blender.org/D10548
2021-03-09 16:03:56 -03:00
89c79c3ed8 Cleanup: Abbreviate enums with 'UNSIGNED_' in the name 2021-02-17 12:38:21 -03:00
9d412a92f5 Cleanup: incorrect spelling of 'manhattan' 2020-07-28 22:06:44 +10:00
8084b7e6e2 Cleanup: GPU: Replace all glReadPixels by GPU equivalent 2020-07-16 18:01:44 +02:00
4b96f47831 Docs: correct invalid doxygen params & references 2020-06-27 15:43:20 +10:00
b2ee1770d4 Cleanup: Rename ARegion variables from ar to region
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.
2020-03-06 17:19:23 +01:00
c48d1d54f1 Select Engine: Move some private members out of select context 2019-08-20 11:36:36 -03:00
0f79c346c6 Fix check that validates a selection index 2019-08-15 17:08:38 -03:00
4d320f4313 Edit Mesh Selection: Refactor: Redraw idmap buffer at runtime with only objects inside the rect
But in the future the selection code may also be used in object mode (eg for snapping).
So to avoid using too much VRAM resources, it is good to avoid drawing all objects in the viewport.

The solution was to create an array with only objects that are detected within the selection area.
If the selection operator is modal, objects already detected are not removed from the array until view3d is moved or orbited.
To detect the object, its BoundBox is tested.
Since the Select Engine does not have a dedicated depth texture, whenever a new object is "found" the depth of the objects in the array already drawn is redrawn.

Reviewers: campbellbarton, fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5435
2019-08-15 10:31:54 -03:00
b5f5f6e319 Cleanup: rename BaseOffset to ObjectOffsets 2019-08-12 12:29:38 -03:00
44d95cbf95 Cleanup: DRW manager: Move select_buffer.c utilities out of the selection engine internals 2019-08-12 12:10:44 -03:00