Changeset 434 for cafu/trunk
- Timestamp:
- 11/27/11 14:23:03 (6 months ago)
- Location:
- cafu/trunk
- Files:
-
- 2 added
- 2 modified
-
CaWE/ModelEditor/Commands/UpdateUVCoords.cpp (added)
-
CaWE/ModelEditor/Commands/UpdateUVCoords.hpp (added)
-
CaWE/ModelEditor/ElementsList.cpp (modified) (4 diffs)
-
Libs/Models/Model_cmdl.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/CaWE/ModelEditor/ElementsList.cpp
r396 r434 27 27 #include "Commands/Rename.hpp" 28 28 #include "Commands/Select.hpp" 29 #include "Commands/UpdateUVCoords.hpp" 29 30 #include "../ArtProvider.hpp" 30 31 31 32 #include "MaterialSystem/Material.hpp" 32 33 #include "Models/Model_cmdl.hpp" 34 35 #include "wx/numdlg.h" 33 36 34 37 … … 293 296 ID_MENU_INSPECT_EDIT=wxID_HIGHEST+1+100, 294 297 ID_MENU_RENAME, 295 ID_MENU_ADD_NEW 298 ID_MENU_ADD_NEW, 299 ID_MENU_PROJECT_UV_COORDS 296 300 }; 297 301 … … 302 306 if (m_TYPE==GFIX || m_TYPE==SKIN || m_TYPE==CHAN) Menu.Append(ID_MENU_ADD_NEW, "Add/create new"); 303 307 304 /* if (m_TYPE==MESH) 305 { 306 Append(..., "Remove unused Vertices"); 307 Append(..., "Remove unused Weights"); 308 } */ 308 if (m_TYPE==MESH) 309 { 310 Menu.AppendSeparator(); 311 // Menu.Append(..., "Remove unused Vertices"); 312 // Menu.Append(..., "Remove unused Weights"); 313 Menu.Append(ID_MENU_PROJECT_UV_COORDS, "Project new UV-coords...", "Project UV-coordinates onto the mesh"); 314 } 309 315 310 316 switch (GetPopupMenuSelectionFromUser(Menu)) … … 333 339 default: break; 334 340 } 341 break; 342 } 343 344 case ID_MENU_PROJECT_UV_COORDS: 345 { 346 if (m_TYPE!=MESH) break; 347 if (m_ModelDoc->GetSelection(m_TYPE).Size()==0) break; 348 349 const unsigned int MeshNr=m_ModelDoc->GetSelection(m_TYPE)[0]; 350 351 const long Scale=wxGetNumberFromUser( 352 "This is a tool for fixing models that did not bring proper UV-coordinates, or none at all.\n" 353 "The right solution is to assign UV-coordinates in your favourite 3D mesh modelling software\n" 354 "and then to re-import the model, whereas this tool is meant as a very quick and very simple\n" 355 "means for a hot-fix (that sometimes may suffice nevertheless).", 356 "Enter UV-vector scale:", 357 wxString::Format("Project UV-coordinates onto mesh %u", MeshNr), 358 12, 359 1, 360 1024); 361 362 m_MainFrame->SubmitCommand(new CommandUpdateUVCoordsT(m_ModelDoc, 363 MeshNr, 364 m_ModelDoc->GetAnimState().Pose, 365 Vector3fT(Scale, 0, 0), 366 Vector3fT(0, 0, Scale))); 335 367 break; 336 368 } -
cafu/trunk/Libs/Models/Model_cmdl.hpp
r429 r434 51 51 namespace ModelEditor { class CommandUpdateGuiFixtureT; } 52 52 namespace ModelEditor { class CommandUpdateTriangleT; } 53 namespace ModelEditor { class CommandUpdateUVCoordsT; } 53 54 54 55 … … 306 307 friend class ModelEditor::CommandUpdateGuiFixtureT; 307 308 friend class ModelEditor::CommandUpdateTriangleT; 309 friend class ModelEditor::CommandUpdateUVCoordsT; 308 310 309 311 CafuModelT(const CafuModelT&); ///< Use of the Copy Constructor is not allowed.
