Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "From Scene" Option to the SpawnObject Node #1012

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion Sources/armory/logicnode/SpawnObjectNode.hx
Expand Up @@ -23,6 +23,7 @@ class SpawnObjectNode extends LogicNode {
var m:Mat4 = inputs[2].get();
matrices.push(m != null ? m.clone() : null);
var spawnChildren:Bool = inputs.length > 3 ? inputs[3].get() : true; // TODO
var sceneName:String = inputs[4].get();

iron.Scene.active.spawnObject(objectName, null, function(o:Object) {
object = o;
Expand All @@ -39,7 +40,7 @@ class SpawnObjectNode extends LogicNode {
}
object.visible = true;
runOutput(0);
}, spawnChildren);
}, spawnChildren, sceneName);
}

override function get(from:Int):Dynamic {
Expand Down
1 change: 1 addition & 0 deletions blender/arm/logicnode/action_spawn_object.py
Expand Up @@ -15,6 +15,7 @@ def init(self, context):
self.inputs.new('NodeSocketShader', 'Transform')
self.inputs.new('NodeSocketBool', 'Children')
self.inputs[-1].default_value = True
self.inputs.new('NodeSocketShader', 'From Scene')
self.outputs.new('ArmNodeSocketAction', 'Out')
self.outputs.new('ArmNodeSocketObject', 'Object')

Expand Down