From 9bd3dba4f2526a047ea5ebc3e5473cc813b2d9e3 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 13 Feb 2020 17:08:45 -0500 Subject: [PATCH] Fix XRgn bounds setter. --- korman/nodes/node_logic.py | 4 ++-- korman/properties/modifiers/physics.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/korman/nodes/node_logic.py b/korman/nodes/node_logic.py index a440793..a9a38e3 100644 --- a/korman/nodes/node_logic.py +++ b/korman/nodes/node_logic.py @@ -19,7 +19,7 @@ from collections import OrderedDict from PyHSPlasma import * from .node_core import * -from ..properties.modifiers.physics import bounds_types, bounds_type_index +from ..properties.modifiers.physics import bounds_types, bounds_type_index, bounds_type_str from .. import idprops class PlasmaExcludeRegionNode(idprops.IDPropObjectMixin, PlasmaNodeBase, bpy.types.Node): @@ -37,7 +37,7 @@ class PlasmaExcludeRegionNode(idprops.IDPropObjectMixin, PlasmaNodeBase, bpy.typ return bounds_type_index("hull") def _set_bounds(self, value): if self.region_object is not None: - self.region_object.plasma_modifiers.collision.bounds = value + self.region_object.plasma_modifiers.collision.bounds = bounds_type_str(value) region_object = PointerProperty(name="Region", description="Region object's name", diff --git a/korman/properties/modifiers/physics.py b/korman/properties/modifiers/physics.py index 7837281..f561144 100644 --- a/korman/properties/modifiers/physics.py +++ b/korman/properties/modifiers/physics.py @@ -32,6 +32,9 @@ bounds_types = ( def bounds_type_index(key): return list(zip(*bounds_types))[0].index(key) +def bounds_type_str(idx): + return bounds_types[idx][0] + def _set_phys_prop(prop, sim, phys, value=True): """Sets properties on plGenericPhysical and plSimulationInterface (seeing as how they are duped)""" sim.setProperty(prop, value)