Conditional compilation for shape key node
This commit is contained in:
parent
83a60e7462
commit
1cec287891
|
@ -9,15 +9,17 @@ class SetObjectShapeKeyNode extends LogicNode {
|
|||
}
|
||||
|
||||
override function run(from: Int) {
|
||||
#if arm_morph_target
|
||||
var object: Dynamic = inputs[1].get();
|
||||
var shapeKey: String = inputs[2].get();
|
||||
var value: Dynamic = inputs[3].get();
|
||||
|
||||
if (object == null) return;
|
||||
var sk = cast(object, MeshObject).morphTarget;
|
||||
if(sk == null) return;
|
||||
assert(Error, object != null, "Object should not be null");
|
||||
var morph = cast(object, MeshObject).morphTarget;
|
||||
|
||||
sk.setMorphValue(shapeKey, value);
|
||||
assert(Error, morph != null, "Object does not have shape keys");
|
||||
morph.setMorphValue(shapeKey, value);
|
||||
#end
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue