Normand Briere
2019-05-01 a742f6cebf1d471217d836e07934e5c02c22b6db
GroupEditor.java
....@@ -239,16 +239,16 @@
239239 ungroupItem = menu.add(new MenuItem("Ungroup"));
240240 ungroupItem.addActionListener(this);
241241 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
242
+ randomItem = menu.add(new MenuItem("Switch node"));
243243 randomItem.addActionListener(this);
244
- physicsItem = menu.add(new MenuItem("Physics"));
245
- physicsItem.addActionListener(this);
246
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
247
- frameselectorItem.addActionListener(this);
248244 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249245 switchGeoItem.addActionListener(this);
250246 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251247 switchTransfoItem.addActionListener(this);
248
+ physicsItem = menu.add(new MenuItem("Physics"));
249
+ physicsItem.addActionListener(this);
250
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
251
+ frameselectorItem.addActionListener(this);
252252 morphItem = menu.add(new MenuItem("Morph"));
253253 morphItem.addActionListener(this);
254254 scriptNodeItem = menu.add(new MenuItem("Script Node"));
....@@ -436,11 +436,15 @@
436436 */
437437 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438438
439
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
439
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440440 liveCB.setToolTipText("Enabled animation");
441441 liveCB.addItemListener(this);
442442
443
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
443
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
444
+ fastCB.setToolTipText("Fast mode");
445
+ fastCB.addItemListener(this);
446
+
447
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444448 trackCB.setToolTipText("Enable tracking");
445449 trackCB.addItemListener(this);
446450
....@@ -450,17 +454,14 @@
450454
451455 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
452456 // screenfitpointButton.addActionListener(this);
453
-// oe.aConstraints.gridx += 1;
454
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
455
- snapobjectButton.addActionListener(this);
456
- snapobjectButton.setToolTipText("Snap Object");
457
- oe.aConstraints.gridx += 1;
458457
459
- //aConstraints.gridx = 0;
460
- //aConstraints.gridy += 1;
461
- oe.aConstraints.weighty = 0;
462
- oe.aConstraints.gridwidth = 1;
463
-
458
+ if (Globals.ADVANCED)
459
+ {
460
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
461
+ snapobjectButton.addActionListener(this);
462
+ snapobjectButton.setToolTipText("Snap Object");
463
+ }
464
+
464465 oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
465466 flashSelectionButton.setToolTipText("Show selection");
466467 flashSelectionButton.addActionListener(this);
....@@ -485,47 +486,42 @@
485486 //
486487
487488 oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
- rootButton.setToolTipText("Edit object in new tab");
489
+ rootButton.setToolTipText("Edit selection in new tab");
489490 rootButton.addActionListener(this);
490
- oe.aConstraints.gridx += 1;
491
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
491
+
492
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492493 closeButton.setToolTipText("Close tab");
493494 closeButton.addActionListener(this);
494495 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
495496 //clearButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497497
498
- oe.aConstraints.gridx = 1; //
499
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
498
+ cGridBag commandsPanel = new cGridBag();
499
+
500
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
501
+ editButton.setToolTipText("Edit selection");
500502 editButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.aConstraints.weighty = 0;
503
- oe.aConstraints.gridwidth = 1;
504503
505
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
504
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
505
+ uneditButton.setToolTipText("Unedit selection");
506506 uneditButton.addActionListener(this);
507507
508
- oe.aConstraints.gridx += 1;
509
- oe.aConstraints.weighty = 0;
510
- oe.aConstraints.gridwidth = 1;
511
-
512
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
508
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
509
+ clearPanelButton.setToolTipText("Clear edit panel");
513510 clearPanelButton.addActionListener(this);
514511
515
- oe.aConstraints.gridx += 1;
516
- oe.aConstraints.weighty = 0;
517
- oe.aConstraints.gridwidth = 1;
518
-
519
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
512
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513
+ allParamsButton.setToolTipText("All params??");
520514 allParamsButton.addActionListener(this);
521515
522
- oe.aConstraints.gridx += 1;
523
- oe.aConstraints.weighty = 0;
524
- oe.aConstraints.gridwidth = 1;
525
-
526
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
516
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
517
+ unselectButton.setToolTipText("Unselect");
527518 unselectButton.addActionListener(this);
528519
520
+ commandsPanel.preferredHeight = 1;
521
+
522
+ oe.treePanel.add(commandsPanel);
523
+ oe.treePanel.Return();
524
+
529525 // oe.aConstraints.gridx += 1;
530526 // oe.aConstraints.weighty = 0;
531527 // oe.aConstraints.gridwidth = 1;
....@@ -537,40 +533,37 @@
537533 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
538534 // gcButton.addActionListener(this);
539535
540
- oe.aConstraints.gridx = 0;
541
- oe.aConstraints.gridy += 1;
542
-
543
- //ctrlPanel.add(objList = new List(5, true));
544
- oe.aConstraints.gridwidth = 100;
545
- // oe.aConstraints.gridheight = 100;
546
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
547
- oe.aConstraints.gridheight = 1;
548
- oe.aConstraints.weighty = 0.5;
549
- oe.aConstraints.gridx = 0;
550
- JScrollPane jSP;
536
+ cGridBag jSPPanel = new cGridBag();
537
+
538
+ JScrollPane jSP;
551539 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
552
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
540
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
553541 ResetModel();
554
- oe.aConstraints.weighty = 0.5;
555
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
556
- oe.aConstraints.gridy += 1;
557
- oe.aConstraints.gridwidth = 1;
542
+
543
+ oe.treePanel.add(jSPPanel);
544
+ oe.treePanel.Return();
558545
559
- oe.aConstraints.weighty = 0;
560
- oe.aConstraints.gridwidth = 2;
561
-
562
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
546
+ cGridBag copyOptionsPanel = new cGridBag();
547
+
548
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
549
+ colorCB.setToolTipText("Copy color when dropped");
563550 colorCB.addItemListener(this);
564
- oe.aConstraints.gridx += 2;
565
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
551
+
552
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
553
+ materialCB.setToolTipText("Copy material when dropped");
566554 materialCB.addItemListener(this);
567
- oe.aConstraints.gridx += 2;
568
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
555
+
556
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
557
+ textureCB.setToolTipText("Copy texture when dropped");
569558 textureCB.addItemListener(this);
570559
571
- oe.aConstraints.gridx = 0;
572
- oe.aConstraints.gridy += 1;
560
+ copyOptionsPanel.preferredHeight = 1;
561
+ oe.treePanel.add(copyOptionsPanel);
562
+ oe.treePanel.Return();
573563
564
+// mainPanel.setDividerLocation(0.5); //1.0);
565
+// mainPanel.setResizeWeight(0.5);
566
+
574567 //jList.addListSelectionListener(this);
575568 oe.jTree.addTreeSelectionListener(this);
576569 //jTree.setRootVisible(false);
....@@ -595,39 +588,29 @@
595588
596589 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
597590 {
598
- //constraints.gridx = 0;
599
- //constraints.gridy = 0;
600
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
601
- fastCB.setToolTipText("Fast mode");
602
- fastCB.addItemListener(this);
603
- //constraints.gridy += 1;
604591 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
605592 supportCB.setToolTipText("Enabled rigging");
606593 supportCB.addItemListener(this);
607594
608
- // constraints.gridy += 1;
609595 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
610596 // localCB.addItemListener(this);
611597
612
- //constraints.gridy += 1;
613598 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
614599 crowdCB.setToolTipText("Used for crowds");
615600 crowdCB.addItemListener(this);
616601
617
- //constraints.gridy += 1;
618602 panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
619603 smoothCB.setToolTipText("Snapping delay");
620604 smoothCB.addItemListener(this);
621605
622
- //constraints.gridy += 1;
623606 panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
624607 slowCB.setToolTipText("Smooth interpolation");
625608 slowCB.addItemListener(this);
626
- //constraints.gridy += 1;
609
+
627610 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
628611 boxCB.setToolTipText("Display bounding boxes");
629612 boxCB.addItemListener(this);
630
- //constraints.gridy += 1;
613
+
631614 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
632615 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
633616 zoomBoxCB.addItemListener(this);
....@@ -656,14 +639,18 @@
656639 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
657640 // debugCB.addItemListener(this);
658641
659
- //constraints.gridy += 1;
660642 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
661643 oeilCB.addItemListener(this);
662644
663
- //constraints.gridy += 1;
664645 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665646 lookAtCB.setToolTipText("Look-at target");
666647 lookAtCB.addItemListener(this);
648
+
649
+ cGridBag fill = new cGridBag();
650
+
651
+ fill.preferredHeight = 200;
652
+
653
+ panel.add(fill);
667654
668655 }
669656
....@@ -1112,7 +1099,7 @@
11121099 {
11131100 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11141101 animationItem.addItemListener(this);
1115
- animationItem.setState(CameraPane.ANIMATION);
1102
+ animationItem.setState(Globals.ANIMATION);
11161103
11171104 menu.add("-");
11181105 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -2248,7 +2235,7 @@
22482235 RandomNode random = new RandomNode();
22492236 group(random);
22502237 if (random.size() > 0)
2251
- random.name = random.get(0).name + "Rnd";
2238
+ random.name = random.get(0).name + "Switch";
22522239 } else
22532240 if (source == physicsItem)
22542241 {
....@@ -4113,12 +4100,12 @@
41134100 System.err.println("info : " + child.GetPath());
41144101 }
41154102 }
4116
- else
4117
- {
4118
- objEditor.SetMaterial(group); // .GetMaterial());
4119
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4120
- System.err.println("info : " + group.GetPath());
4121
- }
4103
+// else
4104
+// {
4105
+// objEditor.SetMaterial(group); // .GetMaterial());
4106
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4107
+// System.err.println("info : " + group.GetPath());
4108
+// }
41224109
41234110 objEditor.SetText(); // jan 2014
41244111