Grab active vertex snaps the maximum strength of the grab brush to the highlighted active vertex, making it easier to manipulate low poly models or meshes with subdivision surfaces.
In the sculpt-branch this also enables the dynamic mesh preview. It works by generating a list of connected vertices from the active vertex and drawing them from the cursor drawing code using OpenGL lines. If that way of doing the preview is ok, I can include it as part of this patch. If there is a better way to do it's better to wait for 2.82.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- sculpt-grab-active-vertex (branched from master)
- Build Status
Buildable 4823 Build 4823: arc lint + arc unit
Event Timeline
These small changes seem fine to me. However I do miss the wire frame preview as it would be a good way to indicate that this works differently than without this option on.
@Clément Foucault (fclem) @Jeroen Bakker (jbakker) what do you think about the proposed OpenGL drawing here?
The functionality in this patch seems fine.
Would be convenient if you added the OpenGL drawing to this patch for review too.
- Dynamic Mesh Preview
I added the dynamic mesh preview code to this patch as it is meant to be used with modifiers and grab active vertex. If you think that this should be done in a different way I can remove it and commit the original patch.
It is enabled automatically when grab active vertex is enabled and there are modifiers in the SculptSession.
Immediate mode for drawing geometry doesn't have great performance. But since this is not meant to draw the entire mesh and only for a specific tool, I think this is fine.
| source/blender/editors/sculpt_paint/paint_cursor.c | ||
|---|---|---|
| 1191 | Use GPU_matrix_push(), GPU_matrix_mul(obmat), GPU_matrix_pop() so this matrix multiplication can happen on the GPU. | |