[Bf-blender-cvs] [e1ec93ce759] blender2.8: UI: use keyword arguments

Campbell Barton noreply at git.blender.org
Tue Aug 28 05:48:43 CEST 2018


Commit: e1ec93ce7593c0bff6a942bde73d8e12b40f3d30
Author: Campbell Barton
Date:   Tue Aug 28 13:41:47 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBe1ec93ce7593c0bff6a942bde73d8e12b40f3d30

UI: use keyword arguments

Prepare for keyword only args.

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

M	intern/cycles/blender/addon/ui.py
M	release/scripts/startup/bl_ui/properties_data_lightprobe.py
M	release/scripts/startup/bl_ui/properties_particle.py
M	release/scripts/startup/bl_ui/properties_physics_common.py
M	release/scripts/startup/bl_ui/properties_render.py
M	release/scripts/startup/bl_ui/space_clip.py
M	release/scripts/startup/bl_ui/space_image.py
M	release/scripts/startup/bl_ui/space_sequencer.py
M	release/scripts/startup/bl_ui/space_toolsystem_common.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

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

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 096537331f1..76706a83e30 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -655,13 +655,13 @@ class CYCLES_RENDER_PT_filter(CyclesButtonsPanel, Panel):
         view_layer = context.view_layer
 
         col = layout.column()
-        col.prop(view_layer, "use_sky", "Use Environment")
-        col.prop(view_layer, "use_ao", "Use Ambient Occlusion")
-        col.prop(view_layer, "use_solid", "Use Surfaces")
-        col.prop(view_layer, "use_strand", "Use Hair")
+        col.prop(view_layer, "use_sky", text="Use Environment")
+        col.prop(view_layer, "use_ao", text="Use Ambient Occlusion")
+        col.prop(view_layer, "use_solid", text="Use Surfaces")
+        col.prop(view_layer, "use_strand", text="Use Hair")
         if with_freestyle:
             row = col.row()
-            row.prop(view_layer, "use_freestyle", "Use Freestyle")
+            row.prop(view_layer, "use_freestyle", text="Use Freestyle")
             row.active = rd.use_freestyle
 
 
diff --git a/release/scripts/startup/bl_ui/properties_data_lightprobe.py b/release/scripts/startup/bl_ui/properties_data_lightprobe.py
index 8720b549450..05be89d6264 100644
--- a/release/scripts/startup/bl_ui/properties_data_lightprobe.py
+++ b/release/scripts/startup/bl_ui/properties_data_lightprobe.py
@@ -65,7 +65,7 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel):
 
         if probe.type == 'GRID':
             col = layout.column()
-            col.prop(probe, "influence_distance", "Distance")
+            col.prop(probe, "influence_distance", text="Distance")
             col.prop(probe, "falloff")
             col.prop(probe, "intensity")
 
@@ -77,16 +77,16 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel):
 
         elif probe.type == 'PLANAR':
             col = layout.column()
-            col.prop(probe, "influence_distance", "Distance")
+            col.prop(probe, "influence_distance", text="Distance")
             col.prop(probe, "falloff")
         else:
             col = layout.column()
             col.prop(probe, "influence_type")
 
             if probe.influence_type == 'ELIPSOID':
-                col.prop(probe, "influence_distance", "Radius")
+                col.prop(probe, "influence_distance", text="Radius")
             else:
-                col.prop(probe, "influence_distance", "Size")
+                col.prop(probe, "influence_distance", text="Size")
 
             col.prop(probe, "falloff")
             col.prop(probe, "intensity")
@@ -101,9 +101,9 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel):
         if probe.type == 'GRID':
             col.separator()
             col.label(text="Visibility")
-            col.prop(probe, "visibility_buffer_bias", "Bias")
-            col.prop(probe, "visibility_bleed_bias", "Bleed Bias")
-            col.prop(probe, "visibility_blur", "Blur")
+            col.prop(probe, "visibility_buffer_bias", text="Bias")
+            col.prop(probe, "visibility_bleed_bias", text="Bleed Bias")
+            col.prop(probe, "visibility_blur", text="Blur")
 
         col.separator()
 
@@ -137,9 +137,9 @@ class DATA_PT_lightprobe_parallax(DataButtonsPanel, Panel):
         col.prop(probe, "parallax_type")
 
         if probe.parallax_type == 'ELIPSOID':
