Skip to content

Commit

Permalink
Apply suggestions from Hoikas' code review
Browse files Browse the repository at this point in the history
Puts in suggestions from Hoikas.

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
  • Loading branch information
DoobesURU and Hoikas committed May 28, 2022
1 parent f59d996 commit e2cc536
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions korman/operators/op_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}


Expand All @@ -198,9 +198,9 @@ def poll(cls, context):

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"}


Expand Down
4 changes: 2 additions & 2 deletions korman/properties/prop_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e2cc536

Please sign in to comment.