4
4
mirror of https://github.com/H-uru/korman.git synced 2025-07-15 10:54:18 +00:00

Add "Advanced Logic" Modifier

This modifier allows us to manually construct a Plasma logic node tree and
have it export.
This commit is contained in:
2015-06-10 19:52:27 -04:00
parent af2229ec64
commit 89dd050110
2 changed files with 24 additions and 0 deletions

View File

@ -14,10 +14,29 @@
# along with Korman. If not, see <http://www.gnu.org/licenses/>. # along with Korman. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from bpy.props import *
from PyHSPlasma import * from PyHSPlasma import *
from .base import PlasmaModifierProperties 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): class PlasmaSpawnPoint(PlasmaModifierProperties):
pl_id = "spawnpoint" pl_id = "spawnpoint"

View File

@ -13,6 +13,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Korman. If not, see <http://www.gnu.org/licenses/>. # 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): def spawnpoint(modifier, layout, context):
layout.label(text="The Y axis indicates the direction the avatar is facing.") layout.label(text="The Y axis indicates the direction the avatar is facing.")