• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision649 (tree)
Time2022-07-04 23:50:27
Authorhgtterry

Log Message

Equity_ME 040722 General

Change Summary

Incremental Difference

--- Equity_ME/Equity_ME/ME_Assimp.cpp (revision 648)
+++ Equity_ME/Equity_ME/ME_Assimp.cpp (revision 649)
@@ -282,7 +282,7 @@
282282 {
283283 aiMesh* mesh = pScene->mMeshes[Count];
284284
285- App->CL_Model->Group[Count] = new Base_Group();
285+ App->CL_Model->Create_Mesh_Group(Count);
286286
287287 _itoa(Count, GroupNum, 10);
288288 strcpy(GroupName, "Group_");
--- Equity_ME/Equity_ME/ME_Dimensions.cpp (revision 648)
+++ Equity_ME/Equity_ME/ME_Dimensions.cpp (revision 649)
@@ -308,67 +308,70 @@
308308 // *************************************************************************
309309 void ME_Dimensions::Scale_Model(bool Mode, float X, float Y, float Z)
310310 {
311- if (LockAxis == 1)
311+ if (App->CL_Model->Model_Loaded == 1)
312312 {
313- float Timeser = 1 / Model_XScale;
314- Ogre::Vector3 Scale;
315-
316- if (Mode == 1)
313+ if (LockAxis == 1)
317314 {
318- Scale.x = Model_XScale * 4;
319- Scale.y = Model_YScale * 4;
320- Scale.z = Model_ZScale * 4;
321- }
322- else
323- {
324- Scale.x = Model_XScale;
325- Scale.y = Model_YScale;
326- Scale.z = Model_ZScale;
327- }
315+ float Timeser = 1 / Model_XScale;
316+ Ogre::Vector3 Scale;
328317
329- int Count = 0;
330- int VertCount = 0;
318+ if (Mode == 1)
319+ {
320+ Scale.x = Model_XScale * 4;
321+ Scale.y = Model_YScale * 4;
322+ Scale.z = Model_ZScale * 4;
323+ }
324+ else
325+ {
326+ Scale.x = Model_XScale;
327+ Scale.y = Model_YScale;
328+ Scale.z = Model_ZScale;
329+ }
331330
332- int GroupCount = App->CL_Model->Get_Groupt_Count();
331+ int Count = 0;
332+ int VertCount = 0;
333333
334- while (Count < GroupCount)
335- {
336- VertCount = 0;
337- while (VertCount < App->CL_Model->Group[Count]->GroupVertCount)
334+ int GroupCount = App->CL_Model->Get_Groupt_Count();
335+
336+ while (Count < GroupCount)
338337 {
339- App->CL_Model->Group[Count]->vertex_Data[VertCount].x *= Scale.x;
340- App->CL_Model->Group[Count]->vertex_Data[VertCount].y *= Scale.y;
341- App->CL_Model->Group[Count]->vertex_Data[VertCount].z *= Scale.z;
342- VertCount++;
338+ VertCount = 0;
339+ while (VertCount < App->CL_Model->Group[Count]->GroupVertCount)
340+ {
341+ App->CL_Model->Group[Count]->vertex_Data[VertCount].x *= Scale.x;
342+ App->CL_Model->Group[Count]->vertex_Data[VertCount].y *= Scale.y;
343+ App->CL_Model->Group[Count]->vertex_Data[VertCount].z *= Scale.z;
344+ VertCount++;
345+ }
346+ Count++;
343347 }
344- Count++;
345- }
346348
347- App->CL_Model->GetBoundingBoxModel_Update();
349+ App->CL_Model->GetBoundingBoxModel_Update();
348350
349- }
350- else
351- {
352- Ogre::Vector3 Scale;
351+ }
352+ else
353+ {
354+ Ogre::Vector3 Scale;
353355
354- int Count = 0;
355- int VertCount = 0;
356+ int Count = 0;
357+ int VertCount = 0;
356358
357- int GroupCount = App->CL_Model->Get_Groupt_Count();
359+ int GroupCount = App->CL_Model->Get_Groupt_Count();
358360
359- while (Count < GroupCount)
360- {
361- VertCount = 0;
362- while (VertCount < App->CL_Model->Group[Count]->GroupVertCount)
361+ while (Count < GroupCount)
363362 {
364- App->CL_Model->Group[Count]->vertex_Data[VertCount].x *= X;
365- App->CL_Model->Group[Count]->vertex_Data[VertCount].y *= Y;
366- App->CL_Model->Group[Count]->vertex_Data[VertCount].z *= Z;
367- VertCount++;
363+ VertCount = 0;
364+ while (VertCount < App->CL_Model->Group[Count]->GroupVertCount)
365+ {
366+ App->CL_Model->Group[Count]->vertex_Data[VertCount].x *= X;
367+ App->CL_Model->Group[Count]->vertex_Data[VertCount].y *= Y;
368+ App->CL_Model->Group[Count]->vertex_Data[VertCount].z *= Z;
369+ VertCount++;
370+ }
371+ Count++;
368372 }
369- Count++;
373+
374+ App->CL_Model->GetBoundingBoxModel_Update();
370375 }
371-
372- App->CL_Model->GetBoundingBoxModel_Update();
373376 }
374377 }
\ No newline at end of file
--- Equity_ME/Equity_ME/ME_FileView.cpp (revision 648)
+++ Equity_ME/Equity_ME/ME_FileView.cpp (revision 649)
@@ -15,6 +15,8 @@
1515 strcpy(FileView_File, "");
1616
1717 FileView_Active = 0;
18+
19+ hImageList = nullptr;
1820 }
1921
2022
@@ -114,29 +116,30 @@
114116 InitCommonControls(); // make our tree control to work
115117
116118 ////====================================================//
117- //hImageList = ImageList_Create(16, 16, FALSE, 6, 0); // Zero Index
119+ hImageList = ImageList_Create(16, 16, FALSE, 6, 0); // Zero Index
118120
119- // //--------- Grayed Folder Closed Open 0 1
120- //hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_FILEINACTIVE));
121- //ImageList_Add(hImageList, hBitMap, NULL);
122- //DeleteObject(hBitMap);
121+ HBITMAP hBitMap;
122+ //--------- Grayed Folder Closed Open 0 1
123+ hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_FILEINACTIVE));
124+ ImageList_Add(hImageList, hBitMap, NULL);
125+ DeleteObject(hBitMap);
123126
124127 ////--------- Green Folder Closed Open 2 3
125- //hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_TREE));
126- //ImageList_Add(hImageList, hBitMap, NULL);
127- //DeleteObject(hBitMap);
128+ hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_TREE));
129+ ImageList_Add(hImageList, hBitMap, NULL);
130+ DeleteObject(hBitMap);
128131
129- ////--------- Uselected File Open 4
130- //hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_FILE));
131- //ImageList_Add(hImageList, hBitMap, (HBITMAP)NULL);
132- //DeleteObject(hBitMap);
132+ //--------- Uselected File Open 4
133+ hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_FILE));
134+ ImageList_Add(hImageList, hBitMap, (HBITMAP)NULL);
135+ DeleteObject(hBitMap);
133136
134- ////--------- Selected File Open 5
135- //hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_FILESELECTED));
136- //ImageList_Add(hImageList, hBitMap, (HBITMAP)NULL);
137- //DeleteObject(hBitMap);
137+ //--------- Selected File Open 5
138+ hBitMap = LoadBitmap(App->hInst, MAKEINTRESOURCE(IDB_FILESELECTED));
139+ ImageList_Add(hImageList, hBitMap, (HBITMAP)NULL);
140+ DeleteObject(hBitMap);
138141
139- //SendDlgItemMessage(App->ListPanel, IDC_TREE1, TVM_SETIMAGELIST, 0, (LPARAM)hImageList);
142+ SendDlgItemMessage(App->ListPanel, IDC_TREE1, TVM_SETIMAGELIST, 0, (LPARAM)hImageList);
140143
141144 HWND Temp = GetDlgItem(App->ListPanel, IDC_TREE1);
142145 TreeView_DeleteAllItems(Temp);
--- Equity_ME/Equity_ME/ME_FileView.h (revision 648)
+++ Equity_ME/Equity_ME/ME_FileView.h (revision 649)
@@ -35,6 +35,8 @@
3535
3636 HTREEITEM GD_ModelFolder;
3737 HTREEITEM GD_GroupsFolder;
38+
39+ HIMAGELIST hImageList;
3840 };
3941
4042
--- Equity_ME/Equity_ME/ME_Model.cpp (revision 648)
+++ Equity_ME/Equity_ME/ME_Model.cpp (revision 649)
@@ -168,6 +168,21 @@
168168 }
169169
170170 // *************************************************************************
171+// * Create_Mesh_Group Terry Flanigan *
172+// *************************************************************************
173+void ME_Model::Create_Mesh_Group(int Index)
174+{
175+ if (Group[Index] != nullptr)
176+ {
177+ delete Group[Index];
178+ Group[Index] = nullptr;
179+ }
180+
181+ App->CL_Model->Group[Index] = new Base_Group();
182+
183+}
184+
185+// *************************************************************************
171186 // * Create_BondingBox_Model Terry Bernie *
172187 // *************************************************************************
173188 void ME_Model::Create_BondingBox_Model(void)
@@ -202,7 +217,6 @@
202217 Count++;
203218 }
204219
205-
206220 S_BoundingBox[0]->Size[0].x = (fabs(S_BoundingBox[0]->BB_Max[0].x - S_BoundingBox[0]->BB_Min[0].x));
207221 S_BoundingBox[0]->Size[0].y = (fabs(S_BoundingBox[0]->BB_Max[0].y - S_BoundingBox[0]->BB_Min[0].y));
208222 S_BoundingBox[0]->Size[0].z = (fabs(S_BoundingBox[0]->BB_Max[0].z - S_BoundingBox[0]->BB_Min[0].z));
@@ -246,7 +260,6 @@
246260 Count++;
247261 }
248262
249-
250263 S_BoundingBox[0]->Size[0].x = (fabs(S_BoundingBox[0]->BB_Max[0].x - S_BoundingBox[0]->BB_Min[0].x));
251264 S_BoundingBox[0]->Size[0].y = (fabs(S_BoundingBox[0]->BB_Max[0].y - S_BoundingBox[0]->BB_Min[0].y));
252265 S_BoundingBox[0]->Size[0].z = (fabs(S_BoundingBox[0]->BB_Max[0].z - S_BoundingBox[0]->BB_Min[0].z));
@@ -273,6 +286,8 @@
273286
274287 App->CL_Grid->Reset_Class();
275288
289+ App->CL_TopBar->Reset_Class();
290+
276291 SetWindowText(App->MainHwnd, "Equity_ME");
277292 }
278293
--- Equity_ME/Equity_ME/ME_Model.h (revision 648)
+++ Equity_ME/Equity_ME/ME_Model.h (revision 649)
@@ -47,6 +47,7 @@
4747 int Get_Groupt_Count();
4848 void Set_Texture_Count(int Count);
4949 void Set_Motion_Count(int Count);
50+ void Create_Mesh_Group(int Index);
5051 void Create_BondingBox_Model(void);
5152 bool GetBoundingBoxModel_Update(void);
5253
--- Equity_ME/Equity_ME/ME_TopBar.cpp (revision 648)
+++ Equity_ME/Equity_ME/ME_TopBar.cpp (revision 649)
@@ -41,8 +41,8 @@
4141 Toggle_BBox_Flag = 0;
4242 Toggle_Faces_Flag = 0;
4343
44- Toggle_Tabs_Group_Flag = 1;
45- Toggle_Tabs_Model_Flag = 0;
44+ Toggle_Tabs_Group_Flag = 0;
45+ Toggle_Tabs_Model_Flag = 1;
4646 Toggle_Tabs_Camera_Flag = 0;
4747
4848 Toggle_Dimensions_Flag = 0;
@@ -60,6 +60,30 @@
6060 }
6161
6262 // *************************************************************************
63+// * Reaet_Class Terry Flanigan *
64+// *************************************************************************
65+void ME_TopBar::Reset_Class(void)
66+{
67+ Hide_Tabs();
68+
69+ Toggle_Dimensions_Flag = 0;
70+ Toggle_Group_ONLY_Flag = 0;
71+ Toggle_Group_HIDE_Flag = 0;
72+ Toggle_Group_ALL_Flag = 1;
73+ Toggle_GroupInfo_Flag = 0;
74+
75+ Toggle_Tabs_Model_Flag = 1;
76+
77+ ShowWindow(Model_TB_hWnd, SW_SHOW);
78+
79+ App->CL_TopBar->Toggle_Dimensions_Flag = 0;
80+ App->CL_ImGui->Show_Dimensions = 0;
81+ App->CL_Panels->Show_Panels(1);
82+
83+ RedrawWindow(App->CL_TopBar->Tabs_TB_hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
84+}
85+
86+// *************************************************************************
6387 // * Start_TopBar_Globals Terry *
6488 // *************************************************************************
6589 bool ME_TopBar::Start_TopBar()
@@ -749,7 +773,6 @@
749773 {
750774 case WM_INITDIALOG:
751775 {
752- SendDlgItemMessage(hDlg, IDC_BTMODELCENTRE, WM_SETFONT, (WPARAM)App->Font_CB15, MAKELPARAM(TRUE, 0));
753776 SendDlgItemMessage(hDlg, IDC_BTTBDIMENSIONS, WM_SETFONT, (WPARAM)App->Font_CB15, MAKELPARAM(TRUE, 0));
754777
755778 return TRUE;
@@ -764,13 +787,6 @@
764787 {
765788 LPNMHDR some_item = (LPNMHDR)lParam;
766789
767- if (some_item->idFrom == IDC_BTMODELCENTRE && some_item->code == NM_CUSTOMDRAW)
768- {
769- LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
770- App->Custom_Button_Toggle(item, 0);
771- return CDRF_DODEFAULT;
772- }
773-
774790 if(some_item->idFrom == IDC_BTTBDIMENSIONS && some_item->code == NM_CUSTOMDRAW)
775791 {
776792 LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
@@ -783,16 +799,6 @@
783799
784800 case WM_COMMAND:
785801 {
786- if (LOWORD(wParam) == IDC_BTMODELCENTRE)
787- {
788- if (App->CL_Model->Model_Loaded == 1)
789- {
790- App->CL_Dimensions->Centre_Model_Mid();
791- }
792-
793- return 1;
794- }
795-
796802 if (LOWORD(wParam) == IDC_BTTBDIMENSIONS)
797803 {
798804 //if (App->CL_Model->Model_Loaded == 1) // Check_Here
--- Equity_ME/Equity_ME/ME_TopBar.h (revision 648)
+++ Equity_ME/Equity_ME/ME_TopBar.h (revision 649)
@@ -28,6 +28,8 @@
2828 ME_TopBar();
2929 ~ME_TopBar();
3030
31+ void Reset_Class(void);
32+
3133 bool Start_TopBar();
3234
3335 bool Toggle_Dimensions_Flag;
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Show on old repository browser