Kohedlo
30-06-2010 19:57:54
When true save skeleton with new animation - ogre aplication write about skeleton - that is as read with protected memory.
( without this - "skeleon- >//animation.CreateNodeTrack(Handle);" -all works)
method - animation.DestroyAllNodeTracks(); - fix ths -but after save new aimation not exists.
I save by skeleton serializer.
Kohedlo
01-07-2010 05:04:45
Mesh serealizer works finely. But with skeleton serealiser i no see effect. After saving is no added new animations. Also present deleted animations -when before i delete animations.
using (Mogre.SkeletonSerializer ms = new Mogre.SkeletonSerializer())
{
ms.ExportSkeleton(skel, skelName + ".skeleton");
}
Kohedlo
01-07-2010 05:44:20
Mesh serealizer works finely. But with skeleton serealiser i no see effect. After saving is no added new animations. Also present deleted animations -when before i delete animations.
All ok. Saved skeleton save in assembly directory and i not see its))
P/S: I "student" in saving skeletons.
Kohedlo
01-07-2010 15:43:48
method - animation.DestroyAllNodeTracks(); - fix ths -but after save new aimation not exists.
Without DestroyAllNodeTracks() - is no read protected skeleton data for export by skeletonserializer
- This is actual- need help!
Kohedlo
07-07-2010 14:47:19
Also i use method animation._clone(). but naw animation state based on new cloned animation no works - when on old animation call method animation.DestroyAllNodeTracks().
How to save new animation in .skeleton?
Kohedlo
09-07-2010 18:00:29
after calling method
animation2 = animation.Clone("Cloned_" + animation.Name);
cloned animation not exist in All animations of entity.
After calling
ent.AllAnimationStates.CreateAnimationState("Cloned_" + animation.Name,
// 100,f);
- animation also no visible in
ent.AllAnimationStates.GetAnimationStateIterator()
Who have practice in cloning animations 7
if before clonning animation add this
animation2 = ent.Skeleton.CreateAnimation("_" + animation.Name, 1);
animation is present in all animations list but no move as move animation1
what is it7
next code -
animation.GetNodeTrack(b.Handle)._clone(animation);
-give error
Personal big thanks for yours advices.
Kohedlo
09-07-2010 20:38:22
In finish my monolog i say: method -animation.CreateNodeTrack(b.Handle);
- will blocks memory after that unable save animation in skeleton file(i true no find way how do it).
method : animation.CreateNumericTrack(b.Handle);
- not block skeleton for read data for saving by serializer.
Is have symptos of bug. This need slove. (I use Vista and Net 2.0 with Visual c# 2008).
Beauty
14-07-2010 19:48:26
I never used animations and have no knowledge about.
Sorry - I can't help you. Unfortunately no other answered here.
If you find a solution by yourself, be welcome to post it here (as you did in your last posts).
smiley80
14-07-2010 21:55:08
Creating a new animation and exporting the skeleton:
using (var skeleton = e.Skeleton)
{
using (var ani = skeleton.CreateAnimation("newAnimation", 10))
{
using (var bone = skeleton.GetBone(10))
{
using (var track = ani.CreateNodeTrack(bone.Handle, bone))
{
using (var keyFrame = track.CreateKeyFrame(0))
{
}
using (var keyFrame = track.CreateNodeKeyFrame(20))
{
keyFrame.Rotation = new Quaternion(10, Vector3.NEGATIVE_UNIT_X);
}
}
}
ani.Length = 50;
}
using (var ss = new SkeletonSerializer())
{
ss.ExportSkeleton(skeleton, "ninja.skeleton");
}
}
The entity uses the ninja mesh. The animation rotates the right arm (bone #10) upwards.
If you want use the animation directly afterwards you'll also have to use 'Entity.AllAnimationStates.CreateAnimationState'.
If you use replace the old .skeleton file with the new one before restarting, you can use 'Entity.GetAnimationState'.
Kohedlo
15-07-2010 22:56:09
Biggest thanks. Method - animation.CreateNumericTrack(Handle,Node))
- is secon of existing for creating node track. This another method no have problems.