Fix manip window + new icons.
 
	
	
	
	
	
	
		
		11 files added
	
		
		10 files modified
	
	
 
	
	
	
	
	
	
	
	| .. | .. | 
|---|
| 20 | 20 |          //<-2.2,0.7,-2> and pointed it at <-0.61,0.3,-0.6> | 
|---|
| 21 | 21 |      //    location = LA.newVector(2,0.7,-2); | 
|---|
| 22 | 22 |      //    lookAt = new cVector(0.6,0.3,-0.6); | 
|---|
| 23 |  | -        location = LA.newVector(3,2,2);  | 
|---|
 | 23 | +        location = LA.newVector(6,4,4);  | 
|---|
| 24 | 24 |          lookAt = new cVector(0.0,0.5,0); | 
|---|
| 25 | 25 |          direction = new cVector(); | 
|---|
| 26 | 26 |          toParent = LA.newMatrix(); | 
|---|
 
| .. | .. | 
|---|
| 11459 | 11459 |   | 
|---|
| 11460 | 11460 |      static boolean zoomonce = false; | 
|---|
| 11461 | 11461 |       | 
|---|
| 11462 |  | -    void CreateSelectedPoint()  | 
|---|
 | 11462 | +    static void CreateSelectedPoint()  | 
|---|
| 11463 | 11463 |      { | 
|---|
| 11464 | 11464 |          if (selectedpoint == null) | 
|---|
| 11465 | 11465 |          { | 
|---|
| .. | .. | 
|---|
| 14377 | 14377 |                  info.camera = renderCamera; | 
|---|
| 14378 | 14378 |                  info.x = x; | 
|---|
| 14379 | 14379 |                  info.y = y; | 
|---|
| 14380 |  | -                object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);  | 
|---|
 | 14380 | +                object.manipWindow.copy  | 
|---|
 | 14381 | +                        .doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);  | 
