[Bf-blender-cvs] [6d07e148b12] sculpt-dev: Sculpt: fix bug with building paths for mapping curve inside the ui
Joseph Eagar
noreply at git.blender.org
Sun Oct 17 01:15:23 CEST 2021
Commit: 6d07e148b12908b5ef6a023cb47cc06bc050ff8e
Author: Joseph Eagar
Date: Sat Oct 16 16:14:35 2021 -0700
Branches: sculpt-dev
https://developer.blender.org/rB6d07e148b12908b5ef6a023cb47cc06bc050ff8e
Sculpt: fix bug with building paths for
mapping curve inside the ui
===================================================================
M release/scripts/startup/bl_ui/properties_paint_common.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index a6c28e7452c..b2eb671ffab 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -552,12 +552,17 @@ class UnifiedPaintPanel:
row2.prop(mp0, "ui_expanded", text="", icon="TRIA_DOWN" if mp.ui_expanded else "TRIA_RIGHT")
if mp0.ui_expanded:
- layout.template_curve_mapping(mp, "curve", brush=True)
+ #XXX why do I have to feed use_negative_slope as true here?
+ layout.template_curve_mapping(mp, "curve", brush=True, use_negative_slope=True)
col = layout.column(align=True)
row = col.row(align=True)
- path2 = path + ".mappings[\"%s\"].curve" % (mp.type)
+ if mp0.inherit or toolsettings_only:
+ path2 = path + ".mappings[\"%s\"].curve" % (mp.type)
+ else:
+ brushpath = "tool_settings.sculpt.brush.channels[\"%s\"]" % ch.idname
+ path2 = brushpath + ".mappings[\"%s\"].curve" % (mp.type)
shapes = ['SMOOTH', 'ROUND', 'ROOT', 'SHARP', 'LINE', 'MAX']
icons = ['SMOOTHCURVE', 'SPHERECURVE', 'ROOTCURVE', 'SHARPCURVE', 'LINCURVE', 'NOCURVE']
@@ -1012,7 +1017,7 @@ class FalloffPanel(BrushPanel):
row.prop(brush, "curve_preset", text="")
if brush.curve_preset == 'CUSTOM':
- layout.template_curve_mapping(brush, "curve", brush=True)
+ layout.template_curve_mapping(brush, "curve", brush=True, use_negative_slope=False)
col = layout.column(align=True)
row = col.row(align=True)
More information about the Bf-blender-cvs
mailing list