From 3ae9b1de47e51e7c150412f2bb14383cb6a5f8f8 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sat, 08 Jun 2019 23:57:12 -0400 Subject: [PATCH] Fix "+" issue --- ObjEditor.java | 41 ++++++++++++++++++++++++----------------- 1 files changed, 24 insertions(+), 17 deletions(-) diff --git a/ObjEditor.java b/ObjEditor.java index 635db64..75f346b 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -501,13 +501,13 @@ //SendInfo("Name:", "bold"); if (sel.GetTextures() != null || debug) { - si.SendInfo(sel.toString(), "bold"); + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); if (sel.Size() > 0) { si.SendInfo("#children = " + sel.Size(), "regular"); } - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); if (debug) { try @@ -549,7 +549,7 @@ } if (sel.support != null) { - si.SendInfo(" support: " + sel.support, "regular"); + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); } if (sel.scriptnode != null) { @@ -752,7 +752,7 @@ protected static ImageIcon createImageIcon(String path, String description) { - java.net.URL imgURL = GrafreeD.class.getResource(path); + java.net.URL imgURL = Grafreed.class.getResource(path); if (imgURL != null) { return new ImageIcon(imgURL, description); @@ -784,6 +784,7 @@ // NumberSlider vDivsField; // JCheckBox endcaps; JCheckBox liveCB; + JCheckBox selectCB; JCheckBox hideCB; JCheckBox link2masterCB; JCheckBox markCB; @@ -986,9 +987,11 @@ liveCB = AddCheckBox(setupPanel, "Live", copy.live); liveCB.setToolTipText("Animate object"); + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); + selectCB.setToolTipText("Make object selectable"); +// Return(); hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); hideCB.setToolTipText("Hide object"); -// Return(); markCB = AddCheckBox(setupPanel, "Mark", copy.marked); markCB.setToolTipText("Set the animation target transform"); @@ -1028,7 +1031,7 @@ oe.ctrlPanel.add(commandsPanel); oe.ctrlPanel.Return(); - pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons normalpushField = (cNumberSlider)pushPanel.getComponent(1); //Return(); @@ -1476,19 +1479,19 @@ cGridBag editBar = new cGridBag().setVertical(false); - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); createMaterialButton.setToolTipText("Create material"); /* ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); */ - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); clearMaterialButton.setToolTipText("Clear material"); if (Globals.ADVANCED) { - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); } @@ -2396,7 +2399,7 @@ void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { /**/ FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); @@ -3007,6 +3010,10 @@ { copy.live ^= true; return; + } else if (event.getSource() == selectCB) + { + copy.dontselect ^= true; + return; } else if (event.getSource() == hideCB) { copy.hide ^= true; @@ -3255,8 +3262,8 @@ Globals.ANIMATION ^= true; - GrafreeD.wav.cursor = 0; - GrafreeD.wav.loop = 0; + Grafreed.wav.cursor = 0; + Grafreed.wav.loop = 0; } } else { @@ -3588,7 +3595,7 @@ } if (normalpushField != null) - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; } void SnapObject() @@ -4200,7 +4207,7 @@ void load() // throws ClassNotFoundException { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); browser.show(); @@ -4305,7 +4312,7 @@ void saveAs() { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); browser.setVisible(true); @@ -4416,7 +4423,7 @@ Object3D objectparent = obj.parent; obj.parent = null; - Object3D object = (Object3D) GrafreeD.clone(obj); + Object3D object = (Object3D) Grafreed.clone(obj); obj.parent = objectparent; @@ -4450,7 +4457,7 @@ buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); copy.generatePOV(buffer); - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Export POV", 1); browser.show(); -- Gitblit v1.6.2