From a8f61e840f1fb3410319310714323f2a09faf514 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 1 Jan 2017 23:30:04 -0500 Subject: [PATCH] Allow referencing swim currents from python nodes --- korman/nodes/node_python.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/korman/nodes/node_python.py b/korman/nodes/node_python.py index ccfbc3a..e1ced8b 100644 --- a/korman/nodes/node_python.py +++ b/korman/nodes/node_python.py @@ -76,7 +76,8 @@ _attrib_key_types = { "ptAttribGUIPopUpMenu": plFactory.ClassIndex("pfGUIPopUpMenu"), "ptAttribGUISkin": plFactory.ClassIndex("pfGUISkin"), "ptAttribWaveSet": plFactory.ClassIndex("plWaveSet7"), - "ptAttribSwimCurrent": (plFactory.ClassIndex("plSwimCircularCurrentRegion"), + "ptAttribSwimCurrent": (plFactory.ClassIndex("plSwimRegionInterface"), + plFactory.ClassIndex("plSwimCircularCurrentRegion"), plFactory.ClassIndex("plSwimStraightCurrentRegion")), "ptAttribClusterList": plFactory.ClassIndex("plClusterGroup"), "ptAttribMaterialAnimation": plFactory.ClassIndex("plLayerAnimation"), @@ -457,6 +458,9 @@ class PlasmaAttribObjectNode(PlasmaAttribNodeBase, bpy.types.Node): agmod = exporter.mgr.find_create_key(plAGModifier, so=ref_so, name=anim.key_name) agmaster = exporter.mgr.find_create_key(plAGMasterModifier, so=ref_so, name=anim.key_name) return agmaster + elif attrib == "ptAttribSwimCurrent": + swimregion = bo.plasma_modifiers.swimregion + return swimregion.get_key(exporter, ref_so) elif attrib == "ptAttribWaveSet": waveset = bo.plasma_modifiers.water_basic if not waveset.enabled: