Page MenuHome

Sculpt: Transform tool
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Sat, Sep 7, 9:49 PM.

Details

Summary

Transform tool from the sculpt branch
I removed the "move pivot only" option and I added scaling support.
This patch has some code copied from D5513 to make it work. All bugs related to viewport or shape key updates should be solved after merging that and rebasing.

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Mon, Sep 9, 7:58 PM

transform_convert_sculpt.c is not included in this patch.

This revision now requires changes to proceed.Mon, Sep 9, 7:58 PM

The code that's here seems generally fine, but didn't test due to the missing file.

source/blender/editors/sculpt_paint/sculpt.c
9568

paintSymmAreas -> PaintSymmetryAreas

  • Rebase
  • Add missing file
Pablo Dobarro (pablodp606) marked an inline comment as done.Mon, Sep 9, 11:51 PM
Pablo Dobarro (pablodp606) updated this revision to Diff 18019.
  • Fix naming
Brecht Van Lommel (brecht) requested changes to this revision.Tue, Sep 10, 11:12 AM
Brecht Van Lommel (brecht) added inline comments.
source/blender/editors/sculpt_paint/sculpt.c
8635
/home/brecht/dev/blender/source/blender/editors/sculpt_paint/sculpt.c: In function ‘sculpt_get_vertex_symm_area’:
/home/brecht/dev/blender/source/blender/editors/sculpt_paint/sculpt.c:8617:56: warning: unused parameter ‘ss’ [-Wunused-parameter]
 static char sculpt_get_vertex_symm_area(SculptSession *ss, float co[3], float pivot[3])
                                                        ^~
/home/brecht/dev/blender/source/blender/editors/sculpt_paint/sculpt.c:8617:79: warning: unused parameter ‘pivot’ [-Wunused-parameter]
 static char sculpt_get_vertex_symm_area(SculptSession *ss, float co[3], float pivot[3])
                                                                               ^~~~~
8718

The code here could use some comments explaining what the various steps do.

These are quite expensive operations to do for every vertex.

Is it possible to precompute a transfrom matrix for every symm_area value, and then use that?

This revision now requires changes to proceed.Tue, Sep 10, 11:12 AM
Pablo Dobarro (pablodp606) marked 2 inline comments as done.Tue, Sep 10, 5:31 PM
Pablo Dobarro (pablodp606) updated this revision to Diff 18052.
  • Precompute Symmetry Area matrices
  • Fix unused warning

Just one more comment, which I guess you can easily resolve and commit directly.

source/blender/editors/sculpt_paint/sculpt.c
8726–8728

If you multiply these 3 matrices together in advance, you only need to do a single matrix multiplication per vertex.

This revision is now accepted and ready to land.Tue, Sep 10, 5:42 PM
This revision was automatically updated to reflect the committed changes.