|
|
@ -220,7 +220,7 @@ class PlasmaNodeBase: |
|
|
|
"""Generates valid sockets on this node type that can be linked to a specific node's socket.""" |
|
|
|
"""Generates valid sockets on this node type that can be linked to a specific node's socket.""" |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
|
|
def harvest_actors(self, bo): |
|
|
|
def harvest_actors(self): |
|
|
|
return set() |
|
|
|
return set() |
|
|
|
|
|
|
|
|
|
|
|
def link_input(self, node, out_key, in_key): |
|
|
|
def link_input(self, node, out_key, in_key): |
|
|
@ -466,12 +466,12 @@ class PlasmaNodeTree(bpy.types.NodeTree): |
|
|
|
return node |
|
|
|
return node |
|
|
|
return None |
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
def harvest_actors(self, bo): |
|
|
|
def harvest_actors(self): |
|
|
|
actors = set() |
|
|
|
actors = set() |
|
|
|
for node in self.nodes: |
|
|
|
for node in self.nodes: |
|
|
|
harvest_method = getattr(node, "harvest_actors", None) |
|
|
|
harvest_method = getattr(node, "harvest_actors", None) |
|
|
|
if harvest_method is not None: |
|
|
|
if harvest_method is not None: |
|
|
|
actors.update(harvest_method(bo)) |
|
|
|
actors.update(harvest_method()) |
|
|
|
elif not isinstance(node, PlasmaNodeBase): |
|
|
|
elif not isinstance(node, PlasmaNodeBase): |
|
|
|
raise ExportError("Plasma Node Tree '{}' Node '{}': is not a valid node for this tree".format(self.id_data.name, node.name)) |
|
|
|
raise ExportError("Plasma Node Tree '{}' Node '{}': is not a valid node for this tree".format(self.id_data.name, node.name)) |
|
|
|
return actors |
|
|
|
return actors |
|
|
@ -480,6 +480,10 @@ class PlasmaNodeTree(bpy.types.NodeTree): |
|
|
|
def poll(cls, context): |
|
|
|
def poll(cls, context): |
|
|
|
return (context.scene.render.engine == "PLASMA_GAME") |
|
|
|
return (context.scene.render.engine == "PLASMA_GAME") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
|
|
|
def requires_actor(self): |
|
|
|
|
|
|
|
return any((node.requires_actor for node in self.nodes)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Welcome to HAXland! |
|
|
|
# Welcome to HAXland! |
|
|
|
# Blender 2.79 is great in that it allows us to have ID Datablock pointer properties everywhere. |
|
|
|
# Blender 2.79 is great in that it allows us to have ID Datablock pointer properties everywhere. |
|
|
|