From 37229c911747115bdfa9bdf536ee0346fc80ae72 Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn <40325124+DoobesURU@users.noreply.github.com> Date: Wed, 25 Aug 2021 10:54:34 -0400 Subject: [PATCH] Apply suggestions from Hoikas' code review Puts in suggestions from Hoikas. Co-authored-by: Adam Johnson --- korman/operators/op_toolbox.py | 6 +++--- korman/properties/prop_material.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/korman/operators/op_toolbox.py b/korman/operators/op_toolbox.py index 827b6ad..9574d66 100644 --- a/korman/operators/op_toolbox.py +++ b/korman/operators/op_toolbox.py @@ -183,7 +183,7 @@ class PlasmaToggleDoubleSidedOperator(ToolboxOperator, bpy.types.Operator): def execute(self, context): enable = self.enable for mat in bpy.data.materials: - mat.plasma_mat.plasma_double_sided = enable + mat.plasma_material.double_sided = enable return {"FINISHED"} @@ -198,9 +198,9 @@ class PlasmaToggleDoubleSidedSelectOperator(ToolboxOperator, bpy.types.Operator) def execute(self, context): mat_list = [slot.material for slot in itertools.chain.from_iterable((i.material_slots for i in context.selected_objects)) if slot and slot.material] - enable = not all((mat.plasma_mat.plasma_double_sided for mat in mat_list)) + enable = not all((mat.plasma_material.double_sided for mat in mat_list)) for mat in mat_list: - mat.plasma_mat.plasma_double_sided = enable + mat.plasma_material.double_sided = enable return {"FINISHED"} diff --git a/korman/properties/prop_material.py b/korman/properties/prop_material.py index 7d82208..eeb742d 100644 --- a/korman/properties/prop_material.py +++ b/korman/properties/prop_material.py @@ -22,6 +22,6 @@ class PlasmaMaterial(bpy.types.PropertyGroup): bl_idname = "material.plasma_material" double_sided = BoolProperty(name="Double Sided", - description="Sets this material as double sided (formerly TWOSIDE)", - default=False) + description="Sets this material as double sided (formerly TWOSIDE)", + default=False)