Page MenuHome

Sculpt brush curve presets
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Jul 29 2019, 9:21 PM.
Tags
None
Tokens
"Love" token, awarded by Artsolit."Yellow Medal" token, awarded by amonpaike."Manufacturing Defect?" token, awarded by Way."Love" token, awarded by JulienKaspar."Love" token, awarded by TheRedWaxPolice.

Details

Summary

This patch introduces the same presets that are used for proportional editing in the sculpt brush falloff menu. The user can select any of these presets or use the regular custom falloff curve. The presets are hardcoded formulas, so the falloff curve is not used when they are active.

This change improves the general feeling of the brushes and it is more convenient and simpler to use. The CUSTOM curve option should now be used in the case that an unusual deformation is needed, in other cases, the hardcoded curve presets should be the default.

The smooth curve presets is a must in the grab brush, as it fixes the deformation issue with the current custom curve setting. The user may try to adjust the deformation by tweaking the curve, but it is nearly impossible to replicate this desired behavior.

Other brushes that are included in the sculpt branch also rely on this as they need specific hardcoded falloffs to produce the desired effect.

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Jul 30 2019, 12:18 AM

From what I understand, mainly this gives a more accurate falloff than the bezier curve approximations of these functions. Which seems fine to me, I don't see much value in having these as presets of the curve rather than the actual functions.

Would it make sense to change behavior of brushes in all paint modes to this? It can be implemented in BKE_brush_curve_strength() rather than being sculpt specific. It would allow us to simplify code overall and remove the brush.curve_preset operator.

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

VIEW3D_MT_brush (the right click menu in sculpt mode) should be updated to use this curve_preset property.

source/blender/makesrna/intern/rna_brush.c
1569–1577

Could we use the same icons as proportional editing here?

Without seeing the resulting curve it's not immediately obvious what kind of shape you're selecting, the icons help with that.

This revision now requires changes to proceed.Jul 30 2019, 12:18 AM
  • Move presets to BKE, add icons
Pablo Dobarro (pablodp606) marked an inline comment as done.Jul 30 2019, 6:33 PM
Pablo Dobarro (pablodp606) added inline comments.
release/scripts/startup/bl_ui/space_view3d_toolbar.py
963

I added the property to the menu, but I'm not sure were it is being used. It is not appearing in the right click paint menu.

Way awarded a token.Jul 31 2019, 6:11 AM

Update image editor UI for curve presets

Looks good to go to master now. Be sure to include the changes from space_image.py that I added.

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

Seems this is a bug in the current right click menu, doesn't need to be fixed as part of this patch.

This revision is now accepted and ready to land.Jul 31 2019, 11:56 AM
This revision was automatically updated to reflect the committed changes.