armory/Sources/armory/logicnode/SetMeshNode.hx

23 lines
380 B
Haxe
Raw Permalink Normal View History

2017-04-11 11:28:22 +02:00
package armory.logicnode;
2017-11-20 15:16:52 +01:00
import iron.object.MeshObject;
import iron.data.MeshData;
2017-04-11 11:28:22 +02:00
class SetMeshNode extends LogicNode {
2019-12-19 23:54:08 +01:00
public function new(tree: LogicTree) {
2017-04-11 11:28:22 +02:00
super(tree);
}
2019-12-19 23:54:08 +01:00
override function run(from: Int) {
var object: MeshObject = inputs[1].get();
var mesh: MeshData = inputs[2].get();
2017-09-20 14:27:45 +02:00
if (object == null) return;
2017-04-11 11:28:22 +02:00
object.data = mesh;
2018-10-22 10:10:33 +02:00
runOutput(0);
2017-04-11 11:28:22 +02:00
}
}