[Bf-blender-cvs] [ea135f831e2] asset-browser-poselib: Cleanup: use ternary operator for icon argument

Campbell Barton noreply at git.blender.org
Sat Jun 5 18:03:03 CEST 2021


Commit: ea135f831e281de1215dbd92b8b45aa4bda94250
Author: Campbell Barton
Date:   Sat Jun 5 17:05:11 2021 +1000
Branches: asset-browser-poselib
https://developer.blender.org/rBea135f831e281de1215dbd92b8b45aa4bda94250

Cleanup: use ternary operator for icon argument

===================================================================

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

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 4ae3310e510..604509b99f9 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1456,11 +1456,12 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
             elif brush.gpencil_tool == 'FILL':
                 row = col.row(align=True)
                 row.prop(gp_settings, "fill_draw_mode", text="Boundary")
-                if gp_settings.show_fill_boundary:
-                    icon = 'HIDE_OFF'
-                else:
-                    icon = 'HIDE_ON'
-                row.prop(gp_settings, "show_fill_boundary", text="", icon=icon)
+                row.prop(
+                    gp_settings,
+                    "show_fill_boundary",
+                    icon='HIDE_OFF' if gp_settings.show_fill_boundary else 'HIDE_ON',
+                    text="",
+                )
 
                 col.separator()
                 row = col.row(align=True)
@@ -1469,12 +1470,12 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
                 col.separator()
                 row = col.row(align=True)
                 row.prop(gp_settings, "extend_stroke_factor")
-                if gp_settings.show_fill_extend:
-                    icon = 'HIDE_OFF'
-                else:
-                    icon = 'HIDE_ON'
-
-                row.prop(gp_settings, "show_fill_extend", text="", icon=icon)
+                row.prop(
+                    gp_settings,
+                    "show_fill_extend",
+                    icon='HIDE_OFF' if gp_settings.show_fill_extend else 'HIDE_ON',
+                    text="",
+                )
 
                 col.separator()
                 col.prop(gp_settings, "fill_leak", text="Leak Size")



More information about the Bf-blender-cvs mailing list