|---|
| 14381 | 14382 |              } else | 
|---|
| 14382 | 14383 |              { | 
|---|
| 14383 | 14384 |                  if (x < startX) | 
|---|
| .. | .. | 
|---|
| 14541 | 14542 |          ci.camera = renderCamera; | 
|---|
| 14542 | 14543 |          if (!isRenderer) | 
|---|
| 14543 | 14544 |          { | 
|---|
| 14544 |  | -            ObjEditor editWindow = object.editWindow;  | 
|---|
| 14545 |  | -            Object3D copy = editWindow.copy;  | 
|---|
| 14546 |  | -            if (copy.doEditClick(ci, 0))  | 
|---|
 | 14545 | +            //ObjEditor editWindow = object.editWindow;  | 
|---|
 | 14546 | +            //Object3D copy = editWindow.copy;  | 
|---|
 | 14547 | +            if (object.doEditClick(ci, 0))  | 
|---|
| 14547 | 14548 |              { | 
|---|
| 14548 | 14549 |                  setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); | 
|---|
| 14549 | 14550 |              } else | 
|---|
| .. | .. | 
|---|
| 16622 | 16623 |  //                System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]); | 
|---|
| 16623 | 16624 |  //                System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]); | 
|---|
| 16624 | 16625 |                   | 
|---|
 | 16626 | +                CreateSelectedPoint();  | 
|---|
 | 16627 | +                  | 
|---|
| 16625 | 16628 |                  // Will fit the mesh !!! | 
|---|
| 16626 | 16629 |                  selectedpoint.toParent[0][0] = 0.0001; | 
|---|
| 16627 | 16630 |                  selectedpoint.toParent[1][1] = 0.0001; | 
|---|
 
| .. | .. | 
|---|
| 10 | 10 |          public static boolean COMPUTESHADOWWHENLIVE = true; | 
|---|
| 11 | 11 |          public static boolean RENDERSHADOW = true; | 
|---|
| 12 | 12 |           | 
|---|
 | 13 | +        public static boolean SAVEONMAKE = false; // problems when auto-save (works with manual save)  | 
|---|
 | 14 | +          | 
|---|
| 13 | 15 |          public static boolean MOUSEDRAGGED = false; | 
|---|
| 14 | 16 |       | 
|---|
| 15 | 17 |          // Hold on calculation when moving camera | 
|---|
 
| .. | .. | 
|---|
| 580 | 580 |                  //minButton.setToolTipText("Minimize window"); | 
|---|
| 581 | 581 |  		//minButton.addActionListener(this); | 
|---|
| 582 | 582 |                   | 
|---|
| 583 |  | -		oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 583 | +		oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 584 | 584 |                  maxButton.setToolTipText("Maximize window"); | 
|---|
| 585 | 585 |  		maxButton.addActionListener(this); | 
|---|
| 586 | 586 |                   | 
|---|
| 587 |  | -		oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 587 | +		oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 588 | 588 |                  fullButton.setToolTipText("Full-screen window"); | 
|---|
| 589 | 589 |  		fullButton.addActionListener(this); | 
|---|
| 590 | 590 |                   | 
|---|
| 591 |  | -		oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 591 | +		oe.toolbarPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 592 | 592 |                  undoButton.setToolTipText("Undo changes"); | 
|---|
| 593 | 593 |  		undoButton.addActionListener(this); | 
|---|
| 594 | 594 |                   | 
|---|
| 595 |  | -		oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 595 | +		oe.toolbarPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 596 | 596 |                  redoButton.setToolTipText("Redo changes"); | 
|---|
| 597 | 597 |  		redoButton.addActionListener(this); | 
|---|
| 598 | 598 |                   | 
|---|
| 599 |  | -		oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 599 | +		oe.toolbarPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 600 | 600 |                  saveButton.setToolTipText("Save changes"); | 
|---|
| 601 | 601 |  		saveButton.addActionListener(this); | 
|---|
| 602 | 602 |                   | 
|---|
| 603 |  | -                oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);  | 
|---|
 | 603 | +                oe.toolbarPanel.add(liveCB = GetCheckBox("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);  | 
|---|
| 604 | 604 |                  liveCB.setToolTipText("Enable animation"); | 
|---|
| 605 | 605 |                                  liveCB.addItemListener(this); | 
|---|
| 606 | 606 |   | 
|---|
| 607 |  | -		oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 608 |  | -                oneStepButton.setToolTipText("Animate one step forward");  | 
|---|
| 609 |  | -		oneStepButton.addActionListener(this);  | 
|---|
| 610 |  | -                  | 
|---|
| 611 |  | -                oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);  | 
|---|
 | 607 | +                oe.toolbarPanel.add(fastCB = GetCheckBox("icons/runfast.png", CameraPane.FAST)); //, constraints);  | 
|---|
| 612 | 608 |                  fastCB.setToolTipText("Fast mode"); | 
|---|
| 613 | 609 |                                  fastCB.addItemListener(this); | 
|---|
| 614 | 610 |                                   | 
|---|
| 615 |  | -                oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints);  | 
|---|
 | 611 | +		oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 612 | +                oneStepButton.setToolTipText("Animate one step forward");  | 
|---|
 | 613 | +		oneStepButton.addActionListener(this);  | 
|---|
 | 614 | +                  | 
|---|
 | 615 | +                oe.toolbarPanel.add(trackCB = GetCheckBox("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);  | 
|---|
| 616 | 616 |                  trackCB.setToolTipText("Enable tracking"); | 
|---|
| 617 | 617 |                                  trackCB.addItemListener(this); | 
|---|
| 618 | 618 |   | 
|---|
| 619 |  | -		oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 619 | +		oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 620 | 620 |                  screenfitButton.setToolTipText("Screen fit"); | 
|---|
| 621 | 621 |  		screenfitButton.addActionListener(this); | 
|---|
| 622 | 622 |   | 
|---|
| .. | .. | 
|---|
| 630 | 630 |                          snapobjectButton.setToolTipText("Snap Object"); | 
|---|
| 631 | 631 |                  } | 
|---|
| 632 | 632 |   | 
|---|
| 633 |  | -		oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
| 634 |  | -                flashSelectionButton.setToolTipText("Show selection");  | 
|---|
 | 633 | +		oe.toolbarPanel.add(flashSelectionButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);  | 
|---|
 | 634 | +                flashSelectionButton.setToolTipText("Highlight selection");  | 
|---|
| 635 | 635 |  		flashSelectionButton.addActionListener(this); | 
|---|
| 636 | 636 |                   | 
|---|
| 637 | 637 |  		oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); | 
|---|
| .. | .. | 
|---|
| 815 | 815 |                  shadowCB.setToolTipText("Compute shadows when live"); | 
|---|
| 816 | 816 |                                  shadowCB.addItemListener(this); | 
|---|
| 817 | 817 |   | 
|---|
 | 818 | +                panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);  | 
