From ae1a6e5fd3900f5d4c7059b406d6df9f9656b32a Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Sun, 2 Apr 2023 14:52:55 -0700 Subject: [PATCH] Fix flare creation broken by #367. --- korman/operators/op_mesh.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/korman/operators/op_mesh.py b/korman/operators/op_mesh.py index 3db0ab8..703a808 100644 --- a/korman/operators/op_mesh.py +++ b/korman/operators/op_mesh.py @@ -101,9 +101,9 @@ class PlasmaAddFlareOperator(PlasmaMeshOperator, bpy.types.Operator): # Create a textured Plane flare_plane = utils.BMeshObject(f"{self.name_stem}_Visible", managed=False) - flare_plane.hide_render = True - flare_plane.plasma_object.enabled = True - bpyscene.objects.active = flare_plane + flare_plane.object.hide_render = True + flare_plane.object.plasma_object.enabled = True + bpyscene.objects.active = flare_plane.object with flare_plane as bm: # Make the actual plane mesh, facing away from the empty bmesh.ops.create_grid(bm, size=(0.5 + self.flare_distance * 0.5), matrix=mathutils.Matrix.Rotation(math.radians(180.0), 4, 'X')) @@ -117,10 +117,10 @@ class PlasmaAddFlareOperator(PlasmaMeshOperator, bpy.types.Operator): # Create AUTOGEN_FLARE material and texture, setting No-Z-Write auto_mat = self.find_create_material() - flare_plane.data.materials.append(auto_mat) + flare_plane.object.data.materials.append(auto_mat) # Parent Plane to Empty - flare_plane.parent = flare_root + flare_plane.object.parent = flare_root def find_create_material(self): # If the selected flare material exists, use it