UI: use keyword arguments
Prepare for keyword only args.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user