Merge pull request 'Update leenkx/Sources/iron/object/Animation.hx' (#8) from Onek8/LNXSDK:main into main
Reviewed-on: #8
This commit is contained in:
commit
76d79e6e18
@ -411,12 +411,23 @@ class ActionSampler {
|
|||||||
*/
|
*/
|
||||||
public inline function setBoneAction(actionData: Array<TObj>) {
|
public inline function setBoneAction(actionData: Array<TObj>) {
|
||||||
this.actionData = actionData;
|
this.actionData = actionData;
|
||||||
|
if (actionData != null && actionData.length > 0 && actionData[0] != null && actionData[0].anim != null) {
|
||||||
|
if (actionData[0].anim.tracks != null && actionData[0].anim.tracks.length > 0) {
|
||||||
this.totalFrames = actionData[0].anim.tracks[0].frames.length;
|
this.totalFrames = actionData[0].anim.tracks[0].frames.length;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.totalFrames = 0;
|
||||||
|
}
|
||||||
if(actionData[0].anim.root_motion_pos) this.rootMotionPos = true;
|
if(actionData[0].anim.root_motion_pos) this.rootMotionPos = true;
|
||||||
if(actionData[0].anim.root_motion_rot) this.rootMotionRot = true;
|
if(actionData[0].anim.root_motion_rot) this.rootMotionRot = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.totalFrames = 0;
|
||||||
|
}
|
||||||
actionDataInit = true;
|
actionDataInit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache raw object data for object animation.
|
* Cache raw object data for object animation.
|
||||||
* @param actionData Raw object data.
|
* @param actionData Raw object data.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user