Page MenuHome

Sculpt: Grab active vertex

Authored by Pablo Dobarro (pablodp606) on Sun, Sep 1, 12:45 AM.



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.

Diff Detail

rB Blender

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.

This revision is now accepted and ready to land.Fri, Sep 6, 4:59 PM

OpenGL part can also be a separate code review if you think the current implementation is usable without it, and then just commit this directly.


Missed before:

Grab active vertex -> Grab Active Vertex


strenght -> strength

  • 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.

Pablo Dobarro (pablodp606) marked 2 inline comments as done.Sat, Sep 7, 4:28 AM
Pablo Dobarro (pablodp606) updated this revision to Diff 17939.
  • Fix naming
Brecht Van Lommel (brecht) requested changes to this revision.Mon, Sep 9, 8:14 PM

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.


Use GPU_matrix_push(), GPU_matrix_mul(obmat), GPU_matrix_pop() so this matrix multiplication can happen on the GPU.

This revision now requires changes to proceed.Mon, Sep 9, 8:14 PM
Pablo Dobarro (pablodp606) marked an inline comment as done.Mon, Sep 9, 10:22 PM
Pablo Dobarro (pablodp606) updated this revision to Diff 18014.
  • Rebase
  • use GPU_matrix
This revision is now accepted and ready to land.Tue, Sep 10, 10:56 AM