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"));
....@@ -434,110 +434,94 @@
434434 oe.radioPanel.add(dummyButton);
435435 oe.buttonGroup.add(dummyButton);
436436 */
437
- aConstraints.gridy += 1;
438
-
439437 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
440438
441
- oe.aConstraints.gridwidth = 1;
442
- oe.aConstraints.gridx = 0;
443
-
444
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
439
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
445440 liveCB.setToolTipText("Enabled animation");
446441 liveCB.addItemListener(this);
447442
448
- oe.aConstraints.gridx += 1;
449
- 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);
450448 trackCB.setToolTipText("Enable tracking");
451449 trackCB.addItemListener(this);
452450
453
- oe.aConstraints.gridx += 1;
454
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
451
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
455452 screenfitButton.setToolTipText("Screen fit");
456453 screenfitButton.addActionListener(this);
457
- oe.aConstraints.gridx += 1;
454
+
458455 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
459456 // screenfitpointButton.addActionListener(this);
460
-// oe.aConstraints.gridx += 1;
461
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
462
- snapobjectButton.addActionListener(this);
463
- snapobjectButton.setToolTipText("Snap Object");
464
- oe.aConstraints.gridx += 1;
465457
466
- //aConstraints.gridx = 0;
467
- //aConstraints.gridy += 1;
468
- oe.aConstraints.weighty = 0;
469
- oe.aConstraints.gridwidth = 1;
470
-
471
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
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
+
465
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
472466 flashSelectionButton.setToolTipText("Show selection");
473467 flashSelectionButton.addActionListener(this);
474468
475
- oe.toolbarPanel.add(new cButton(" ", false));
469
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
476470
477
- oe.aConstraints.gridx += 1;
478
- oe.aConstraints.weighty = 0;
479
- oe.aConstraints.gridwidth = 1;
480
-
481
- //
482
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
471
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
483472 twoButton.setToolTipText("Show center view only");
484473 twoButton.addActionListener(this);
485
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
474
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
486475 fourButton.addActionListener(this);
487476 fourButton.setToolTipText("Show left panel only");
488
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
477
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
489478 sixButton.setToolTipText("2-column layout left");
490479 sixButton.addActionListener(this);
491
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
480
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492481 threeButton.setToolTipText("2-column layout right");
493482 threeButton.addActionListener(this);
494
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
483
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
495484 sevenButton.setToolTipText("3-column layout");
496485 sevenButton.addActionListener(this);
497486 //
498487
499
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
500
- rootButton.setToolTipText("Edit object in new tab");
488
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
489
+ rootButton.setToolTipText("Edit selection in new tab");
501490 rootButton.addActionListener(this);
502
- oe.aConstraints.gridx += 1;
503
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
491
+
492
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504493 closeButton.setToolTipText("Close tab");
505494 closeButton.addActionListener(this);
506495 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
507496 //clearButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
509497
510
- oe.aConstraints.gridx = 1; //
511
- 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");
512502 editButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516503
517
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
504
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
505
+ uneditButton.setToolTipText("Unedit selection");
518506 uneditButton.addActionListener(this);
519507
520
- oe.aConstraints.gridx += 1;
521
- oe.aConstraints.weighty = 0;
522
- oe.aConstraints.gridwidth = 1;
523
-
524
- 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");
525510 clearPanelButton.addActionListener(this);
526511
527
- oe.aConstraints.gridx += 1;
528
- oe.aConstraints.weighty = 0;
529
- oe.aConstraints.gridwidth = 1;
530
-
531
- 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??");
532514 allParamsButton.addActionListener(this);
533515
534
- oe.aConstraints.gridx += 1;
535
- oe.aConstraints.weighty = 0;
536
- oe.aConstraints.gridwidth = 1;
537
-
538
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
516
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
517
+ unselectButton.setToolTipText("Unselect");
539518 unselectButton.addActionListener(this);
540519
520
+ commandsPanel.preferredHeight = 1;
521
+
522
+ oe.treePanel.add(commandsPanel);
523
+ oe.treePanel.Return();
524
+
541525 // oe.aConstraints.gridx += 1;
542526 // oe.aConstraints.weighty = 0;
543527 // oe.aConstraints.gridwidth = 1;
....@@ -549,40 +533,37 @@
549533 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
550534 // gcButton.addActionListener(this);
551535
552
- oe.aConstraints.gridx = 0;
553
- oe.aConstraints.gridy += 1;
554
-
555
- //ctrlPanel.add(objList = new List(5, true));
556
- oe.aConstraints.gridwidth = 100;
557
- // oe.aConstraints.gridheight = 100;
558
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
559
- oe.aConstraints.gridheight = 1;
560
- oe.aConstraints.weighty = 0.5;
561
- oe.aConstraints.gridx = 0;
562
- JScrollPane jSP;
536
+ cGridBag jSPPanel = new cGridBag();
537
+
538
+ JScrollPane jSP;
563539 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
564
- 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);
565541 ResetModel();
566
- oe.aConstraints.weighty = 0.5;
567
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
568
- oe.aConstraints.gridy += 1;
569
- oe.aConstraints.gridwidth = 1;
542
+
543
+ oe.treePanel.add(jSPPanel);
544
+ oe.treePanel.Return();
570545
571
- oe.aConstraints.weighty = 0;
572
- oe.aConstraints.gridwidth = 2;
573
-
574
- 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");
575550 colorCB.addItemListener(this);
576
- oe.aConstraints.gridx += 2;
577
- 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");
578554 materialCB.addItemListener(this);
579
- oe.aConstraints.gridx += 2;
580
- 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");
581558 textureCB.addItemListener(this);
582559
583
- oe.aConstraints.gridx = 0;
584
- oe.aConstraints.gridy += 1;
560
+ copyOptionsPanel.preferredHeight = 1;
561
+ oe.treePanel.add(copyOptionsPanel);
562
+ oe.treePanel.Return();
585563
564
+// mainPanel.setDividerLocation(0.5); //1.0);
565
+// mainPanel.setResizeWeight(0.5);
566
+
586567 //jList.addListSelectionListener(this);
587568 oe.jTree.addTreeSelectionListener(this);
588569 //jTree.setRootVisible(false);
....@@ -607,39 +588,29 @@
607588
608589 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
609590 {
610
- //constraints.gridx = 0;
611
- //constraints.gridy = 0;
612
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
613
- fastCB.setToolTipText("Fast mode");
614
- fastCB.addItemListener(this);
615
- //constraints.gridy += 1;
616591 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
617592 supportCB.setToolTipText("Enabled rigging");
618593 supportCB.addItemListener(this);
619594
620
- // constraints.gridy += 1;
621595 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
622596 // localCB.addItemListener(this);
623597
624
- //constraints.gridy += 1;
625598 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
626599 crowdCB.setToolTipText("Used for crowds");
627600 crowdCB.addItemListener(this);
628601
629
- //constraints.gridy += 1;
630602 panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
631603 smoothCB.setToolTipText("Snapping delay");
632604 smoothCB.addItemListener(this);
633605
634
- //constraints.gridy += 1;
635606 panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
636607 slowCB.setToolTipText("Smooth interpolation");
637608 slowCB.addItemListener(this);
638
- //constraints.gridy += 1;
609
+
639610 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
640611 boxCB.setToolTipText("Display bounding boxes");
641612 boxCB.addItemListener(this);
642
- //constraints.gridy += 1;
613
+
643614 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
644615 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
645616 zoomBoxCB.addItemListener(this);
....@@ -668,14 +639,18 @@
668639 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
669640 // debugCB.addItemListener(this);
670641
671
- //constraints.gridy += 1;
672642 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
673643 oeilCB.addItemListener(this);
674644
675
- //constraints.gridy += 1;
676645 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
677646 lookAtCB.setToolTipText("Look-at target");
678647 lookAtCB.addItemListener(this);
648
+
649
+ cGridBag fill = new cGridBag();
650
+
651
+ fill.preferredHeight = 200;
652
+
653
+ panel.add(fill);
679654
680655 }
681656
....@@ -1124,7 +1099,7 @@
11241099 {
11251100 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11261101 animationItem.addItemListener(this);
1127
- animationItem.setState(CameraPane.ANIMATION);
1102
+ animationItem.setState(Globals.ANIMATION);
11281103
11291104 menu.add("-");
11301105 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -2260,7 +2235,7 @@
22602235 RandomNode random = new RandomNode();
22612236 group(random);
22622237 if (random.size() > 0)
2263
- random.name = random.get(0).name + "Rnd";
2238
+ random.name = random.get(0).name + "Switch";
22642239 } else
22652240 if (source == physicsItem)
22662241 {
....@@ -4125,12 +4100,12 @@
41254100 System.err.println("info : " + child.GetPath());
41264101 }
41274102 }
4128
- else
4129
- {
4130
- objEditor.SetMaterial(group); // .GetMaterial());
4131
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4132
- System.err.println("info : " + group.GetPath());
4133
- }
4103
+// else
4104
+// {
4105
+// objEditor.SetMaterial(group); // .GetMaterial());
4106
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4107
+// System.err.println("info : " + group.GetPath());
4108
+// }
41344109
41354110 objEditor.SetText(); // jan 2014
41364111