|---|
 | 819 | +                autosaveCB.setToolTipText("Auto-save on structure change");  | 
|---|
 | 820 | +                                autosaveCB.addItemListener(this);  | 
|---|
 | 821 | +  | 
|---|
| 818 | 822 |              if (Globals.ADVANCED) | 
|---|
| 819 | 823 |              { | 
|---|
| 820 | 824 |                  panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); | 
|---|
| .. | .. | 
|---|
| 864 | 868 |              /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); | 
|---|
| 865 | 869 |          } | 
|---|
| 866 | 870 |   | 
|---|
| 867 |  | -        JCheckBox liveCB;  | 
|---|
| 868 |  | -        JCheckBox supportCB;  | 
|---|
| 869 |  | -        JCheckBox localCB;  | 
|---|
| 870 |  | -        JCheckBox crowdCB;  | 
|---|
| 871 |  | -        JCheckBox smoothCB;  | 
|---|
| 872 |  | -        JCheckBox fastCB;  | 
|---|
| 873 |  | -        JCheckBox slowCB;  | 
|---|
| 874 |  | -        JCheckBox boxCB;  | 
|---|
| 875 |  | -        JCheckBox zoomBoxCB;  | 
|---|
| 876 |  | -        JCheckBox trackCB;  | 
|---|
| 877 |  | -        JCheckBox smoothfocusCB;  | 
|---|
 | 871 | +        cCheckBox liveCB;  | 
|---|
 | 872 | +        cCheckBox supportCB;  | 
|---|
 | 873 | +        cCheckBox localCB;  | 
|---|
 | 874 | +        cCheckBox crowdCB;  | 
|---|
 | 875 | +        cCheckBox smoothCB;  | 
|---|
 | 876 | +        cCheckBox fastCB;  | 
|---|
 | 877 | +        cCheckBox slowCB;  | 
|---|
 | 878 | +        cCheckBox boxCB;  | 
|---|
 | 879 | +        cCheckBox zoomBoxCB;  | 
|---|
 | 880 | +        cCheckBox trackCB;  | 
|---|
 | 881 | +        cCheckBox smoothfocusCB;  | 
|---|
| 878 | 882 |  //        JCheckBox speakerMocapCB; | 
|---|
| 879 |  | -        JCheckBox speakerCameraCB;  | 
|---|
| 880 |  | -        JCheckBox speakerFocusCB;  | 
|---|
| 881 |  | -        JCheckBox debugCB;  | 
|---|
 | 883 | +        cCheckBox speakerCameraCB;  | 
|---|
 | 884 | +        cCheckBox speakerFocusCB;  | 
|---|
 | 885 | +        cCheckBox debugCB;  | 
|---|
| 882 | 886 |           | 
|---|
| 883 |  | -        JCheckBox oeilCB;  | 
|---|
| 884 |  | -        JCheckBox shadowCB;  | 
|---|
| 885 |  | -        JCheckBox lookAtCB;  | 
|---|
 | 887 | +        cCheckBox oeilCB;  | 
|---|
 | 888 | +        cCheckBox shadowCB;  | 
|---|
 | 889 | +        cCheckBox autosaveCB;  | 
|---|
 | 890 | +        cCheckBox lookAtCB;  | 
