public bool LoadSkeletonAction(CRenderContext rc, RName name, bool firstLoad) { using (var xnd = IO.XndHolder.SyncLoadXND(name.Address)) { if (xnd == null) { return(false); } if (false == SDK_GfxSkeletonAction_LoadXnd(CoreObject, rc.CoreObject, name.Name, xnd.Node.CoreObject, firstLoad)) { return(false); } var num = SDK_GfxSkeletonAction_GetBoneNumber(CoreObject); mAnimNodes = new CGfxBoneAnim[num]; for (UInt32 i = 0; i < num; i++) { var ptr = SDK_GfxSkeletonAction_GetBoneAnum(CoreObject, i); if (ptr.Pointer == IntPtr.Zero) { continue; } mAnimNodes[i] = new CGfxBoneAnim(ptr); } return(true); } }
public bool MakeTPoseActionFromSkeleton(CGfxSkeleton skeleton, RName name, bool firstLoad) { if (false == SDK_GfxSkeletonAction_MakeTPoseActionFromSkeleton(CoreObject, skeleton.CoreObject, name.Name, firstLoad)) { return(false); } var num = SDK_GfxSkeletonAction_GetBoneNumber(CoreObject); mAnimNodes = new CGfxBoneAnim[num]; for (UInt32 i = 0; i < num; i++) { var ptr = SDK_GfxSkeletonAction_GetBoneAnum(CoreObject, i); if (ptr.Pointer == IntPtr.Zero) { continue; } mAnimNodes[i] = new CGfxBoneAnim(ptr); } return(true); }