• R/O
  • SSH
  • HTTPS

gdx64: Commit


Commit MetaInfo

Revisión267 (tree)
Tiempo2020-01-15 01:27:05
Autorhgtterry

Log Message

Basic Shapes 1.9 Export 140120

Cambiar Resumen

Diferencia incremental

--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Export_Ogre3D.cpp (revision 266)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Export_Ogre3D.cpp (revision 267)
@@ -269,8 +269,6 @@
269269 char MaterialNumber[255];
270270 bool foundBoneAssignment = false;
271271 float TempV = 0;
272- /*int wh, numbones;
273- int intweight[3], intbones[3];*/
274272
275273 Ogre::SkeletonManager SkeletonMgr;
276274 Ogre::DefaultHardwareBufferManager *bufferManager = 0;
@@ -311,7 +309,7 @@
311309 //------------------------------------------
312310
313311 ogreSubMesh->vertexData = new Ogre::VertexData();
314- ogreSubMesh->vertexData->vertexCount = App->Cl_Model->S_MeshGroup[i]->GroupVertCount;//App->CA_Milk_Import->GetNumVertices();//S_XMLStore[0]->SXMLCount;
312+ ogreSubMesh->vertexData->vertexCount = App->Cl_Model->S_MeshGroup[i]->GroupVertCount;
315313 ogreSubMesh->vertexData->vertexStart = 0;
316314 Ogre::VertexBufferBinding* bind = ogreSubMesh->vertexData->vertexBufferBinding;
317315 Ogre::VertexDeclaration* decl = ogreSubMesh->vertexData->vertexDeclaration;
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Exporter.cpp (nonexistent)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Exporter.cpp (revision 267)
@@ -0,0 +1,209 @@
1+/*
2+ Copyright (c) Equity10 2016 Inflanite W.T.Flanigan B.Parkin H.C.Flanigan
3+
4+ This software is provided 'as-is', without any express or implied
5+ warranty. In no event will the authors be held liable for any damages
6+ arising from the use of this software.
7+
8+ Permission is granted to anyone to use this software for any purpose,
9+ including commercial applications, and to alter it and redistribute it
10+ freely, subject to the following restrictions:
11+
12+ 1. The origin of this software must not be misrepresented; you must not
13+ claim that you wrote the original software. If you use this software
14+ in a product, an acknowledgment in the product documentation would be
15+ appreciated but is not required.
16+
17+ 2. Altered source versions must be plainly marked as such, and must not be
18+ misrepresented as being the original software.
19+
20+ 3. This notice may not be removed or altered from any source
21+ distribution.
22+*/
23+
24+#include "StdAfx.h"
25+#include "GD19_App.h"
26+#include "GD_Exporter.h"
27+
28+
29+GD_Exporter::GD_Exporter(void)
30+{
31+}
32+
33+
34+GD_Exporter::~GD_Exporter(void)
35+{
36+}
37+
38+// *************************************************************************
39+// * MilkShape_Skeleton Terry Bernie *
40+// *************************************************************************
41+void GD_Exporter::MilkShape_Skeleton(void)
42+{
43+ /*if (App->CL_Model_Data->Model_Loaded == 0)
44+ {
45+ App->CL_Dialogs->Message("No Model Loaded to Export");
46+ return;
47+ }
48+
49+ if (App->CL_Model_Data->BoneCount == 0)
50+ {
51+ App->CL_Dialogs->Message("Model has no Skeleton/Joints to Export");
52+ return;
53+ }
54+
55+ if (App->CL_Model_Data->ItsAnOgreModel == 1)
56+ {
57+ App->Cl_OgreToMilk->New_Export_To_Milk(1);
58+ }
59+ else
60+ {
61+ char mFilename[1024];
62+ strcpy(mFilename,App->CL_Model_Data->JustName);
63+ strcat(mFilename,"_Skeleton.ms3d");
64+
65+ int test = App->CL_FileIO->SaveFile("Milkshape Files *.ms3d\0*.ms3d\0","Equity Bone Exporter",mFilename);
66+ if (test == 0)
67+ {
68+ return;
69+ }
70+
71+ App->Cl_Ogre->RenderListener->PlayActive = 0;
72+ App->CL_Genesis_Import->DefaultPose();
73+ App->CL_Genesis_Import->GetBoneMoveMent();
74+
75+ App->CL_Export_Milk->WriteJustBones(App->CL_FileIO->Save_Path_FileName);
76+ }
77+
78+ App->CL_Dialogs->Message("MilkShape Skeleton file Created successfully");*/
79+}
80+
81+// *************************************************************************
82+// * MilkShape_Model Terry Bernie *
83+// *************************************************************************
84+void GD_Exporter::MilkShape_Model(bool DoMotions)
85+{
86+ /*bool test = 0;
87+
88+ if (App->CL_Model_Data->Model_Loaded == 0)
89+ {
90+ App->CL_Dialogs->Message("No Model Loaded to Export");
91+ return;
92+ }
93+
94+ if (App->CL_Model_Data->ItsAnOgreModel == 1)
95+ {
96+ test = App->Cl_OgreToMilk->New_Export_To_Milk(0);
97+ }
98+ else
99+ {
100+ test = App->CL_Export_Milk->Export_To_Milk(DoMotions);
101+ App->CL_Dialogs->PleaseWaitEnd();
102+ }
103+
104+ if (test == 1)
105+ {
106+ App->CL_Dialogs->Message("MilkShape file Created successfully");
107+ }*/
108+}
109+
110+// *************************************************************************
111+// * Object_Model Terry Bernie *
112+// *************************************************************************
113+void GD_Exporter::Object_Model(void)
114+{
115+ /*if (App->CL_Model_Data->Model_Loaded == 0)
116+ {
117+ App->CL_Dialogs->Message("No Model Loaded to Export");
118+ return;
119+ }
120+
121+ if (App->CL_Model_Data->Model_Type == LoadedFile_Actor)
122+ {
123+ App->CL_Dialogs->Message("Not available for the Actor format just yet.");
124+ return;
125+ }
126+
127+ bool test = App->CL_Export_Object->Create_ObjectFile();
128+
129+ if (test == 1)
130+ {
131+ App->CL_Dialogs->Message("Wavefront Object file Created successfully");
132+ }*/
133+}
134+
135+// *************************************************************************
136+// * Actor_Model Terry Bernie *
137+// *************************************************************************
138+void GD_Exporter::Actor_Model(void)
139+{
140+ //if (App->Cl_Model->Model_Loaded == 0)
141+ //{
142+ // //App->Cl_Dialogs->Message("No Model Loaded to Export");
143+ // return;
144+ //}
145+
146+ //strcpy(App->Cl_FileIO->BrowserMessage,"Select Folder To Place Decompiled Files a sub folder will be created");
147+ //int Test = App->Cl_FileIO->StartBrowser("");
148+
149+ //if (Test==0)
150+ //{
151+ // return;
152+ //}
153+
154+ //App->CL_Export_Actor->Export_As_Actor();
155+
156+ //App->CL_Dialogs->Message("RF Actor Saved successfully");
157+}
158+
159+// *************************************************************************
160+// * Actor_Decompile Terry Bernie *
161+// *************************************************************************
162+void GD_Exporter::Actor_Decompile(void)
163+{
164+ /*App->CL_Export_Actor->Decompile();
165+ App->CL_Dialogs->Message("RF Actor Decompiled successfully");*/
166+}
167+
168+// *************************************************************************
169+// * Ogre3D_Model Terry Bernie *
170+// *************************************************************************
171+void GD_Exporter::Ogre3D_Model(void)
172+{
173+
174+ //if (App->Cl_Model->Model_Loaded == 0)
175+ //{
176+ // //App->Cl_Dialogs->Message("No Model Loaded to Export");
177+ // return;
178+ //}
179+
180+ //if (App->Cl_Model->Model_Type == LoadedFile_Actor)
181+ //{
182+ // App->CL_Dialogs->Message("Not available for the Actor format just yet.");
183+ // return;
184+ //}
185+
186+ strcpy(App->Cl_FileIO->BrowserMessage,"Select Folder To Place Ogre Files a sub folder will be created");
187+ int Test = App->Cl_FileIO->StartBrowser("");
188+
189+ if (Test==0){return;}
190+
191+ //if(App->Cl_Model_Data->ItsAnOgreModel == 1)
192+ //{
193+ // App->Cl_Export_Ogre3D->Start_OgreExportOptions();
194+ // if (App->Cl_Export_Ogre3D->ExportOptions_Cancled == 1){return;}
195+ //}
196+
197+
198+ //if (App->Cl_Model_Data->ItsAnOgreModel == 1)
199+ //{
200+ // App->Cl_Export_Ogre3D->Export_OgreToOgre();
201+ //// App->CL_Dialogs->Message("Ogre3D Model Saved successfully");
202+ // return;
203+ //}
204+ //else
205+ {
206+ App->Cl_Export_Ogre3D->Export_AssimpToOgre();
207+ App->CL_Dialogs->Message("Ogre3D Model Saved successfully");
208+ }
209+}
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Exporter.h (nonexistent)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Exporter.h (revision 267)
@@ -0,0 +1,38 @@
1+/*
2+ Copyright (c) Equity10 2016 HGT Software W.T.Flanigan B.Parkin H.C.Flanigan
3+
4+ This software is provided 'as-is', without any express or implied
5+ warranty. In no event will the authors be held liable for any damages
6+ arising from the use of this software.
7+
8+ Permission is granted to anyone to use this software for any purpose,
9+ including commercial applications, and to alter it and redistribute it
10+ freely, subject to the following restrictions:
11+
12+ 1. The origin of this software must not be misrepresented; you must not
13+ claim that you wrote the original software. If you use this software
14+ in a product, an acknowledgment in the product documentation would be
15+ appreciated but is not required.
16+
17+ 2. Altered source versions must be plainly marked as such, and must not be
18+ misrepresented as being the original software.
19+
20+ 3. This notice may not be removed or altered from any source
21+ distribution.
22+*/
23+
24+#pragma once
25+class GD_Exporter
26+{
27+public:
28+ GD_Exporter(void);
29+ ~GD_Exporter(void);
30+
31+ void MilkShape_Skeleton(void);
32+ void MilkShape_Model(bool DoMotions);
33+ void Object_Model(void);
34+ void Actor_Model(void);
35+ void Ogre3D_Model(void);
36+ void Actor_Decompile(void);
37+};
38+
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_ToOgre.cpp (revision 266)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_ToOgre.cpp (revision 267)
@@ -72,7 +72,7 @@
7272 ogreSubMesh->setMaterialName(MatName);
7373 }
7474 //------------------------------------------
75-
75+
7676 ogreSubMesh->vertexData = new Ogre::VertexData();
7777 ogreSubMesh->vertexData->vertexCount = App->Cl_Model->S_MeshGroup[i]->GroupVertCount;//App->CA_Milk_Import->GetNumVertices();//S_XMLStore[0]->SXMLCount;
7878 ogreSubMesh->vertexData->vertexStart = 0;
@@ -191,13 +191,13 @@
191191 for (size_t u = 0; u <= newDecl->getMaxSource(); ++u)
192192 bufferUsages.push_back(Ogre::HardwareBuffer::HBU_STATIC_WRITE_ONLY);
193193 ogreSubMesh->vertexData->reorganiseBuffers(newDecl, bufferUsages);
194+
194195 }
195196
196197 ogreMesh->_setBoundingSphereRadius(Ogre::Math::Sqrt(maxSquaredRadius));
197198 ogreMesh->_setBounds(Ogre::AxisAlignedBox(min, max), false);
198199
199- ogreMesh->load();
200-
200+ //ogreMesh->load();
201201 //Create_Skeleton(ogreMesh);
202202
203203 App->Cl19_Ogre->OgreModel_Ent = App->Cl19_Ogre->mSceneMgr->createEntity("cc", ogreMesh);
@@ -342,23 +342,10 @@
342342 // *************************************************************************
343343 bool GD_ToOgre::Create_Meterials()
344344 {
345-
346- Ogre::ResourceGroupManager::getSingleton().destroyResourceGroup(App->Cl19_Ogre->TempResourceGroup);
347- Ogre::ResourceGroupManager::getSingleton().createResourceGroup(App->Cl19_Ogre->TempResourceGroup);
348-
349345 Ogre::ResourceGroupManager::getSingleton().addResourceLocation(App->Cl_Model->Texture_FolderPath,
350346 "FileSystem",
351- App->Cl19_Ogre->TempResourceGroup);
347+ App->Cl19_Ogre->PermResourceGroup);
352348
353- try
354- {
355- Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
356- }
357- catch (...)
358- {
359-
360- }
361-
362349 return 1;
363350 //-------------------------------------------------------------------------
364351 char MatName[255];
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/Ogre_Basic.cpp (revision 266)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/Ogre_Basic.cpp (revision 267)
@@ -160,7 +160,7 @@
160160 switch (wmId)
161161 {
162162
163- // ---------------------------- Menu Details
163+ // ---------------------------- Menu Details
164164 case ID_DETAILS_MODELDATA:
165165 {
166166 if (App->Cl_ImGui->Show_Model_Data == 1)
@@ -220,14 +220,26 @@
220220 return 1;
221221 }
222222
223-
224-
223+
224+
225225 case IDM_ABOUT:
226226 DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
227227 break;
228228 case IDM_EXIT:
229- DestroyWindow(hWnd);
229+ {
230+ App->Say("Out1");
231+ /*App->CL64_Dialogs->YesNo("Close GameDirector", "Are you sure");
232+ if (App->GDCL_Dialogs->Canceled == 1)
233+ {
230234 break;
235+ }*/
236+ if (App->Cl19_Ogre->OgreListener->StopOgre == 0)
237+ {
238+ App->Cl19_Ogre->OgreListener->StopOgre = 1;
239+ }
240+ PostQuitMessage(0);
241+ }
242+ break;
231243 default:
232244 return DefWindowProc(hWnd, message, wParam, lParam);
233245 }
@@ -259,9 +271,10 @@
259271 }
260272
261273 }break;
274+
262275 case WM_CLOSE:
263276 {
264-
277+ App->Say("out");
265278 if (App->Cl19_Ogre->OgreListener->StopOgre == 0)
266279 {
267280 App->Cl19_Ogre->OgreListener->StopOgre = 1;
@@ -518,8 +531,11 @@
518531
519532 ////App->Cl_ImGui->Show_PhysicsConsole = 1;
520533
534+
521535 App->Cl19_Ogre->mRoot->startRendering();
522536
537+ App->Say("out");
538+
523539 Close_App();
524540
525541 SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, TRUE);
@@ -531,6 +547,10 @@
531547 // *************************************************************************
532548 void Close_App()
533549 {
550+ App->Say("out");
551+
552+ delete App->Cl_ToOgre;
553+
534554 if (App->Cl19_Ogre->mRoot)
535555 {
536556 delete App->Cl19_Ogre->mRoot;
@@ -537,5 +557,7 @@
537557 App->Cl19_Ogre->mRoot = NULL;
538558 }
539559
540- //ImGui::DestroyContext();
560+ App->Say("out");
561+
562+ ImGui::DestroyContext();
541563 }
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
--- GD19_OSDN/GD19_OSDN.cpp (revision 266)
+++ GD19_OSDN/GD19_OSDN.cpp (revision 267)
@@ -535,6 +535,7 @@
535535
536536 case WM_CLOSE:
537537 {
538+ App->Say("out1");
538539 /*App->CL_Dialogs->YesNo("Close GameDirector", "Are you sure");
539540 if (App->GDCL_Dialogs->Canceled == 1)
540541 {
@@ -1086,6 +1087,6 @@
10861087 delete App->Cl19_Ogre->mRoot;
10871088 App->Cl19_Ogre->mRoot = NULL;
10881089 }
1089-
1090+ App->Say("out");
10901091 ImGui::DestroyContext();
10911092 }
\ No newline at end of file
Show on old repository browser