Browse Source

Fix XRgn bounds setter.

pull/175/head
Adam Johnson 4 years ago
parent
commit
9bd3dba4f2
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 4
      korman/nodes/node_logic.py
  2. 3
      korman/properties/modifiers/physics.py

4
korman/nodes/node_logic.py

@ -19,7 +19,7 @@ from collections import OrderedDict
from PyHSPlasma import * from PyHSPlasma import *
from .node_core 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 from .. import idprops
class PlasmaExcludeRegionNode(idprops.IDPropObjectMixin, PlasmaNodeBase, bpy.types.Node): class PlasmaExcludeRegionNode(idprops.IDPropObjectMixin, PlasmaNodeBase, bpy.types.Node):
@ -37,7 +37,7 @@ class PlasmaExcludeRegionNode(idprops.IDPropObjectMixin, PlasmaNodeBase, bpy.typ
return bounds_type_index("hull") return bounds_type_index("hull")
def _set_bounds(self, value): def _set_bounds(self, value):
if self.region_object is not None: 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", region_object = PointerProperty(name="Region",
description="Region object's name", description="Region object's name",

3
korman/properties/modifiers/physics.py

@ -32,6 +32,9 @@ bounds_types = (
def bounds_type_index(key): def bounds_type_index(key):
return list(zip(*bounds_types))[0].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): def _set_phys_prop(prop, sim, phys, value=True):
"""Sets properties on plGenericPhysical and plSimulationInterface (seeing as how they are duped)""" """Sets properties on plGenericPhysical and plSimulationInterface (seeing as how they are duped)"""
sim.setProperty(prop, value) sim.setProperty(prop, value)

Loading…
Cancel
Save