From 7b6b5ba546450e71ecc812356952b594acc5add5 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 16 Jun 2019 12:44:54 -0400 Subject: [PATCH] Fix shadow touched. --- GroupEditor.java | 44 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/GroupEditor.java b/GroupEditor.java index b4f001a..7bbf24b 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -871,6 +871,7 @@ } else if(e.getSource() == liveCB) { cameraView.ToggleLive(); + refreshContents(false); } else if(e.getSource() == supportCB) { @@ -1278,7 +1279,7 @@ memoryItem.addActionListener(this); menu.add(analyzeItem = new MenuItem("Analyze")); analyzeItem.addActionListener(this); - menu.add(dumpItem = new MenuItem("Dump")); + menu.add(dumpItem = new MenuItem("Print")); dumpItem.addActionListener(this); // menu.add(pathItem = new MenuItem("From-to path")); // pathItem.addActionListener(this); @@ -2542,7 +2543,7 @@ } else if (source == genNormalsMESHItem) { - GenNormals(true); // TODO + GenNormalsMESH(); } else if (source == genNormalsORGANItem) { @@ -3429,7 +3430,8 @@ int size = obj.MemorySize(); - System.err.println((size/1024) + " KB is the size of " + obj); + //System.err.println((size/1024) + " KB is the size of " + obj); + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); } } catch (Exception e) @@ -3510,6 +3512,13 @@ void GenNormals(boolean crease) { group.GenNormalsS(crease); + + refreshContents(); + } + + void GenNormalsMESH() + { + group.GenNormalsMeshS(); refreshContents(); } @@ -4312,7 +4321,6 @@ //case 702: // Event.LIST_DESELECT group.deselectAll(); TreePath tps[] = objEditor.jTree.getSelectionPaths(); - objEditor.ClearInfo(); // .GetMaterial()); if (tps != null) { for (int i=0; i < tps.length; i++) @@ -4322,9 +4330,6 @@ //if (child.parent != null) //child.parent.addSelectee(child); group.addSelectee(child); - objEditor.SetMaterial(child); // .GetMaterial()); - objEditor.AddInfo(child, this, true); // .GetMaterial()); - System.err.println("info : " + child.GetPath()); } } // else @@ -4334,8 +4339,6 @@ // System.err.println("info : " + group.GetPath()); // } - objEditor.SetText(); // jan 2014 - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) CameraPane.flash = true; @@ -4359,6 +4362,29 @@ freezemodel = false; } + + void refreshContents(boolean cp) + { + if (!Globals.MOUSEDRAGGED) + { + objEditor.ClearInfo(); // .GetMaterial()); + + for (int i=0; i < group.selection.size(); i++) + { + Object3D child = (Object3D) group.selection.reserve(i); + + objEditor.SetMaterial(child); + objEditor.AddInfo(child, this, true); + System.err.println("info : " + child.GetPath()); + + group.selection.release(i); + } + + objEditor.SetText(); // jan 2014 + } + + super.refreshContents(cp); + } void linkSomething(Object3D thing) { -- Gitblit v1.6.2