Modifiers: Vertex Weight Edit add invert curve falloff option

This commit adds the option to invert the resulting weights of the
falloff curve.

There is a workflow used by some to convert a texture mask into
vertex weights by using a custom curve and inverting the points.
This allows the same effect with a single click, and gives the modifier
more procedural functionality.

With minor UI tweaks by @mont29.

Differential Revision: https://developer.blender.org/D6899
This commit is contained in:
Cody Winchester
2020-03-24 17:48:46 +01:00
committed by Bastien Montagne
parent f3ea8cd608
commit 26ef4fa85e
4 changed files with 18 additions and 2 deletions

View File

@@ -1350,7 +1350,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.separator()
layout.prop(md, "falloff_type")
row = layout.row(align=True)
row.prop(md, "falloff_type")
row.prop(md, "invert_falloff", text="", icon='ARROW_LEFTRIGHT')
if md.falloff_type == 'CURVE':
layout.template_curve_mapping(md, "map_curve")