Equity_ME 130322 Top Bar Class
@@ -4,6 +4,8 @@ | ||
4 | 4 | |
5 | 5 | Base_Group::Base_Group() |
6 | 6 | { |
7 | + GroupName[0] = 0; | |
8 | + MaterialName[0] = 0; | |
7 | 9 | } |
8 | 10 | |
9 | 11 |
@@ -4,5 +4,8 @@ | ||
4 | 4 | public: |
5 | 5 | Base_Group(); |
6 | 6 | ~Base_Group(); |
7 | + | |
8 | + char GroupName[255]; | |
9 | + char MaterialName[255]; | |
7 | 10 | }; |
8 | 11 |
@@ -35,6 +35,7 @@ | ||
35 | 35 | CL_Import = nullptr; |
36 | 36 | CL_FileIO = nullptr; |
37 | 37 | CL_Model = nullptr; |
38 | + CL_TopBar = nullptr; | |
38 | 39 | |
39 | 40 | hInst = nullptr; |
40 | 41 |
@@ -65,6 +66,7 @@ | ||
65 | 66 | CL_Import = new ME_Import(); |
66 | 67 | CL_FileIO = new ME_FileIO(); |
67 | 68 | CL_Model = new ME_Model(); |
69 | + CL_TopBar = new ME_TopBar(); | |
68 | 70 | |
69 | 71 | SetBrushes_Fonts(); |
70 | 72 | return 1; |
@@ -31,6 +31,7 @@ | ||
31 | 31 | #include "ME_Import.h" |
32 | 32 | #include "ME_FileIO.h" |
33 | 33 | #include "ME_Model.h" |
34 | +#include "ME_TopBar.h" | |
34 | 35 | |
35 | 36 | class ME_App |
36 | 37 | { |
@@ -46,7 +47,7 @@ | ||
46 | 47 | ME_Import* CL_Import; // Importer Class [050322] |
47 | 48 | ME_FileIO* CL_FileIO; // Windows Open/Save Routines [050322] |
48 | 49 | ME_Model* CL_Model; // Main Model Class [050322] |
49 | - | |
50 | + ME_TopBar* CL_TopBar; // Top Bar and Tabs [1350322] | |
50 | 51 | bool InitApp(void); |
51 | 52 | bool SetMainWin_Centre(void); |
52 | 53 |
@@ -149,28 +149,28 @@ | ||
149 | 149 | { |
150 | 150 | aiMesh* mesh = pScene->mMeshes[Count]; |
151 | 151 | |
152 | - App->CL_Vm_Model->Create_S_MeshGroup(Count); | |
152 | + App->CL_Model->Group[Count] = new Base_Group(); | |
153 | 153 | |
154 | 154 | _itoa(Count, GroupNum, 10); |
155 | 155 | strcpy(GroupName, "Group_"); |
156 | 156 | strcat(GroupName, GroupNum); |
157 | - strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->GroupName, GroupName); | |
157 | + strcpy(App->CL_Model->Group[Count]->GroupName, GroupName); | |
158 | 158 | |
159 | 159 | strcpy(MaterialName, "Material_"); |
160 | 160 | strcat(MaterialName, GroupNum); |
161 | - strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->MaterialName, MaterialName); | |
161 | + strcpy(App->CL_Model->Group[Count]->MaterialName, MaterialName); | |
162 | 162 | |
163 | 163 | ////--------------- |
164 | 164 | |
165 | - App->CL_Vm_Model->S_MeshGroup[Count]->GroupVertCount = 0; | |
166 | - App->CL_Vm_Model->S_MeshGroup[Count]->MaterialIndex = -1; | |
165 | + //App->CL_Vm_Model->S_MeshGroup[Count]->GroupVertCount = 0; | |
166 | + //App->CL_Vm_Model->S_MeshGroup[Count]->MaterialIndex = -1; | |
167 | 167 | |
168 | - App->CL_Vm_Model->S_MeshGroup[Count]->MaterialIndex = Count;//= mesh->mMaterialIndex; | |
168 | + //App->CL_Vm_Model->S_MeshGroup[Count]->MaterialIndex = Count;//= mesh->mMaterialIndex; | |
169 | 169 | |
170 | - strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->Text_FileName, "No_Texture"); | |
170 | + //strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->Text_FileName, "No_Texture"); | |
171 | 171 | |
172 | - App->CL_Vm_Model->S_MeshGroup[Count]->HasBones = mesh->HasBones(); | |
173 | - App->CL_Vm_Model->S_MeshGroup[Count]->BoneCount = mesh->mNumBones; | |
172 | + //App->CL_Vm_Model->S_MeshGroup[Count]->HasBones = mesh->HasBones(); | |
173 | + //App->CL_Vm_Model->S_MeshGroup[Count]->BoneCount = mesh->mNumBones; | |
174 | 174 | |
175 | 175 | /*if (App->S_MeshGroup[Count]->HasBones == 1) |
176 | 176 | { |
@@ -178,17 +178,17 @@ | ||
178 | 178 | }*/ |
179 | 179 | |
180 | 180 | // Get Texture Path/Name |
181 | - aiString texPath; | |
182 | - aiMaterial* mtl = pScene->mMaterials[mesh->mMaterialIndex]; | |
183 | - if (AI_SUCCESS == mtl->GetTexture(aiTextureType_DIFFUSE, 0, &texPath)) | |
184 | - { | |
185 | - strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->Text_FileName, texPath.C_Str()); | |
186 | - } | |
187 | - else | |
188 | - { | |
189 | - strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->Text_FileName, "No_Texture"); | |
190 | - //App->CL_Model_Data->S_MeshGroup[Count]->MaterialIndex = -1; | |
191 | - } | |
181 | + //aiString texPath; | |
182 | + //aiMaterial* mtl = pScene->mMaterials[mesh->mMaterialIndex]; | |
183 | + //if (AI_SUCCESS == mtl->GetTexture(aiTextureType_DIFFUSE, 0, &texPath)) | |
184 | + //{ | |
185 | + // strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->Text_FileName, texPath.C_Str()); | |
186 | + //} | |
187 | + //else | |
188 | + //{ | |
189 | + // strcpy(App->CL_Vm_Model->S_MeshGroup[Count]->Text_FileName, "No_Texture"); | |
190 | + // //App->CL_Model_Data->S_MeshGroup[Count]->MaterialIndex = -1; | |
191 | + //} | |
192 | 192 | |
193 | 193 | Count++; |
194 | 194 | } |
@@ -22,6 +22,9 @@ | ||
22 | 22 | */ |
23 | 23 | |
24 | 24 | #pragma once |
25 | + | |
26 | +#include "Base_Group.h" | |
27 | + | |
25 | 28 | class ME_Model |
26 | 29 | { |
27 | 30 | public: |
@@ -28,6 +31,8 @@ | ||
28 | 31 | ME_Model(); |
29 | 32 | ~ME_Model(); |
30 | 33 | |
34 | + Base_Group* Group[100]; | |
35 | + | |
31 | 36 | void Set_Groupt_Count(int Count); |
32 | 37 | int Get_Groupt_Count(); |
33 | 38 |
@@ -0,0 +1,36 @@ | ||
1 | +/* | |
2 | +Copyright (c) 2022 Equity_ME Model Editor -- Inflanite Software W.T.Flanigan 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 "ME_App.h" | |
26 | +#include "ME_TopBar.h" | |
27 | + | |
28 | + | |
29 | +ME_TopBar::ME_TopBar() | |
30 | +{ | |
31 | +} | |
32 | + | |
33 | + | |
34 | +ME_TopBar::~ME_TopBar() | |
35 | +{ | |
36 | +} |
@@ -0,0 +1,31 @@ | ||
1 | +/* | |
2 | +Copyright (c) 2022 Equity_ME Model Editor -- Inflanite Software W.T.Flanigan 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 ME_TopBar | |
26 | +{ | |
27 | +public: | |
28 | + ME_TopBar(); | |
29 | + ~ME_TopBar(); | |
30 | +}; | |
31 | + |