-            col.prop(probe, "parallax_distance", "Radius")
+            col.prop(probe, "parallax_distance", text="Radius")
         else:
-            col.prop(probe, "parallax_distance", "Size")
+            col.prop(probe, "parallax_distance", text="Size")
 
 
 class DATA_PT_lightprobe_display(DataButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index ae1f38f6985..ffc0c6830c6 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -1801,7 +1801,7 @@ class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel):
             sub.prop(part, "roughness_1_size", text="Size")
 
             sub = col.column(align=True)
-            sub.prop(part, "roughness_endpoint", "Endpoint")
+            sub.prop(part, "roughness_endpoint", text="Endpoint")
             sub.prop(part, "roughness_end_shape")
 
             sub = col.column(align=True)
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 06df096cfea..ff48197b8e2 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -194,7 +194,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
 
             subcol = col.column()
             subcol.active = cache.use_disk_cache
-            subcol.prop(cache, "use_library_path", "Use Lib Path")
+            subcol.prop(cache, "use_library_path", text="Use Lib Path")
 
             col = flow.column()
             col.active = cache.use_disk_cache
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index e63385625ce..6b8cbc55c08 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -401,7 +401,7 @@ class RENDER_UL_renderviews(UIList):
         view = item
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
             if view.name in {"left", "right"}:
-                layout.label(view.name, icon_value=icon + (not view.use))
+                layout.label(text=view.name, icon_value=icon + (not view.use))
             else:
                 layout.prop(view, "name", text="", index=index, icon_value=icon, emboss=False)
             layout.prop(view, "use", text="", index=index)
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index cb90f98e612..459fd4c5f48 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -842,7 +842,7 @@ class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
 
         col = layout.column(align=True)
         row = col.row(align=True)
-        row.prop(sc, "show_disabled", "Disabled")
+        row.prop(sc, "show_disabled", text="Disabled")
         row.prop(sc, "show_names", text="Info")
 
         row = col.row(align=True)
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index f2c6f4e1955..ef181d507c9 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -1068,7 +1068,7 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
 
         if brush.use_anchor:
             col.separator()
-            col.prop(brush, "use_edge_to_edge", "Edge To Edge")
+            col.prop(brush, "use_edge_to_edge", text="Edge To Edge")
 
         if brush.use_airbrush:
             col.separator()
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index aeff8c5ff67..57c7f7cac14 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -656,7 +656,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
             row.prop(strip, "use_only_boost")
 
         elif strip.type == 'SPEED':
-            layout.prop(strip, "use_default_fade", "Stretch to input strip length")
+            layout.prop(strip, "use_default_fade", text="Stretch to input strip length")
             if not strip.use_default_fade:
                 layout.prop(strip, "use_as_speed")
                 if strip.use_as_speed:
@@ -756,7 +756,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
         if strip.type == 'SPEED':
             col.prop(strip, "multiply_speed")
         elif strip.type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}:
-            col.prop(strip, "use_default_fade", "Default fade")
+            col.prop(strip, "use_default_fade", text="Default fade")
             if not strip.use_default_fade:
                 col.prop(strip, "effect_fader", text="Effect Fader")
         elif strip.type == 'GAUSSIAN_BLUR':
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 0209d15170d..727b0fd85b4 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -273,7 +273,7 @@ class ToolSelectPanelHelper:
         if space_type == 'VIEW_3D':
             if mode is None:
                 mode = context.mode
-            tool = context.workspace.tools.from_space_view3d_mode(mode, create)
+            tool = context.workspace.tools.from_space_view3d_mode(mode, create=create)
             if tool is not None:
                 tool.refresh_from_context()
                 return tool
@@ -284,7 +284,7 @@ class ToolSelectPanelHelper:
                     mode = 'VIEW'
                 else:
                     mode = space_data.mode
-            tool = context.workspace.tools.from_space_image_mode(mode, create)
+            tool = context.workspace.tools.from_space_image_mode(mode, create=create)
             if tool is not None:
                 tool.refresh_from_context()
                 return tool
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 5d256d1c0d9..25c7ff8cac7 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -788,7 +788,7 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
 
         if brush.use_anchor:
             col.separator()
-            col.prop(brush, "use_edge_to_edge", "Edge To Edge")
+            col.prop(brush, "use_edge_to_edge", text="Edge To Edge")
 
         if brush.use_airbrush:
             col.separator()



More information about the Bf-blender-cvs mailing list