diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-11 07:18:14 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-11 07:21:30 +0300 |
commit | d2222d5b2cac203f4ddaae5c99b96701587231e7 (patch) | |
tree | 014e61e54c579bda925b7843cb6460a20b30a611 /release/scripts/startup/bl_ui/properties_data_curve.py | |
parent | 8cc5483331d1a3d5c6eba055ae303788ba843526 (diff) |
RNA: use a function to access the nurbs error message
It makes more sense to use a function in this case as this
creates an error message which is not data associated with
the NURBS curve.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_curve.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_curve.py | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 2ad6e5bae8a..d6e21053e3b 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -321,17 +321,16 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel): layout.prop(act_spline, "use_smooth") if act_spline.type == 'NURBS': - messages = [act_spline.valid_message_u] - if is_surf and act_spline.point_count_v > 1: - messages.append(act_spline.valid_message_v) - - messages = list(filter(None, messages)) - - if len(messages) > 0: - layout.separator() - col = layout.column(align=True) - for message in messages: - col.label(text=message, icon='INFO') + col = None + for direction in range(2): + message = act_spline.valid_message(direction) + if not message: + continue + if col is None: + layout.separator() + col = layout.column(align=True) + col.label(text=message, icon='INFO') + del col class DATA_PT_font(CurveButtonsPanelText, Panel): |