Page MenuHome

Move all `ED_select_buffer_utils` functions to `DRW_engine`
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Mon, Aug 5, 3:49 PM.

Details

Summary

It is easier to deal with private values and gives room for improvement.

The ED_select_buffer_bitmap_from_poly function has not been moved because it is very specific.

Diff Detail

Repository
rB Blender

Event Timeline

  • Move all utilities from ED_buffer_utils to` DRW_engine`.
Germano Cavalcante (mano-wii) retitled this revision from Select utils refactor: remove lagacy `ED_view3d_select_id_read_rect` to Move all utilities from `ED_select_buffer_utils` to` DRW_engine`.Tue, Aug 6, 1:30 AM
Germano Cavalcante (mano-wii) edited the summary of this revision. (Show Details)
Germano Cavalcante (mano-wii) retitled this revision from Move all utilities from `ED_select_buffer_utils` to` DRW_engine` to Move all `ED_select_buffer_utils` functions to `DRW_engine`.Tue, Aug 6, 12:54 PM
  • Cleanup: Rearrange doxy sections
  • Clenaup: rename variables and update comments
  • Cleanup: Doxy sections
  • Fix stupid mistake with the bitmap size

Minor suggested changes, otherwise LGTM.

source/blender/draw/DRW_engine.h
179–191

Think we could have a new toplevel API for these, eg DRW_select_id.h

source/blender/draw/engines/select/select_public_api.c
1 ↗(On Diff #16895)

Would just call select_id.c or select_id_api.c, this adds new naming convention we don't use anywhere else, implies that files not containing word *public* are internal, which isn't the case.

source/blender/editors/space_view3d/view3d_select.c
795–845

Why not make this part of the select API? - As it was previously.

This view select file is already quite huge & this seems like it fits better as an API function.

This revision is now accepted and ready to land.Wed, Aug 7, 1:45 PM
  • Add new toplevel head
  • Move ED_select_buffer_bitmap_from_poly
  • naming conventions
Germano Cavalcante (mano-wii) marked 3 inline comments as done.

Since now we have changes in the DRW_manager structure I thought it best to add @Clément Foucault (fclem) as a reviewer.

source/blender/draw/DRW_engine.h
179–191

As decided in blender_chat we now have DRW_select_buffer.h

Germano Cavalcante (mano-wii) marked an inline comment as done.Wed, Aug 7, 4:28 PM
  • DRW_SELECT_H -> DRW_SELECT_BUFFER_H