Browse Source

Add "Advanced Logic" Modifier

This modifier allows us to manually construct a Plasma logic node tree and
have it export.
pull/6/head
Adam Johnson 10 years ago
parent
commit
89dd050110
  1. 19
      korman/properties/modifiers/logic.py
  2. 5
      korman/ui/modifiers/logic.py

19
korman/properties/modifiers/logic.py

@ -14,10 +14,29 @@
# along with Korman. If not, see <http://www.gnu.org/licenses/>.
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"

5
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 <http://www.gnu.org/licenses/>.
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.")

Loading…
Cancel
Save