Repe [T3DU] and Moises Jpelaez updates

This commit is contained in:
2026-05-12 23:54:06 -07:00
parent 6b404f9da6
commit 39091e8db3
147 changed files with 5539 additions and 1750 deletions

View File

@ -9,6 +9,7 @@ import iron.math.Vec4;
import iron.math.Mat4;
import iron.math.Quat;
import iron.data.SceneFormat;
import StringTools;
class ObjectAnimation extends Animation {
@ -42,13 +43,24 @@ class ObjectAnimation extends Animation {
isSkinned = false;
super();
}
override function get_action(): String {
var an: String = action; // an -> action name
if (an != "" && object != null && object.filename != "") {
var sufix = "_" + object.filename;
if (an.indexOf(sufix) != -1) an = StringTools.replace(an, sufix, "");
}
return an;
}
function getAction(action: String): TObj {
for (a in oactions) if (a != null && a.objects[0].name == action) return a.objects[0];
return null;
}
override public function play(action = "", onComplete: Void->Void = null, blendTime = 0.0, speed = 1.0, loop = true) {
super.play(action, onComplete, blendTime, speed, loop);
var actionName: String = object != null && object.filename != "" ? action + "_" + object.filename : action;
super.play(actionName, onComplete, blendTime, speed, loop);
if (this.action == "" && oactions != null && oactions[0] != null){
this.action = oactions[0].objects[0].name;
}