fix python script error

This commit is contained in:
Joseph Eagar 2021-09-24 02:44:13 -07:00
parent b7c1d58f9c
commit 23f952d7d7
1 changed files with 3 additions and 2 deletions

View File

@ -126,7 +126,6 @@ class UnifiedPaintPanel:
return None
@staticmethod
def get_channel(context, brush, prop_name, toolsettings_only=False):
ch = brush.channels.channels[prop_name]
@ -138,6 +137,7 @@ class UnifiedPaintPanel:
return ch
@staticmethod
def get_channel_value(context, brush, prop_name, toolsettings_only=False):
ch = brush.channels.channels[prop_name]
@ -162,13 +162,14 @@ class UnifiedPaintPanel:
elif ch.type == "CURVE":
return ch.curve
@staticmethod
def channel_unified(layout, context, brush, prop_name, icon='NONE', pressure=True, text=None,
slider=False, header=False, show_reorder=False, expand=None, toolsettings_only=False, ui_editing=True):
""" Generalized way of adding brush options to the UI,
along with their pen pressure setting and global toggle, if they exist. """
if context.mode != "SCULPT":
return self.prop_unified(layout, context, brush, prop_name, icon=icon, text=text, slider=slider, header=header, expand=expand)
return UnifiedPaintPanel.prop_unified(layout, context, brush, prop_name, icon=icon, text=text, slider=slider, header=header, expand=expand)
if prop_name == "size":
prop_name = "radius"