Changeset 473
- Timestamp:
- 01/28/12 23:14:39 (4 months ago)
- Location:
- cafu/trunk
- Files:
-
- 3 modified
-
CaWE/ModelEditor/ChildFrame.cpp (modified) (2 diffs)
-
CaWE/ModelEditor/ElementsList.cpp (modified) (3 diffs)
-
Libs/Models/Loader_md5.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/CaWE/ModelEditor/ChildFrame.cpp
r472 r473 173 173 ModelMenu->Append(ID_MENU_MODEL_SKIN_ADD, "Add skin", "Adds a new skin to the model"); 174 174 ModelMenu->Append(ID_MENU_MODEL_GUIFIXTURE_ADD, "Add GUI fixture", "Adds a new GUI fixture to the model"); 175 ModelMenu->Append(ID_MENU_MODEL_ANIM_IMPORT, "Import anim sequences", "Imports additional animation sequences into the model");175 ModelMenu->Append(ID_MENU_MODEL_ANIM_IMPORT, "Import animation sequences...", "Imports additional animation sequences into the model"); 176 176 ModelMenu->Append(ID_MENU_MODEL_CHANNEL_ADD, "Add channel", "Adds a new animation channel to the model"); 177 177 ModelMenu->Append(-1, "Run benchmark", "Move the camera along a predefined path and determine the time taken")->Enable(false); … … 389 389 { 390 390 wxFileDialog FileDialog(this, // The window parent. 391 "Import animation sequence ",// Message.391 "Import animation sequences", // Message. 392 392 "", // The default directory. 393 393 "*.md5anim", // The default file name. -
cafu/trunk/CaWE/ModelEditor/ElementsList.cpp
r472 r473 193 193 const ArrayT<unsigned int>& Sel=m_ModelDoc->GetSelection(m_TYPE); 194 194 195 m_IsRecursiveSelfNotify=true; 195 196 Freeze(); 196 197 DeleteAllItems(); … … 278 279 279 280 Thaw(); 281 m_IsRecursiveSelfNotify=false; 280 282 } 281 283 … … 305 307 Menu.Append(ID_MENU_RENAME, "Rename\tF2"); 306 308 if (m_TYPE==GFIX || m_TYPE==SKIN || m_TYPE==CHAN) Menu.Append(ID_MENU_ADD_NEW, "Add/create new"); 307 if (m_TYPE==ANIM) Menu.Append(ID_MENU_ADD_NEW, "Import more...");309 if (m_TYPE==ANIM) Menu.Append(ID_MENU_ADD_NEW, "Import..."); 308 310 309 311 if (m_TYPE==MESH) -
cafu/trunk/Libs/Models/Loader_md5.cpp
r472 r473 265 265 CafuModelT::AnimT Anim; 266 266 267 Anim.Name= "Anim";267 Anim.Name=cf::String::StripExt(m_FileName); 268 268 Anim.FPS =24.0f; 269 269 Anim.Next=-1; 270 271 const size_t PathLength=cf::String::GetPath(Anim.Name).length() + 1; 272 273 if (PathLength < Anim.Name.length()) 274 Anim.Name=std::string(Anim.Name, PathLength); 270 275 271 276 bool GotHierarchy=false; … … 297 302 const unsigned long numJoints=TP.GetNextTokenAsInt(); 298 303 299 if (numJoints!=Joints.Size()) { printf("%lu joints in md5anim file, %lu joints in the model.\n", numJoints, Joints.Size()); throw ModelLoaderT::LoadErrorT("The number of joints in the md5anim file does not match number of bones in the model."); }304 if (numJoints!=Joints.Size()) { printf("%lu joints in md5anim file, %lu joints in the model.\n", numJoints, Joints.Size()); throw ModelLoaderT::LoadErrorT("The number of joints in the md5anim file does not match number of joints in the model."); } 300 305 if (Anim.AnimJoints.Size()>0) { printf("Anim.AnimJoints.Size()==%lu\n", Anim.AnimJoints.Size()); throw ModelLoaderT::LoadErrorT("Anim.AnimJoints.Size() > 0"); } 301 306 … … 397 402 398 403 // Make sure that the imported animation sequence is valid. 399 if (Anim.AnimJoints.Size()!=Joints.Size()) throw ModelLoaderT::LoadErrorT("The number of joints in the md5anim file does not match number of bones in the model.");404 if (Anim.AnimJoints.Size()!=Joints.Size()) throw ModelLoaderT::LoadErrorT("The number of joints in the md5anim file does not match number of joints in the model."); 400 405 if (!GotHierarchy) throw ModelLoaderT::LoadErrorT("There seems to be no joints hierarchy defined in this file."); 401 406 if (!GotBounds) throw ModelLoaderT::LoadErrorT("There seem to be no bounds in this file.");
