Page MenuHome

Added Manual Brush Detail option to Dyntopo
ClosedPublic

Authored by Macelaru Tiberiu (ButcherTibi) on Jul 2 2018, 10:34 AM.

Details

Summary

User Level:
Changing the mesh topology on each stroke creates lag when sculpting,
this option only updates the topology when pressing flood fill.
You can achieve a similar effect by disabling Dyntopo when sculpting
then enabling Dyntopo and pressing flood fill to change topology,
but re-enabling Dyntopo takes time, this option is faster.
The resulting workflow using this option is similar to Zbrush,
where with Dynamesh enabled, pressing Add button to update the
topology.
Zbrush_Add

Code Changes:
This feature skips the do_symmetrical_brush_actions method in
sculpt.c when flag is set.
To make the Flood Fill and Sample Detail options work and not be
disabled, their poll method had to be updated to take into account
SCULPT_DYNTOPO_DETAIL_MANUAL flag.
In manual mode, Flood Fill and Sample Detail options use the
constant_detail to set the detail of the mesh.

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Jul 2 2018, 11:34 AM

Seems generally fine, just some minor nitpicks.

release/scripts/startup/bl_ui/space_view3d_toolbar.py
927

Use this:

if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}:
source/blender/editors/sculpt_paint/sculpt.c
4955

Use this:

if (sd->flags & (SCULPT_DYNTOPO_DETAIL_CONSTANT | SCULPT_DYNTOPO_DETAIL_MANUAL)) {
source/blender/makesrna/intern/rna_sculpt_paint.c
583

Explain in the description here that flood fill should be used to add detail.

This revision now requires changes to proceed.Jul 2 2018, 11:34 AM

Updated syntax to make it cleaner and shorter in sculpt.c and space_view3d_toolbar.py.
Changed tooltip to be more descriptive.

Macelaru Tiberiu (ButcherTibi) marked 3 inline comments as done.Jul 2 2018, 12:48 PM
This revision is now accepted and ready to land.Jul 2 2018, 6:13 PM
This revision was automatically updated to reflect the committed changes.