From 6ed65dcb597fb2153cef75bf1845978f1115658c Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Fri, 14 Dec 2018 22:53:55 -0500 Subject: [PATCH] Repair shadow, normal push + attractor mesh. --- GroupEditor.java | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/GroupEditor.java b/GroupEditor.java index aafbf22..da3ecc4 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -649,14 +649,14 @@ void EditObject(Object3D obj) { - cRadio dummyButton = new cRadio(obj.name); - dummyButton.SetObject(obj); - dummyButton.layout = sevenButton; - dummyButton.SetCamera(cameraView.renderCamera, false); - dummyButton.addActionListener(this); - radioPanel.add(dummyButton); - buttonGroup.add(dummyButton); - dummyButton.doClick(); + cRadio radioButton = new cRadio(obj.name); + radioButton.SetObject(obj); + radioButton.layout = sevenButton; + radioButton.SetCamera(cameraView.renderCamera, false); + radioButton.addActionListener(this); + radioPanel.add(radioButton); + buttonGroup.add(radioButton); + radioButton.doClick(); } void SetupViews(ObjEditor oe) { @@ -1120,6 +1120,8 @@ resetParentItem.addActionListener(this); repairParentItem = menu.add(new MenuItem("Repair Parent")); repairParentItem.addActionListener(this); + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); + repairShadowItem.addActionListener(this); menu.add(invariantsItem = new MenuItem("Invariants")); invariantsItem.addActionListener(this); menu.add(recompileItem = new MenuItem("Recompile")); @@ -2537,6 +2539,20 @@ { Object3D obj = (Object3D)e.nextElement(); obj.RepairParent(); +// for (int i=0; i<obj.size(); i++) +// { +// obj.get(i).parent = obj; +// } + } + + refreshContents(); + } else + if (event.getSource() == repairShadowItem) + { + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) + { + Object3D obj = (Object3D)e.nextElement(); + obj.RepairShadow(); // for (int i=0; i<obj.size(); i++) // { // obj.get(i).parent = obj; @@ -5009,6 +5025,7 @@ private MenuItem resetParentItem; private MenuItem repairParentItem; + private MenuItem repairShadowItem; private MenuItem sortbysizeItem; private MenuItem sortbynameItem; -- Gitblit v1.6.2