From 6a823ffbfcda4c843f46e02e83c869d5bc323e25 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Wed, 21 Aug 2019 20:15:53 -0400 Subject: [PATCH] Parallax presets --- GroupEditor.java | 199 +++++++++++++++++++++++++++++-------------------- 1 files changed, 118 insertions(+), 81 deletions(-) diff --git a/GroupEditor.java b/GroupEditor.java index 651e8a8..0ac356b 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -29,7 +29,7 @@ { cButton skyboxButton; final String path = "cubemaps/" + f + "-skyboxes/" + s; - row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Globals.NIMBUSLAF)); //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); skyboxButton.setToolTipText(s.equals("") ? "No background" : s); skyboxButton.addActionListener(new ActionListener() @@ -46,7 +46,7 @@ { cButton textureButton; final String path = "textures/" + f + "/" + c + "/"; // + t; - row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF)); + row.add(textureButton = GetButton(path + "icons/" + t, !Globals.NIMBUSLAF)); textureButton.setToolTipText(c + count); textureButton.addActionListener(new ActionListener() { @@ -347,7 +347,7 @@ public void CreateSkyboxPanel(cGridBag skyboxPanel) { - JTabbedPane skyboxpane = new JTabbedPane(); + JTabbedPane skyboxpane = new JTabbedPane(JTabbedPane.LEFT); AddSkyboxTab0(skyboxpane); AddSkyboxTab1(skyboxpane); @@ -415,12 +415,14 @@ this.copy = this.group = group; //selectees = this.group.selectees; + assert(false); + if (copy.versionlist == null) { copy.versionlist = new Object3D[100]; copy.versionindex = -1; - Save(true); + //Save(true); } if(ui) @@ -449,7 +451,7 @@ copy.versionlist = new Object3D[100]; copy.versionindex = -1; - Save(true); + //Save(true); } } @@ -569,9 +571,6 @@ // pasteExpandItem.addActionListener(this); //menu.add("-"); oe.jTree.popup.addSeparator(); - - deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); - deleteItem.addActionListener(this); if (Globals.ADVANCED) { @@ -706,15 +705,17 @@ setMasterItem.addActionListener(this); } - oe.menuBar.add(menu = new Menu("Group")); -// grabItem = menu.add(new MenuItem("Grab")); -// grabItem.addActionListener(this); + oe.menuBar.add(menu = new Menu("Order")); + backItem = menu.add(new MenuItem("Back")); backItem.addActionListener(this); frontItem = menu.add(new MenuItem("Front")); frontItem.addActionListener(this); // compositeItem = menu.add(new MenuItem("Composite")); // compositeItem.addActionListener(this); + + grabItem = oe.jTree.popup.add(new JMenuItem("Group")); + grabItem.addActionListener(this); if (Globals.ADVANCED) { @@ -723,6 +724,11 @@ } ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup")); ungroupItem.addActionListener(this); + + oe.jTree.popup.addSeparator(); + + deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); + deleteItem.addActionListener(this); // menu.add("-"); // @@ -851,9 +857,9 @@ hideleavesItem.addActionListener(this); showleavesItem = menu.add(new MenuItem("Show Leaves")); showleavesItem.addActionListener(this); - markleavesItem = menu.add(new MenuItem("Mark Leaves")); + markleavesItem = menu.add(new MenuItem("Anim Leaves")); markleavesItem.addActionListener(this); - unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); + unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves")); unmarkleavesItem.addActionListener(this); rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); rewindleavesItem.addActionListener(this); @@ -930,6 +936,8 @@ cGridBag currenttab; //boolean added; // patch for jar + int totalcount = 0; + int tabcount = 0; int colcount = 0; int rowcount = 0; @@ -958,7 +966,7 @@ texturecount = 0; } - if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) + if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png"))) { //if (!added) { @@ -967,7 +975,8 @@ currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); } - AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); + AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab); + totalcount++; if (++colcount >= columns) { @@ -993,6 +1002,8 @@ container.add(resourcecontainer); Grafreed.ParseResources("textures", this); + + // 935. System.out.println("Total = " + totalcount); } void SetupUI2(ObjEditor oe) @@ -1032,9 +1043,9 @@ oe.radioPanel.add(dummyButton); oe.buttonGroup.add(dummyButton); */ - cGridBag copyOptionsPanel = new cGridBag(); + cGridBag versionManagerPanel = new cGridBag(); - copyOptionsPanel.preferredHeight = 2; + versionManagerPanel.preferredHeight = 4; //this.AddOptions(oe.toolbarPanel, oe.aConstraints); @@ -1061,25 +1072,25 @@ // } // }); - oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); collapseButton.setToolTipText("Collapse toolbar"); collapseButton.addActionListener(this); - oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); maximize3DButton.setToolTipText("Maximize 3D view"); maximize3DButton.addActionListener(this); - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); twoButton.setToolTipText("Show 3D view only"); twoButton.addActionListener(this); this.fullscreenLayout = twoButton; - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); threeButton.setToolTipText("Show controls and 3D view"); threeButton.addActionListener(this); if (Globals.ADVANCED) { - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); sixButton.setToolTipText("Show 3D view and controls"); sixButton.addActionListener(this); } @@ -1088,50 +1099,51 @@ // sevenButton.addActionListener(this); // - oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); fullButton.setToolTipText("Full-screen window"); fullButton.addActionListener(this); - oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); screenfitButton.setToolTipText("Screen fit"); screenfitButton.addActionListener(this); - oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); restoreCameraButton.setToolTipText("Restore viewpoint"); restoreCameraButton.addActionListener(this); - copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); saveVersionButton.setToolTipText("Duplicate current version"); saveVersionButton.addActionListener(this); - copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); deleteVersionButton.setToolTipText("Delete current version"); deleteVersionButton.addActionListener(this); + deleteVersionButton.setEnabled(false); - copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); previousVersionButton.setToolTipText("Previous version"); previousVersionButton.addActionListener(this); previousVersionButton.setEnabled(false); cGridBag updown = new cGridBag().setVertical(true); - updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); restoreButton.setToolTipText("Undo (restore current version)"); restoreButton.addActionListener(this); - //restoreButton.setEnabled(false); + restoreButton.setEnabled(false); - updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); replaceButton.setToolTipText("Save (replace current version)"); replaceButton.addActionListener(this); - //replaceButton.setEnabled(false); + replaceButton.setEnabled(false); - copyOptionsPanel.add(updown); + versionManagerPanel.add(updown); - copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); nextVersionButton.setToolTipText("Next version"); nextVersionButton.addActionListener(this); nextVersionButton.setEnabled(false); - oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); oneStepButton.setToolTipText("Animate one step forward"); oneStepButton.addActionListener(this); @@ -1154,11 +1166,11 @@ if (Globals.ADVANCED) { - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints); snapobjectButton.addActionListener(this); snapobjectButton.setToolTipText("Snap Object"); - oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); fourButton.addActionListener(this); fourButton.setToolTipText("Show control panel only"); } @@ -1166,11 +1178,11 @@ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); - oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); rootButton.setToolTipText("Open selection in new tab"); rootButton.addActionListener(this); - oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); closeButton.setToolTipText("Close tab"); closeButton.addActionListener(this); //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); @@ -1179,38 +1191,38 @@ cGridBag row1 = new cGridBag(); // INSERT - row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); gridButton.setToolTipText("Create ground"); gridButton.addActionListener(this); - row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); boxButton.setToolTipText("Create box"); boxButton.addActionListener(this); - row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - sphereButton.setToolTipText("Create sphere"); - sphereButton.addActionListener(this); - - row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - coneButton.setToolTipText("Create cone"); - coneButton.addActionListener(this); - - row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - torusButton.setToolTipText("Create torus"); - torusButton.addActionListener(this); - - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); superButton.setToolTipText("Create superellipsoid"); superButton.addActionListener(this); + row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); + sphereButton.setToolTipText("Create sphere"); + sphereButton.addActionListener(this); + + row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); + coneButton.setToolTipText("Create cone"); + coneButton.addActionListener(this); + + row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); + torusButton.setToolTipText("Create torus"); + torusButton.addActionListener(this); + if (Globals.ADVANCED) { - oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); kleinButton.setToolTipText("Create Klein bottle"); kleinButton.addActionListener(this); } - row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); particlesButton.setToolTipText("Create particle system"); particlesButton.addActionListener(this); @@ -1218,31 +1230,31 @@ cGridBag row2 = new cGridBag(); - row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); groupButton.setToolTipText("Create group"); groupButton.addActionListener(this); - row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); compositeButton.setToolTipText("Create composite"); compositeButton.addActionListener(this); - row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); switchButton.setToolTipText("Create item switcher"); switchButton.addActionListener(this); - row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); loopButton.setToolTipText("Create loop"); loopButton.addActionListener(this); - row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); textureButton.setToolTipText("Create texture"); textureButton.addActionListener(this); - row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); overlayButton.setToolTipText("Create overlay"); overlayButton.addActionListener(this); - row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); lightButton.setToolTipText("Create light"); lightButton.addActionListener(this); @@ -1252,6 +1264,11 @@ CreateTexturePanel(textures); + int tabCount = resourcecontainer.getTabCount(); + + if (tabCount > 0) + resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount)); + oe.toolboxPanel.add(textures); textures.preferredHeight = 100; @@ -1259,11 +1276,11 @@ CreateSkyboxPanel(oe.skyboxPanel); // EDIT panel - editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); editButton.setToolTipText("Pin selection controls"); editButton.addActionListener(this); - editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); uneditButton.setToolTipText("Unpin and remove selection controls"); uneditButton.addActionListener(this); @@ -1271,7 +1288,7 @@ allParamsButton.setToolTipText("Show all controls"); allParamsButton.addActionListener(this); - editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); clearPanelButton.setToolTipText("Clear all controls"); clearPanelButton.addActionListener(this); @@ -1279,7 +1296,7 @@ //unselectButton.setToolTipText("Unselect"); //unselectButton.addActionListener(this); - editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); flashSelectionButton.setToolTipText("Highlight selection"); flashSelectionButton.addActionListener(this); @@ -1302,6 +1319,8 @@ cGridBag jSPPanel = new cGridBag(); + jSPPanel.preferredHeight = 20; + JScrollPane jSP; //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); @@ -1310,11 +1329,11 @@ oe.treePanel.add(jSPPanel); oe.treePanel.Return(); - oe.treePanel.add(copyOptionsPanel); + oe.treePanel.add(versionManagerPanel); oe.treePanel.Return(); - cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); - versionSlider = (cNumberSlider)sliderPane.getComponent(1); - sliderPane.preferredHeight = 1; + versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); + versionSlider = (cNumberSlider)versionSliderPane.getComponent(1); + versionSliderPane.preferredHeight = 3; // mainPanel.setDividerLocation(0.1); //1.0); mainPanel.setResizeWeight(0.4); @@ -1504,6 +1523,7 @@ oe.SetupViews(); + if (Globals.DEBUG) System.out.println("SetupViews"); DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ?? @@ -2165,7 +2185,11 @@ shadow.material = new cMaterial(obj.material); shadow.material.diffuse = 0.0001f; shadow.material.specular = 0.0001f; - //shadow.projectedVertices[1].x = 300; + shadow.material.opacity = 0.75f; + + AllocProjectedVertices(shadow); + + shadow.projectedVertices[1].x = 300; makeSomething(shadow); } @@ -3954,6 +3978,8 @@ if (source == closeButton) { //System.out.println("CLOSE: " + buttonGroup.getSelection()); + Replace(); + cRadio ab; for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) { @@ -4052,6 +4078,8 @@ } else if(source instanceof cRadio) { + Replace(); + group.parent = keepparent; group.attributes = 0; //group.editWindow = null; @@ -4107,10 +4135,21 @@ if (copy.versionlist == null) { - copy.versionlist = new Object3D[100]; copy.versionindex = -1; - Save(true); + // Cannot work with loops + // To fix this issue, we first mark all nodes above the root, + // and check if any of these nodes are reachable below the root. + Grafreed.grafreed.universe.TagObjects(copy, true); + + if (!copy.HasTags()) + { + copy.versionlist = new Object3D[100]; + + Save(true); + } + + Grafreed.grafreed.universe.TagObjects(copy, false); } SetVersionStates(); @@ -4258,7 +4297,7 @@ TouchTransform(obj); continue; } - if ((mask&2) != 0) // Scale + if ((mask&2) != 0) // Scale/rotation { obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1; obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0; @@ -4266,10 +4305,6 @@ obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1; obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0; obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0; - } - if ((mask&4) != 0) // Rotation - { - // ? } if ((mask&1) != 0) // Translation { @@ -5355,7 +5390,8 @@ if (group.selection != null) for (Enumeration e = group.selection.elements(); e.hasMoreElements();) { - if (!(e.nextElement() instanceof Composite)) + Object next = e.nextElement(); + if (!(next instanceof Composite)) // || (next instanceof GroupLeaf)) { allComposites = false; break; @@ -5367,6 +5403,7 @@ void refreshContents(boolean cp) { + if (Globals.ADVANCED) //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) { @@ -6346,7 +6383,7 @@ private MenuItem transformGeometryItem; private MenuItem transformChildrenItem; private MenuItem hideItem; - private MenuItem grabItem; + private JMenuItem grabItem; private MenuItem backItem; private MenuItem frontItem; private MenuItem cameraItem; -- Gitblit v1.6.2