From cfd7a643cb5a445016ddb15595158ecc59b184fd Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 30 Jun 2019 18:18:44 -0400 Subject: [PATCH] Proto wget 3d models. --- GroupEditor.java | 68 ++++++++++++++++++++++----------- 1 files changed, 45 insertions(+), 23 deletions(-) diff --git a/GroupEditor.java b/GroupEditor.java index aa482be..776ef38 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -220,7 +220,7 @@ // toggleSwitchItem.addItemListener(this); // toggleSwitchItem.setState(CameraPane.SWITCH); - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); toggleHandleItem.addItemListener(this); toggleHandleItem.setState(CameraPane.HANDLES); @@ -582,7 +582,7 @@ */ cGridBag copyOptionsPanel = new cGridBag(); - copyOptionsPanel.preferredHeight = 2; + copyOptionsPanel.preferredHeight = 1; //this.AddOptions(oe.toolbarPanel, oe.aConstraints); @@ -590,9 +590,12 @@ //minButton.setToolTipText("Minimize window"); //minButton.addActionListener(this); - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - maxButton.setToolTipText("Maximize window"); - maxButton.addActionListener(this); + if (Globals.ADVANCED) + { + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + maxButton.setToolTipText("Maximize window"); + maxButton.addActionListener(this); + } oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); fullButton.setToolTipText("Full-screen window"); @@ -726,7 +729,7 @@ compositeButton.addActionListener(this); oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - switchButton.setToolTipText("Create switch"); + switchButton.setToolTipText("Create item switcher"); switchButton.addActionListener(this); oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); @@ -863,9 +866,13 @@ if (true) // Globals.ADVANCED) { - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); - supportCB.setToolTipText("Enable rigging"); - supportCB.addItemListener(this); +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); +// supportCB.setToolTipText("Enable rigging"); +// supportCB.addItemListener(this); + + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); + freezeCB.setToolTipText("Fast moving camera"); + freezeCB.addItemListener(this); // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); // localCB.addItemListener(this); @@ -929,7 +936,7 @@ toggleTextureCB.addItemListener(this); panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); - toggleSwitchCB.setToolTipText("Use switch"); + toggleSwitchCB.setToolTipText("Choose a single item"); toggleSwitchCB.addItemListener(this); panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); @@ -1000,6 +1007,7 @@ cCheckBox slowCB; cCheckBox boxCB; cCheckBox zoomBoxCB; + cCheckBox freezeCB; //cToggleButton trackCB; cCheckBox trackCB; cCheckBox smoothfocusCB; @@ -1117,6 +1125,10 @@ else if(e.getSource() == shadowCB) { Globals.COMPUTESHADOWWHENLIVE ^= true; + } + else if(e.getSource() == freezeCB) + { + Globals.FREEZEONMOVE ^= true; } else if(e.getSource() == autosaveCB) { @@ -2122,25 +2134,25 @@ Composite csg = new GroupLeaf(); csg.count = 5; group(csg); - Composite child = new cGroup(); + Composite child = new cGroup("Branch"); csg.addChild(child); child.addChild(csg); } else if (source == doubleItem) { - Composite csg = new GroupLeaf(); + Composite csg = new GroupLeaf("Fork"); csg.count = 5; group(csg); - Composite child = new cGroup(); + Composite child = new cGroup("Branch A"); csg.addChild(child); child.addChild(csg); - child = new cGroup(); + child = new cGroup("Branch B"); csg.addChild(child); child.addChild(csg); } else if (source == tripleItem) { - Composite csg = new GroupLeaf(); + Composite csg = new GroupLeaf("Trident"); csg.count = 4; group(csg); Composite child = new cGroup(); @@ -2755,15 +2767,28 @@ } else if (source == ungroupItem || source == ungroupButton) { - //ungroup(); + boolean hasRoot = false; + for (int i=0; i<group.selection.size(); i++) { - Ungroup(group.selection.get(i)); + if (group.selection.get(i) == group) + { + hasRoot = true; + break; + } } - ClearSelection(false); - - refreshContents(); + if (!hasRoot) + { + for (int i=0; i<group.selection.size(); i++) + { + Ungroup(group.selection.get(i)); + } + + ClearSelection(false); + + refreshContents(); + } } else if (source == genUVItem) { @@ -5526,9 +5551,6 @@ cButton restoreCameraButton; - cButton minButton; - cButton maxButton; - cButton fullButton; cButton saveButton; cButton oneStepButton; -- Gitblit v1.6.2