diff options
9 files changed, 34 insertions, 30 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" diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 9174b7bf588..011e2641089 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -822,11 +822,11 @@ void do_versions_after_linking_280(Main *bmain) for (int a = 0; a < nu->pntsu; a++, bezt++) { if ((old_count -= 3) < 0) { - memcpy(newptr, bezt->vec, sizeof(float[3*3])); + memcpy(newptr, bezt->vec, sizeof(float[3][3])); newptr[3][0] = bezt->alfa; } else { - memcpy(newptr, oldptr, sizeof(float[3*4])); + memcpy(newptr, oldptr, sizeof(float[3][4])); } newptr[3][1] = bezt->radius; @@ -838,7 +838,7 @@ void do_versions_after_linking_280(Main *bmain) else if (nu->bp) { BPoint *bp = nu->bp; - for (int a = 0; a < nu->pntsu*nu->pntsv; a++, bp++) { + for (int a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) { if (--old_count < 0) { copy_v3_v3(newptr[0], bp->vec); newptr[1][0] = bp->alfa; diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index 6a65f579053..9749038cee6 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -460,7 +460,7 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "GPENCIL_OT_editmode_toggle", TABKEY, KM_PRESS, 0, 0); /* select mode */ - kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_selectmode_toggle", ONEKEY, KM_PRESS,0 , 0); + kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_selectmode_toggle", ONEKEY, KM_PRESS, 0, 0); RNA_int_set(kmi->ptr, "mode", 0); kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_selectmode_toggle", TWOKEY, KM_PRESS, 0, 0); diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c index 3a9122297cd..a10fe22a7f2 100644 --- a/source/blender/python/gpu/gpu_py_shader.c +++ b/source/blender/python/gpu/gpu_py_shader.c @@ -340,8 +340,8 @@ static PyObject *bpygpu_shader_uniform_float( float value; if (!PyArg_ParseTuple( - args, "if:GPUShader.uniform_float", - &location, &value)) + args, "if:GPUShader.uniform_float", + &location, &value)) { return NULL; } |