Normand Briere
2019-06-23 f1382bc839a74ef1d1534c61ea94e53cf54716df
Edit panel
2 files modified
70 ■■■■■ changed files
GroupEditor.java 36 ●●●● patch | view | raw | blame | history
ObjEditor.java 34 ●●●●● patch | view | raw | blame | history
GroupEditor.java
....@@ -176,7 +176,6 @@
176176 copyItem.addActionListener(this);
177177 pasteItem = menu.add(new MenuItem("Paste"));
178178 pasteItem.addActionListener(this);
179
- menu.add("-");
180179
181180 menu.add("-");
182181 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -369,11 +368,11 @@
369368 billboardItem.addActionListener(this);
370369 csgItem = menu.add(new MenuItem("CSG"));
371370 csgItem.addActionListener(this);
372
- shadowXItem = menu.add(new MenuItem("Shadow X"));
371
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
373372 shadowXItem.addActionListener(this);
374
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
373
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
375374 shadowYItem.addActionListener(this);
376
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
375
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
377376 shadowZItem.addActionListener(this);
378377 if (Globals.ADVANCED)
379378 {
....@@ -637,19 +636,19 @@
637636
638637 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
639638
640
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
641640 twoButton.setToolTipText("Show center view only");
642641 twoButton.addActionListener(this);
643
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
644643 fourButton.addActionListener(this);
645644 fourButton.setToolTipText("Show left panel only");
646
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
645
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
647646 sixButton.setToolTipText("2-column layout left");
648647 sixButton.addActionListener(this);
649
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
648
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650649 threeButton.setToolTipText("2-column layout right");
651650 threeButton.addActionListener(this);
652
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
651
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
653652 sevenButton.setToolTipText("3-column layout");
654653 sevenButton.addActionListener(this);
655654 //
....@@ -664,32 +663,30 @@
664663 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
665664 //clearButton.addActionListener(this);
666665
667
- cGridBag commandsPanel = new cGridBag();
668
-
669
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
666
+ editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670667 editButton.setToolTipText("Edit selection");
671668 editButton.addActionListener(this);
672669
673
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
674671 uneditButton.setToolTipText("Unedit selection");
675672 uneditButton.addActionListener(this);
676673
677
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
674
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
678675 allParamsButton.setToolTipText("Edit all params");
679676 allParamsButton.addActionListener(this);
680677
681
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
678
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
682679 clearPanelButton.setToolTipText("Clear edit panel");
683680 clearPanelButton.addActionListener(this);
684681
685
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
682
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
686683 unselectButton.setToolTipText("Unselect");
687684 unselectButton.addActionListener(this);
688685
689
- commandsPanel.preferredHeight = 1;
686
+ editCommandsPanel.preferredHeight = 1;
690687
691
- oe.treePanel.add(commandsPanel);
692
- oe.treePanel.Return();
688
+// oe.treePanel.add(commandsPanel);
689
+// oe.treePanel.Return();
693690
694691 // oe.aConstraints.gridx += 1;
695692 // oe.aConstraints.weighty = 0;
....@@ -1454,6 +1451,7 @@
14541451 shadow.material = new cMaterial(obj.material);
14551452 shadow.material.diffuse = 0.0001f;
14561453 shadow.material.specular = 0.0001f;
1454
+ //shadow.projectedVertices[1].x = 300;
14571455
14581456 makeSomething(shadow);
14591457 }
ObjEditor.java
....@@ -171,7 +171,7 @@
171171
172172 objEditor.ctrlPanel.remove(setupPanel);
173173 objEditor.ctrlPanel.remove(setupPanel2);
174
- objEditor.ctrlPanel.remove(commandsPanel);
174
+ objEditor.ctrlPanel.remove(objectCommandsPanel);
175175 objEditor.ctrlPanel.remove(pushPanel);
176176 //objEditor.ctrlPanel.remove(fillPanel);
177177
....@@ -327,9 +327,18 @@
327327 toolbarPanel.setName("Toolbar");
328328 treePanel = new cGridBag();
329329 treePanel.setName("Tree");
330
+
331
+ editPanel = new cGridBag().setVertical(true);
332
+ editPanel.setName("Edit");
333
+
330334 ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
331
- ctrlPanel.setName("Edit");
335
+
336
+ editCommandsPanel = new cGridBag();
337
+ editPanel.add(editCommandsPanel);
338
+ editPanel.add(ctrlPanel);
339
+
332340 materialPanel = new cGridBag().setVertical(true);
341
+
333342 materialPanel.setName("Material");
334343 /*JTextPane*/
335344 infoarea = createTextPane();
....@@ -819,10 +828,13 @@
819828 JButton fasterButton;
820829 JButton remarkButton;
821830
831
+ cGridBag editPanel;
832
+ cGridBag editCommandsPanel;
833
+
822834 cGridBag namePanel;
823835 cGridBag setupPanel;
824836 cGridBag setupPanel2;
825
- cGridBag commandsPanel;
837
+ cGridBag objectCommandsPanel;
826838 cGridBag pushPanel;
827839 cGridBag fillPanel;
828840
....@@ -1035,23 +1047,23 @@
10351047 oe.ctrlPanel.add(setupPanel2);
10361048 oe.ctrlPanel.Return();
10371049
1038
- commandsPanel = new cGridBag().setVertical(false);
1050
+ objectCommandsPanel = new cGridBag().setVertical(false);
10391051
1040
- resetButton = AddButton(commandsPanel, "Reset");
1052
+ resetButton = AddButton(objectCommandsPanel, "Reset");
10411053 resetButton.setToolTipText("Jump to frame zero");
1042
- stepButton = AddButton(commandsPanel, "Step");
1054
+ stepButton = AddButton(objectCommandsPanel, "Step");
10431055 stepButton.setToolTipText("Step one frame");
10441056 // resetAllButton = AddButton(oe, "Reset All");
10451057 // stepAllButton = AddButton(oe, "Step All");
10461058 // Return();
1047
- slowerButton = AddButton(commandsPanel, "Slow");
1059
+ slowerButton = AddButton(objectCommandsPanel, "Slow");
10481060 slowerButton.setToolTipText("Decrease animation speed");
1049
- fasterButton = AddButton(commandsPanel, "Fast");
1061
+ fasterButton = AddButton(objectCommandsPanel, "Fast");
10501062 fasterButton.setToolTipText("Increase animation speed");
1051
- remarkButton = AddButton(commandsPanel, "Remark");
1063
+ remarkButton = AddButton(objectCommandsPanel, "Remark");
10521064 remarkButton.setToolTipText("Set the current transform as the target");
10531065
1054
- oe.ctrlPanel.add(commandsPanel);
1066
+ oe.ctrlPanel.add(objectCommandsPanel);
10551067 oe.ctrlPanel.Return();
10561068
10571069 pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
....@@ -1340,7 +1352,7 @@
13401352 // north.setName("Edit");
13411353 // north.add(ctrlPanel, BorderLayout.NORTH);
13421354 // objectPanel.add(north);
1343
- objectPanel.add(ctrlPanel);
1355
+ objectPanel.add(editPanel);
13441356 objectPanel.add(infoPanel);
13451357
13461358 /*