Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-09-21 00:31:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-21 01:11:50 +0300
commit08c7733c1393d200513983d9b895ef8e92110591 (patch)
tree72dc2b3621fd2ab41f5879d02d0bdae78533c7f9 /release/scripts/startup
parentfb88088203ec478f4c06bd4b755d47492246759d (diff)
Cleanup: style
Diffstat (limited to 'release/scripts/startup')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_gpencil.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py29
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_material_gpencil.py6
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py7
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py4
6 files changed, 28 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index 5a8fe41a483..6c9caca4a7a 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -67,8 +67,6 @@ class DATA_PT_gpencil(DataButtonsPanel, Panel):
layout.template_ID(gpd_owner, "data")
-
-
class GPENCIL_MT_layer_specials(Menu):
bl_label = "Layer"
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 0cb8b4b5d6e..f5b95981d66 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -309,7 +309,7 @@ class GreasePencilAppearancePanel:
if gp_settings.gpencil_brush_type == 'FILL':
layout.prop(brush, "cursor_color_add", text="Color")
- elif ob.mode in ('GPENCIL_SCULPT', 'GPENCIL_WEIGHT'):
+ elif ob.mode in {'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}:
settings = context.tool_settings.gpencil_sculpt
brush = settings.brush
@@ -816,28 +816,31 @@ class GPENCIL_UL_layer(UIList):
layout.active = False
row = layout.row(align=True)
- if gpl.is_parented:
- icon = 'BONE_DATA'
- else:
- icon = 'BLANK1'
-
- row.label(text="", icon=icon)
+ row.label(
+ text="",
+ icon='BONE_DATA' if gpl.is_parented else 'BLANK1',
+ )
row.prop(gpl, "info", text="", emboss=False)
row = layout.row(align=True)
row.prop(gpl, "lock", text="", emboss=False)
row.prop(gpl, "hide", text="", emboss=False)
row.prop(gpl, "unlock_color", text="", emboss=False)
- if gpl.use_onion_skinning is False:
- icon = 'GHOST_DISABLED'
- else:
- icon = 'GHOST_ENABLED'
subrow = row.row(align=True)
- subrow.prop(gpl, "use_onion_skinning", text="", icon=icon, emboss=False)
+ subrow.prop(
+ gpl,
+ "use_onion_skinning",
+ text="",
+ icon='GHOST_ENABLED' if gpl.use_onion_skinning else 'GHOST_DISABLED',
+ emboss=False,
+ )
subrow.active = gpd.use_onion_skinning
elif self.layout_type == 'GRID':
layout.alignment = 'CENTER'
- layout.label(text="", icon_value=icon)
+ layout.label(
+ text="",
+ icon_value=icon,
+ )
classes = (
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index d843387720d..4fa9a30dea5 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -173,7 +173,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
layout.separator()
if mat.use_nodes:
- panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', 'Surface')
+ panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', "Surface")
else:
layout.use_property_split = True
layout.prop(mat, "diffuse_color", text="Base Color")
@@ -199,7 +199,7 @@ class EEVEE_MATERIAL_PT_volume(MaterialButtonsPanel, Panel):
mat = context.material
- panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', 'Volume')
+ panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', "Volume")
class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index 32da822629e..1294d0f8d85 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -231,19 +231,19 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
if gpcolor.fill_style != 'TEXTURE':
col.prop(gpcolor, "fill_color", text="Color")
- if gpcolor.fill_style in ('GRADIENT', 'CHESSBOARD'):
+ if gpcolor.fill_style in {'GRADIENT', 'CHESSBOARD'}:
col.prop(gpcolor, "mix_color", text="Secondary Color")
if gpcolor.fill_style == 'GRADIENT':
col.prop(gpcolor, "mix_factor", text="Mix Factor", slider=True)
- if gpcolor.fill_style in ('GRADIENT', 'CHESSBOARD'):
+ if gpcolor.fill_style in {'GRADIENT', 'CHESSBOARD'}:
col.prop(gpcolor, "flip", text="Flip Colors")
col.prop(gpcolor, "pattern_shift", text="Location")
col.prop(gpcolor, "pattern_scale", text="Scale")
- if gpcolor.gradient_type == 'RADIAL' and gpcolor.fill_style not in ('SOLID', 'CHESSBOARD'):
+ if gpcolor.gradient_type == 'RADIAL' and gpcolor.fill_style not in {'SOLID', 'CHESSBOARD'}:
col.prop(gpcolor, "pattern_radius", text="Radius")
else:
if gpcolor.fill_style != 'SOLID':
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 54498abfc7c..fcda2f0c1a7 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -23,6 +23,7 @@ from .properties_grease_pencil_common import (
GPENCIL_UL_layer,
)
+
class TOPBAR_HT_upper_bar(Header):
bl_space_type = 'TOPBAR'
@@ -188,17 +189,17 @@ class TOPBAR_HT_lower_bar(Header):
layout.label(text="Layer:")
layout.popover(
panel="TOPBAR_PT_gpencil_layers",
- text=txt
+ text=txt,
)
layout.prop(context.tool_settings, "use_gpencil_draw_onback", text="", icon='ORTHO')
layout.prop(context.tool_settings, "add_gpencil_weight_data", text="", icon='WPAINT_HLT')
layout.prop(context.tool_settings, "use_gpencil_additive_drawing", text="", icon='FREEZE')
- elif mode in ('GPENCIL_EDIT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'):
+ elif mode in {'GPENCIL_EDIT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}:
layout.label(text="Layer:")
layout.popover(
panel="TOPBAR_PT_gpencil_layers",
- text=txt
+ text=txt,
)
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 035f08507f9..300cc2154b1 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -536,7 +536,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
col.separator()
col.operator("image.save_dirty", text="Save All Images")
- ### Add Texture paint UVs/slots
+ # Add Texture paint UVs/slots
if settings.missing_uvs:
col.separator()
col.label(text="No UVs available", icon='INFO')
@@ -575,6 +575,8 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
col.template_ID(settings, "stencil_image", new="image.new", open="image.open")
# TODO, move to space_view3d.py
+
+
class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Mask"