Normand Briere
2019-06-16 372b7fd481a476cd659713a4a01bf28bf6760cbe
GroupEditor.java
....@@ -871,6 +871,7 @@
871871 } else if(e.getSource() == liveCB)
872872 {
873873 cameraView.ToggleLive();
874
+ refreshContents(false);
874875 }
875876 else if(e.getSource() == supportCB)
876877 {
....@@ -1278,7 +1279,7 @@
12781279 memoryItem.addActionListener(this);
12791280 menu.add(analyzeItem = new MenuItem("Analyze"));
12801281 analyzeItem.addActionListener(this);
1281
- menu.add(dumpItem = new MenuItem("Dump"));
1282
+ menu.add(dumpItem = new MenuItem("Print"));
12821283 dumpItem.addActionListener(this);
12831284 // menu.add(pathItem = new MenuItem("From-to path"));
12841285 // pathItem.addActionListener(this);
....@@ -2542,7 +2543,7 @@
25422543 } else
25432544 if (source == genNormalsMESHItem)
25442545 {
2545
- GenNormals(true); // TODO
2546
+ GenNormalsMESH();
25462547 } else
25472548 if (source == genNormalsORGANItem)
25482549 {
....@@ -3429,7 +3430,8 @@
34293430
34303431 int size = obj.MemorySize();
34313432
3432
- System.err.println((size/1024) + " KB is the size of " + obj);
3433
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3434
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
34333435 }
34343436 }
34353437 catch (Exception e)
....@@ -3510,6 +3512,13 @@
35103512 void GenNormals(boolean crease)
35113513 {
35123514 group.GenNormalsS(crease);
3515
+
3516
+ refreshContents();
3517
+ }
3518
+
3519
+ void GenNormalsMESH()
3520
+ {
3521
+ group.GenNormalsMeshS();
35133522
35143523 refreshContents();
35153524 }
....@@ -4312,7 +4321,6 @@
43124321 //case 702: // Event.LIST_DESELECT
43134322 group.deselectAll();
43144323 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4315
- objEditor.ClearInfo(); // .GetMaterial());
43164324 if (tps != null)
43174325 {
43184326 for (int i=0; i < tps.length; i++)
....@@ -4322,9 +4330,6 @@
43224330 //if (child.parent != null)
43234331 //child.parent.addSelectee(child);
43244332 group.addSelectee(child);
4325
- objEditor.SetMaterial(child); // .GetMaterial());
4326
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4327
- System.err.println("info : " + child.GetPath());
43284333 }
43294334 }
43304335 // else
....@@ -4334,8 +4339,6 @@
43344339 // System.err.println("info : " + group.GetPath());
43354340 // }
43364341
4337
- objEditor.SetText(); // jan 2014
4338
-
43394342 if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
43404343 CameraPane.flash = true;
43414344
....@@ -4359,6 +4362,29 @@
43594362
43604363 freezemodel = false;
43614364 }
4365
+
4366
+ void refreshContents(boolean cp)
4367
+ {
4368
+ if (!Globals.MOUSEDRAGGED)
4369
+ {
4370
+ objEditor.ClearInfo(); // .GetMaterial());
4371
+
4372
+ for (int i=0; i < group.selection.size(); i++)
4373
+ {
4374
+ Object3D child = (Object3D) group.selection.reserve(i);
4375
+
4376
+ objEditor.SetMaterial(child);
4377
+ objEditor.AddInfo(child, this, true);
4378
+ System.err.println("info : " + child.GetPath());
4379
+
4380
+ group.selection.release(i);
4381
+ }
4382
+
4383
+ objEditor.SetText(); // jan 2014
4384
+ }
4385
+
4386
+ super.refreshContents(cp);
4387
+ }
43624388
43634389 void linkSomething(Object3D thing)
43644390 {