|---|
| 886 | 891 |           | 
|---|
| 887 | 892 |  //        static int COLOR = 1; | 
|---|
| 888 | 893 |  //        static int MATERIAL = 2; | 
|---|
| .. | .. | 
|---|
| 890 | 895 |           | 
|---|
| 891 | 896 |          int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; | 
|---|
| 892 | 897 |           | 
|---|
| 893 |  | -        JCheckBox colorCB;  | 
|---|
| 894 |  | -        JCheckBox materialCB;  | 
|---|
| 895 |  | -        JCheckBox textureCB;  | 
|---|
 | 898 | +        cCheckBox colorCB;  | 
|---|
 | 899 | +        cCheckBox materialCB;  | 
|---|
 | 900 | +        cCheckBox textureCB;  | 
|---|
| 896 | 901 |           | 
|---|
| 897 | 902 |          public void itemStateChanged(ItemEvent e) | 
|---|
| 898 | 903 |          { | 
|---|
| .. | .. | 
|---|
| 988 | 993 |              else if(e.getSource() == shadowCB) | 
|---|
| 989 | 994 |              { | 
|---|
| 990 | 995 |                  Globals.COMPUTESHADOWWHENLIVE ^= true; | 
|---|
 | 996 | +            }  | 
|---|
 | 997 | +            else if(e.getSource() == autosaveCB)  | 
|---|
 | 998 | +            {  | 
|---|
 | 999 | +                Globals.SAVEONMAKE ^= true;  | 
|---|
| 991 | 1000 |              } | 
|---|
| 992 | 1001 |              else if(e.getSource() == lookAtCB) | 
|---|
| 993 | 1002 |              { | 
|---|
| .. | .. | 
|---|
| 3159 | 3168 |                                  buttonGroup.remove(ab); | 
|---|
| 3160 | 3169 |                                  radioPanel.remove(ab); | 
|---|
| 3161 | 3170 |                                   | 
|---|
| 3162 |  | -                                ab.GetObject().editWindow = null;  | 
|---|
 | 3171 | +                                //ab.GetObject().editWindow = null;  | 
|---|
 | 3172 | +                                ab.GetObject().manipWindow = null;  | 
|---|
| 3163 | 3173 |                              //    ab.GetObject().objectUI = null; // ????????? | 
|---|
| 3164 | 3174 |                                   | 
|---|
| 3165 | 3175 |                                  ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); | 
|---|
| .. | .. | 
|---|
| 3273 | 3283 |                       | 
|---|
| 3274 | 3284 |  // fix "+" issue | 
|---|
| 3275 | 3285 |                      //group.editWindow = this; | 
|---|
 | 3286 | +                    group.manipWindow = this;  | 
|---|
| 3276 | 3287 |                       | 
|---|
| 3277 | 3288 |                      /* | 
|---|
| 3278 | 3289 |                      currentLayout = radio.layout; | 
|---|
| .. | .. | 
|---|
| 4595 | 4606 |                   | 
|---|
| 4596 | 4607 |  		if (cut) | 
|---|
| 4597 | 4608 |  		{ | 
|---|
 | 4609 | +        if (Globals.SAVEONMAKE)  | 
|---|
| 4598 | 4610 |                      Save(); | 
|---|
| 4599 | 4611 |  			//int indices[] = jList.getSelectedIndices(); | 
|---|
| 4600 | 4612 |  			//for (int i = indices.length - 1; i >= 0; i--) | 
|---|
 
| .. | .. | 
|---|
| 501 | 501 |          centroid.z = matrix[3][2]; | 
|---|
| 502 | 502 |  //        this.getCentroid(centroid, true); | 
|---|
| 503 | 503 |           | 
|---|
 | 504 | +        CameraPane.CreateSelectedPoint();  | 
|---|
| 504 | 505 |          CameraPane.debugpointG.name = ""; | 
|---|
| 505 | 506 |          CameraPane.debugpointG.toParent[3][0] = mocaporigin.x; | 
|---|
| 506 | 507 |          CameraPane.debugpointG.toParent[3][1] = mocaporigin.y; | 
|---|
 
| .. | .. | 
|---|
| 4 | 4 |   | 
|---|
| 5 | 5 |  import java.awt.*; | 
|---|
| 6 | 6 |  import java.awt.event.*; | 
|---|
 | 7 | +import java.awt.image.BufferedImage;  | 
|---|
| 7 | 8 |  import javax.swing.*; | 
|---|
| 8 | 9 |  import javax.swing.event.*; | 
|---|
| 9 | 10 |  import javax.swing.text.*; | 
|---|
| .. | .. | 
|---|
| 37 | 38 |      JFrame frame; | 
|---|
| 38 | 39 |       | 
|---|
| 39 | 40 |      static ObjEditor theFrame; | 
|---|
 | 41 | +      | 
|---|
 | 42 | +    cButton GetButton(String name, boolean border)  | 
|---|
 | 43 | +    {  | 
|---|
 | 44 | +        try  | 
|---|
 | 45 | +        {  | 
|---|
 | 46 | +            ImageIcon icon = GetIcon(name);  | 
|---|
 | 47 | +            return new cButton(icon, border);  | 
|---|
 | 48 | +        }  | 
|---|
 | 49 | +        catch (Exception e)  | 
|---|
 | 50 | +        {  | 
|---|
 | 51 | +            return new cButton(name, border);  | 
|---|
 | 52 | +        }  | 
|---|
 | 53 | +    }  | 
|---|
 | 54 | +  | 
|---|
 | 55 | +    cCheckBox GetCheckBox(String name, boolean border)  | 
|---|
 | 56 | +    {  | 
|---|
 | 57 | +        try  | 
|---|
 | 58 | +        {  | 
|---|
 | 59 | +            ImageIcon icon = GetIcon(name);  | 
|---|
 | 60 | +            return new cCheckBox(icon, border);  | 
|---|
 | 61 | +        }  | 
|---|
 | 62 | +        catch (Exception e)  | 
|---|
 | 63 | +        {  | 
|---|
 | 64 | +            return new cCheckBox(name, border);  | 
|---|
 | 65 | +        }  | 
|---|
 | 66 | +    }  | 
|---|
 | 67 | +  | 
|---|
 | 68 | +    private ImageIcon GetIcon(String name) throws IOException  | 
|---|
 | 69 | +    {  | 
|---|
 | 70 | +        BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));  | 
|---|
 | 71 | +          | 
|---|
 | 72 | +        if (image.getWidth() != 24 && image.getHeight() != 24)  | 
|---|
 | 73 | +        {  | 
|---|
 | 74 | +            BufferedImage resized = new BufferedImage(24, 24, image.getType());  | 
|---|
 | 75 | +            Graphics2D g = resized.createGraphics();  | 
|---|
 | 76 | +            g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);  | 
|---|
 | 77 | +            //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);  | 
|---|
 | 78 | +            g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null);  | 
|---|
 | 79 | +            g.dispose();  | 
|---|
 | 80 | +              | 
|---|
 | 81 | +            image = resized;  | 
|---|
 | 82 | +        }  | 
|---|
 | 83 | +          | 
|---|
 | 84 | +        javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);  | 
|---|
 | 85 | +        return icon;  | 
|---|
 | 86 | +    }  | 
|---|
| 40 | 87 |       | 
|---|
| 41 | 88 |      // SCRIPT | 
|---|
| 42 | 89 |       | 
|---|
| .. | .. | 
|---|
| 3408 | 3455 |       | 
|---|
| 3409 | 3456 |      public void Save() | 
|---|
| 3410 | 3457 |      { | 
|---|
 | 3458 | +        System.err.println("Save");  | 
|---|
 | 3459 | +          | 
|---|
| 3411 | 3460 |          cRadio tab = GetCurrentTab(); | 
|---|
| 3412 | 3461 |           | 
|---|
| 3413 | 3462 |          boolean temp = CameraPane.SWITCH; | 
|---|
| .. | .. | 
|---|
| 3492 | 3541 |       | 
|---|
| 3493 | 3542 |      public void Undo() | 
|---|
| 3494 | 3543 |      { | 
|---|
 | 3544 | +        System.err.println("Undo");  | 
|---|
 | 3545 | +          | 
|---|
| 3495 | 3546 |          cRadio tab = GetCurrentTab(); | 
|---|
| 3496 | 3547 |           | 
|---|
| 3497 | 3548 |          if (tab.undoindex == 0) | 
|---|
| .. | .. | 
|---|
| 4170 | 4221 |   | 
|---|
| 4171 | 4222 |      void makeSomething(Object3D thing, boolean resetmodel) // deselect) | 
|---|
| 4172 | 4223 |      { | 
|---|
| 4173 |  | -        Save();  | 
|---|
 | 4224 | +        if (Globals.SAVEONMAKE)  | 
|---|
 | 4225 | +            Save();  | 
|---|
| 4174 | 4226 |          //Tween.set(thing, 0).target(1).start(tweenManager); | 
|---|
| 4175 | 4227 |          //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); | 
|---|
| 4176 | 4228 |  //            if (thing instanceof GenericJointDemo) | 
|---|
| .. | .. | 
|---|
| 4479 | 4531 |           | 
|---|
| 4480 | 4532 |          if (readobj != null) | 
|---|
| 4481 | 4533 |          { | 
|---|
 | 4534 | +        if (Globals.SAVEONMAKE)  | 
|---|
| 4482 | 4535 |              Save(); | 
|---|
| 4483 | 4536 |              try | 
|---|
| 4484 | 4537 |              { | 
|---|
 
| .. | .. | 
|---|
| 181 | 181 |              return; | 
|---|
| 182 | 182 |          } | 
|---|
| 183 | 183 |   | 
|---|
| 184 |  | -        Object3D o = new Object3D();  | 
|---|
 | 184 | +        Object3D o = new Object3D("copy of " + this.name);  | 
|---|
| 185 | 185 |   | 
|---|
| 186 | 186 |          hashtable.put(GetUUID(), o); | 
|---|
| 187 | 187 |   | 
|---|
| .. | .. | 
|---|
| 219 | 219 |          if (!hashtable.containsKey(GetUUID())) | 
|---|
| 220 | 220 |              return; | 
|---|
| 221 | 221 |   | 
|---|
 | 222 | +        if (blockloop)  | 
|---|
 | 223 | +            return;  | 
|---|
 | 224 | +  | 
|---|
 | 225 | +        blockloop = true;  | 
|---|
 | 226 | +  | 
|---|
| 222 | 227 |          Object3D o = hashtable.get(GetUUID()); | 
|---|
| 223 | 228 |   | 
|---|
| 224 | 229 |          RestoreBigData(o); | 
|---|
| 225 | 230 |   | 
|---|
| 226 |  | -        hashtable.remove(GetUUID());  | 
|---|
 | 231 | +        //hashtable.remove(GetUUID());  | 
|---|
| 227 | 232 |   | 
|---|
| 228 | 233 |          for (int i=0; i<Size(); i++) | 
|---|
| 229 | 234 |          { | 
|---|
| 230 | 235 |              get(i).RestoreBigData(hashtable); | 
|---|
| 231 | 236 |          } | 
|---|
 | 237 | +          | 
|---|
 | 238 | +        blockloop = false;  | 
|---|
| 232 | 239 |      } | 
|---|
| 233 | 240 |   | 
|---|
| 234 | 241 |      void RestoreBigData(Object3D o) | 
|---|
| .. | .. | 
|---|
| 2433 | 2440 |          { | 
|---|
| 2434 | 2441 |              editWindow.refreshContents(); | 
|---|
| 2435 | 2442 |          } | 
|---|
 | 2443 | +        else  | 
|---|
 | 2444 | +        {  | 
|---|
 | 2445 | +            if (manipWindow != null)  | 
|---|
 | 2446 | +            {  | 
|---|
 | 2447 | +                manipWindow.refreshContents();  | 
|---|
 | 2448 | +            }  | 
|---|
 | 2449 | +        }  | 
|---|
 | 2450 | +                  | 
|---|
| 2436 | 2451 |      //if (parent != null) | 
|---|
| 2437 | 2452 |      //parent.refreshEditWindow(); | 
|---|
| 2438 | 2453 |      } | 
|---|
| .. | .. | 
|---|
| 4963 | 4978 |          } | 
|---|
| 4964 | 4979 |      } | 
|---|
| 4965 | 4980 |       | 
|---|
 | 4981 | +    ObjEditor GetWindow()  | 
|---|
 | 4982 | +    {  | 
|---|
 | 4983 | +        if (editWindow != null)  | 
|---|
 | 4984 | +            return editWindow;  | 
|---|
 | 4985 | +          | 
|---|
 | 4986 | +        return manipWindow;  | 
|---|
 | 4987 | +    }  | 
|---|
 | 4988 | +      | 
|---|
| 4966 | 4989 |      cTreePath Select(int indexcount, boolean deselect) | 
|---|
| 4967 | 4990 |      { | 
|---|
| 4968 | 4991 |          if (hide || dontselect) | 
|---|
| .. | .. | 
|---|
| 4999 | 5022 |                  if (leaf != null) | 
|---|
| 5000 | 5023 |                  { | 
|---|
| 5001 | 5024 |                      cTreePath tp = new cTreePath(this, leaf); | 
|---|
| 5002 |  | -                    if (editWindow != null)  | 
|---|
 | 5025 | +                    ObjEditor window = GetWindow();  | 
|---|
 | 5026 | +                    if (window != null)  | 
|---|
| 5003 | 5027 |                      { | 
|---|
| 5004 | 5028 |                          //System.out.println("editWindow = " + editWindow + " vs " + this); | 
|---|
| 5005 |  | -                        editWindow.Select(tp, deselect, true);  | 
|---|
 | 5029 | +                        window.Select(tp, deselect, true);  | 
|---|
| 5006 | 5030 |                      } | 
|---|
| 5007 | 5031 |   | 
|---|
| 5008 | 5032 |                      return tp; | 
|---|
| .. | .. | 
|---|
| 5028 | 5052 |                  if (leaf != null) | 
|---|
| 5029 | 5053 |                  { | 
|---|
| 5030 | 5054 |                      cTreePath tp = new cTreePath(this, leaf); | 
|---|
| 5031 |  | -                    if (editWindow != null)  | 
|---|
 | 5055 | +                    ObjEditor window = GetWindow();  | 
|---|
 | 5056 | +                    if (window != null)  | 
|---|
| 5032 | 5057 |                      { | 
|---|
| 5033 |  | -                        editWindow.Select(tp, deselect, true);  | 
|---|
 | 5058 | +                        window.Select(tp, deselect, true);  | 
|---|
| 5034 | 5059 |                      } | 
|---|
| 5035 | 5060 |   | 
|---|
| 5036 | 5061 |                      return tp; | 
|---|
| .. | .. | 
|---|
| 7967 | 7992 |      } | 
|---|
| 7968 | 7993 |       | 
|---|
| 7969 | 7994 |      transient ObjEditor editWindow; | 
|---|
 | 7995 | +    transient ObjEditor manipWindow;  | 
|---|
 | 7996 | +      | 
|---|
| 7970 | 7997 |      transient ObjectUI objectUI; | 
|---|
| 7971 | 7998 |      public static int povDepth = 0; | 
|---|
| 7972 | 7999 |      private static cVector tbMin = new cVector(); | 
|---|
 
| .. | .. | 
|---|
| 21 | 21 |                  //setBorder(null); //new javax.swing.border.EmptyBorder(0,0,0,0)); | 
|---|
| 22 | 22 |          } | 
|---|
| 23 | 23 |      } | 
|---|
 | 24 | +      | 
|---|
 | 25 | +    cButton(javax.swing.ImageIcon icon, boolean border)  | 
|---|
 | 26 | +    {  | 
|---|
 | 27 | +        super(icon);  | 
|---|
 | 28 | +          | 
|---|
 | 29 | +        setMargin(new java.awt.Insets(1, 1, 1, 1));  | 
|---|
 | 30 | +          | 
|---|
 | 31 | +//result = new JButton( icon );  | 
|---|
 | 32 | +//result.setBorderPainted( false );  | 
|---|
 | 33 | +//result.setContentAreaFilled( false );  | 
|---|
 | 34 | +//  | 
|---|
 | 35 | +//width = icon.getIconWidth();  | 
|---|
 | 36 | +//height = icon.getIconHeight();  | 
|---|
 | 37 | +//result.setPreferredSize( new Dimension( width, height ) );  | 
|---|
 | 38 | +        if (border)  | 
|---|
 | 39 | +                setBorder(new javax.swing.border.EtchedBorder());  | 
|---|
 | 40 | +        else  | 
|---|
 | 41 | +        {  | 
|---|
 | 42 | +                //setBorder(null); //new javax.swing.border.EmptyBorder(0,0,0,0));  | 
|---|
 | 43 | +        }  | 
|---|
 | 44 | +    }  | 
|---|
| 24 | 45 |  } | 
|---|
 
| .. | .. | 
|---|
| 1 |  | -/*  | 
|---|
| 2 |  | - * To change this template, choose Tools | Templates  | 
|---|
| 3 |  | - * and open the template in the editor.  | 
|---|
| 4 |  | - */  | 
|---|
| 5 | 1 |   | 
|---|
| 6 |  | -/**  | 
|---|
| 7 |  | - *  | 
|---|
| 8 |  | - * @author nbriere  | 
|---|
| 9 |  | - */  | 
|---|
 | 2 | +import javax.swing.ImageIcon;  | 
|---|
 | 3 | +  | 
|---|
| 10 | 4 |  public class cCheckBox extends javax.swing.JCheckBox | 
|---|
| 11 | 5 |  { | 
|---|
| 12 | 6 |      cCheckBox(String name, boolean enabled) | 
|---|
| 13 | 7 |      { | 
|---|
| 14 | 8 |          super(name, enabled); | 
|---|
| 15 |  | -          | 
|---|
| 16 |  | -        setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));  | 
|---|
 | 9 | +  | 
|---|
 | 10 | +        setBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0));  | 
