diff --git a/korman/properties/modifiers/logic.py b/korman/properties/modifiers/logic.py index e1c3965..92ac41b 100644 --- a/korman/properties/modifiers/logic.py +++ b/korman/properties/modifiers/logic.py @@ -14,10 +14,29 @@ # along with Korman. If not, see . import bpy +from bpy.props import * from PyHSPlasma import * from .base import PlasmaModifierProperties +class PlasmaAdvancedLogic(PlasmaModifierProperties): + pl_id = "advanced_logic" + + bl_category = "Logic" + bl_label = "Advanced" + bl_description = "Plasma Logic Nodes" + bl_icon = "NODETREE" + + tree_name = StringProperty(name="Node Tree", description="Plasma Logic Nodes") + + def created(self, obj): + self.display_name = "Advanced Logic" + + def export(self, exporter, bo, so): + tree = bpy.data.node_groups[self.tree_name] + tree.export(exporter, bo, so) + + class PlasmaSpawnPoint(PlasmaModifierProperties): pl_id = "spawnpoint" diff --git a/korman/ui/modifiers/logic.py b/korman/ui/modifiers/logic.py index 08cc998..c250d02 100644 --- a/korman/ui/modifiers/logic.py +++ b/korman/ui/modifiers/logic.py @@ -13,6 +13,11 @@ # You should have received a copy of the GNU General Public License # along with Korman. If not, see . +import bpy + +def advanced_logic(modifier, layout, context): + layout.prop_search(modifier, "tree_name", bpy.data, "node_groups", icon="NODETREE") + def spawnpoint(modifier, layout, context): layout.label(text="The Y axis indicates the direction the avatar is facing.")