Page MenuHome

Curves editmode: show point selection
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 20 2022, 12:36 PM.

Details

Summary

Points cannot be selected atm in editmode, this patch just shows the
selection from sculptmode in editmode.

Since the selection in sculptmode is a float, a point is considered
selected as soon as the float selection is above 0.0f.

Implementation: this piggy-back on the existing drawing via
overlay_edit_curve_point.glsl which requires a "data" VBO which holds
flags for selection (next to others such as "active" - which we also
have to take care of later).

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Sep 20 2022, 12:36 PM
Philipp Oeser (lichtwerk) created this revision.

Eh, just noticed this needs to cover selection_curve_float as well, will update...

Philipp Oeser (lichtwerk) planned changes to this revision.Sep 20 2022, 12:58 PM

respect selection_curve_float as well

Hans Goudey (HooglyBoogly) accepted this revision.EditedSep 20 2022, 2:56 PM

Looks good to me, and it worked well in my test. Putting the data in the format the existing curve edit mode shader expects is fine to me, better than making something new at this point.

Two small comments inline, but I don't think they need more review iterations.

source/blender/draw/intern/draw_cache_impl_curves.cc
746–777

Better to split this into a separate function IMO, to mirror what's done with curves_batch_cache_ensure_procedural_pos.

source/blender/draw/intern/draw_curves_private.h
71

Could this have a more helpful name? There's a lot of "data" around here :P

This revision is now accepted and ready to land.Sep 20 2022, 2:56 PM
This revision was automatically updated to reflect the committed changes.