|---|
| 17 | 11 |          //setBorder(new javax.swing.border.EtchedBorder()); | 
|---|
| 18 | 12 |      } | 
|---|
 | 13 | +  | 
|---|
 | 14 | +    cCheckBox(ImageIcon icon, boolean enabled)  | 
|---|
 | 15 | +    {  | 
|---|
 | 16 | +        super("", enabled);  | 
|---|
 | 17 | +  | 
|---|
 | 18 | +        this.image = icon.getImage();  | 
|---|
 | 19 | +        iconWidth = icon.getIconWidth();  | 
|---|
 | 20 | +  | 
|---|
 | 21 | +        setBorder(new javax.swing.border.EmptyBorder(8, 0, 8, 24)); // top, left, bottom, right  | 
|---|
 | 22 | +        //setBorder(new javax.swing.border.EtchedBorder());  | 
|---|
 | 23 | +    }  | 
|---|
 | 24 | +      | 
|---|
 | 25 | +    private java.awt.Image image;  | 
|---|
 | 26 | +    private int iconWidth;  | 
|---|
 | 27 | +  | 
|---|
 | 28 | +    @Override  | 
|---|
 | 29 | +    protected void paintComponent(java.awt.Graphics g)  | 
|---|
 | 30 | +    {  | 
|---|
 | 31 | +        super.paintComponent(g);  | 
|---|
 | 32 | +        if (image != null)  | 
|---|
 | 33 | +        {  | 
|---|
 | 34 | +            //if (getWidth() > image.getWidth(null) + 8)  | 
|---|
 | 35 | +            {  | 
|---|
 | 36 | +                g.drawImage(image, 18, 6, this);  | 
|---|
 | 37 | +            }  | 
|---|
 | 38 | +        }  | 
|---|
 | 39 | +    }  | 
|---|
| 19 | 40 |  } | 
|---|
 
| .. | .. | 
|---|
| 26 | 26 |      JCheckBox stripCB; | 
|---|
| 27 | 27 |      JCheckBox genUVCB; | 
|---|
| 28 | 28 |   | 
|---|
| 29 |  | -    JCheckBox mergeAttributesCB;  | 
|---|
 | 29 | +    cCheckBox mergeAttributesCB;  | 
|---|
| 30 | 30 |       | 
|---|
| 31 | 31 |      cFileSystemPane(iCallBack o) | 
|---|
| 32 | 32 |      { | 
|---|