About Store Forum Documentation Contact



Post Reply 
Biped renaming button???
Author Message
b1s Offline
Member

Post: #1
Biped renaming button???
Where has this gone?
it has dissapeared from skeleton mode and now if I want to bring a new animation to game instead of clicking once, I need to click 120 times.
Also one thing that was quite devestating was this recent change:
"-IMPORTANT: removed Game::Chr::ready, previous savegames may not work "
Any reason for this? we are going to have to make some serious changes because of this.
(This post was last modified: 01-03-2011 01:49 PM by b1s.)
01-03-2011 12:56 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #2
RE: Biped renaming button???
You can simlpy wrote your own "ready" like me.

http://www.esenthel.com/community/showth...p?tid=2955

Maybe it will help you.
(This post was last modified: 01-03-2011 07:13 PM by Harry.)
01-03-2011 07:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: Biped renaming button???
Please use this tool to convert MESH SKEL ANIM bone names.
It works just like Converter.
Place it in the SDK/tools folder and drop mesh+skel+anim files.

Tool is based on following source, you'll be able to compile it in the next SDK release (please don't use the source in current SDK as I've found some bug in some engine method, and it won't work properly)

Code:
/******************************************************************************/
#include "stdafx.h"
#include "../../resource.h"
/******************************************************************************/
Memc<Str> Files;
/******************************************************************************/
static Bool BoneRename(Skeleton &skel, Str src, Str dest)
{
   Bool changed=false;
   REPA(skel.bones)if(Equal(skel.bones[i].name,src)){Set(skel.bones[i].name,dest); changed=true;}
   return changed;
}
static Bool BoneRename(Animation &anim, Str src, Str dest)
{
   Bool changed=false;
   REPA(anim.bones)if(Equal(anim.bones[i].name,src)){Set(anim.bones[i].name,dest); changed=true;}
   return changed;
}
static Bool BoneRename(Mesh &mesh, Str src, Str dest)
{
   return mesh.boneRename(src,dest);
}
/******************************************************************************/
struct SrcDest
{
   Str src,dest;
}src_dest[]=
{
   {"R_Clavicle","ShoulderR"},
   {"L_Clavicle","ShoulderL"},
   {"R_UpperArm","ArmRU"    },
   {"L_UpperArm","ArmLU"    },
   {"R_Forearm" ,"ArmRD"    },
   {"L_Forearm" ,"ArmLD"    },
   {"R_Thigh"   ,"LegRU"    },
   {"L_Thigh"   ,"LegLU"    },
   {"R_Calf"    ,"LegRD"    },
   {"L_Calf"    ,"LegLD"    },
   {"R_Hand"    ,"HandR"    },
   {"L_Hand"    ,"HandL"    },
   {"R_Foot"    ,"FootR"    },
   {"L_Foot"    ,"FootL"    },
   {"R_Toe0"    ,"FootR0"   },
   {"L_Toe0"    ,"FootL0"   },

   {"R_Finger0" ,"FingerR00"},
   {"L_Finger0" ,"FingerL00"},
   {"R_Finger01","FingerR01"},
   {"L_Finger01","FingerL01"},

   {"R_Finger1" ,"FingerR10"},
   {"L_Finger1" ,"FingerL10"},
   {"R_Finger11","FingerR11"},
   {"L_Finger11","FingerL11"},

   {"R_Finger2" ,"FingerR20"},
   {"L_Finger2" ,"FingerL20"},
   {"R_Finger21","FingerR21"},
   {"L_Finger21","FingerL21"},

   {"R_Finger3" ,"FingerR30"},
   {"L_Finger3" ,"FingerL30"},
   {"R_Finger31","FingerR31"},
   {"L_Finger31","FingerL31"},

   {"R_Finger4" ,"FingerR40"},
   {"L_Finger4" ,"FingerL40"},
   {"R_Finger41","FingerR41"},
   {"L_Finger41","FingerL41"},
};
static Bool BoneRename(Skeleton &skel)
{
   Bool changed=false;
   REP(10)
   {
      Str prefix=S+"Bip0"+i+"_";
      REPA(src_dest)changed|=BoneRename(skel, prefix+src_dest[i].src, src_dest[i].dest);
   }
   return changed;
}
static Bool BoneRename(Animation &anim)
{
   Bool changed=false;
   REP(10)
   {
      Str prefix=S+"Bip0"+i+"_";
      REPA(src_dest)changed|=BoneRename(anim, prefix+src_dest[i].src, src_dest[i].dest);
   }
   return changed;
}
static Bool BoneRename(Mesh &mesh)
{
   Bool changed=false;
   REP(10)
   {
      Str prefix=S+"Bip0"+i+"_";
      REPA(src_dest)changed|=BoneRename(mesh, prefix+src_dest[i].src, src_dest[i].dest);
   }
   return changed;
}
/******************************************************************************/
void AddFile(CChar *name)
{
   Files.add(name);
}
void AddFileOrDir(CChar *name)
{
   switch(FileInfo(name).type)
   {
      case FSTD_FILE: AddFile(name); break;
      case FSTD_DIR : {for(FileFind ff(name); ff();)AddFileOrDir(ff.pathName()); }break;
   }
}
/******************************************************************************/
void Drop()
{
   for(;CChar *name=DropName();)AddFileOrDir(name);
}
void InitPre()
{
   App.name("Biped Rename");
   App.icon=(Char*)IDI_ICON1;
   App.flag=APP_MINIMIZABLE|APP_WORK_IN_BACKGROUND|APP_NO_FX;
   App.drop=Drop;
   D.mode(420,315).sync(false);
#ifndef DEBUG
   Paks.add("../data/engine.pak");
#endif
}
Bool Init()
{
   Gui.kb_lit.zero();

   D.scale(2.7f);

   Skeletons.mode(CACHE_ALL_DUMMY);
   Materials.mode(CACHE_ALL_DUMMY);
   Images   .mode(CACHE_ALL_DUMMY);
   Enums    .mode(CACHE_ALL_DUMMY);
   return true;
}
void Shut()
{
}
/******************************************************************************/
// UPDATE
/******************************************************************************/
Bool Update()
{
   if(Kb.b(KB_ESC))return false;
   if(Files.elms())
   {
      Str name=Files.last(); Files.removeLast();
      Str ext =GetExt(name);

      if(Equal(ext,"skel")){Skeleton  skel; if(skel.load(name))if(BoneRename(skel))skel.save(name);}else
      if(Equal(ext,"anim")){Animation anim; if(anim.load(name))if(BoneRename(anim))anim.save(name);}else
      if(Equal(ext,"mesh")){Mesh      mesh; if(mesh.load(name))if(BoneRename(mesh))mesh.save(name);}
   }
   else // no files to process
   {
      Time.wait(1000/60);
   }
   return true;
}
/******************************************************************************/
// DRAW
/******************************************************************************/
void Draw()
{
   if(Files.elms())
   {
      D.clear(WHITE);
      TextDS tds; tds=Text_ds; tds.scale/=2.7; tds.color=BLACK; tds.shadow=0;
      Flt y=D.h(); REPA(Files)
      {
            y-=0.03f; D.text(tds,0,y,Files[i]);
         if(y<-D.h())break;
      }
      tds.scale*=2; tds.color=WHITE; tds.shadow=255;
      Rect_C(0,0,0.75,0.12).drawShaded(ColorAlpha(ColorBrightness(0.35),0.65), ColorAlpha(WHITE,0), 0.02f);
      D.text(tds,0,0,S+Files.elms()+" files remaining");
   }else
   {
      D.clear(Color(171,171,171));
      D.text(Rect_C(0,0,0),"Drop MESH SKEL ANIM\nfiles here to rename");
   }
}
/******************************************************************************/

Quote:"-IMPORTANT: removed Game::Chr::ready, previous savegames may not work "
Any reason for this? we are going to have to make some serious changes because of this.
I want to keep Game::Chr as simple as possible, without any useless functions.
Possibly I'll simplify it even more.
Once you'll upgrade to Company license - http://www.esenthel.com/?id=buy
You get full sources of Game::Chr, on request I'll be able to provide older version which had 'ready' functionality.


Attached File(s)
.7z  Biped Rename.7z (Size: 666.97 KB / Downloads: 7)
01-04-2011 01:22 AM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #4
RE: Biped renaming button???
okay.. will look over this, thanks.
01-04-2011 08:27 AM
Find all posts by this user Quote this message in a reply
Post Reply