Normand Briere
2019-05-02 c209bbe1cf788c9af3dcffea7667c830170a3f1f
GroupEditor.java
....@@ -150,6 +150,8 @@
150150
151151 void SetupMenu2(ObjEditor oe)
152152 {
153
+ if (Globals.ADVANCED)
154
+ {
153155 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
154156 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
155157 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -161,36 +163,48 @@
161163 lookAtItem.addActionListener(this);
162164 //lookFromItem.addActinoListener(this);
163165 //switchItem.addActionListener(this);
166
+ }
167
+
164168 Menu menu;
165169 oe.menuBar.add(menu = new Menu("Edit"));
166170 //editItem = menu.add(new MenuItem("Edit"));
167171 //editItem.addActionListener(this);
168172 duplicateItem = menu.add(new MenuItem("Duplicate"));
169173 duplicateItem.addActionListener(this);
170
- menu.add("-");
171
- cloneItem = menu.add(new MenuItem("Clone"));
172
- cloneItem.addActionListener(this);
173
- cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
174
- cloneSupportItem.addActionListener(this);
175
- menu.add("-");
176174 cutItem = menu.add(new MenuItem("Cut"));
177175 cutItem.addActionListener(this);
178176 copyItem = menu.add(new MenuItem("Copy"));
179177 copyItem.addActionListener(this);
180178 pasteItem = menu.add(new MenuItem("Paste"));
181179 pasteItem.addActionListener(this);
180
+ menu.add("-");
181
+ cloneItem = menu.add(new MenuItem("Clone"));
182
+ cloneItem.addActionListener(this);
183
+ cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
184
+ cloneSupportItem.addActionListener(this);
185
+ menu.add("-");
186
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
187
+ pasteIntoItem.addActionListener(this);
182188 pasteLinkItem = menu.add(new MenuItem("Paste link"));
183189 pasteLinkItem.addActionListener(this);
184190 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
185191 pasteCloneItem.addActionListener(this);
186192 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
187193 // pasteExpandItem.addActionListener(this);
194
+ menu.add("-");
188195 clearItem = menu.add(new MenuItem("Clear"));
189196 clearItem.addActionListener(this);
197
+
198
+ if (Globals.ADVANCED)
199
+ {
200
+ // Deletes the cameras...
190201 clearAllItem = menu.add(new MenuItem("Clear All"));
191202 clearAllItem.addActionListener(this);
203
+ }
192204
193205 oe.menuBar.add(menu = new Menu("Setting"));
206
+ if (Globals.ADVANCED)
207
+ {
194208 resetMeshItem = menu.add(new MenuItem("Reset All"));
195209 resetMeshItem.addActionListener(this);
196210 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -200,6 +214,7 @@
200214 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
201215 resetreferencesItem.addActionListener(this);
202216 menu.add("-");
217
+ }
203218 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
204219 overwriteGeoItem.addActionListener(this);
205220 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -211,19 +226,26 @@
211226 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
212227 overwriteUVItem.addActionListener(this);
213228 menu.add("-");
229
+ if (Globals.ADVANCED)
230
+ {
214231 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
215232 generateMeshItem.addActionListener(this);
216233 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
217234 poseMeshItem.addActionListener(this);
218235 menu.add("-");
236
+ }
219237 resetsupportItem = menu.add(new MenuItem("Reset support"));
220238 resetsupportItem.addActionListener(this);
221239 linkverticesItem = menu.add(new MenuItem("Link to Support"));
222240 linkverticesItem.addActionListener(this);
223241 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224242 relinkverticesItem.addActionListener(this);
243
+
244
+ if (Globals.ADVANCED)
245
+ {
225246 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
226247 setMasterItem.addActionListener(this);
248
+ }
227249
228250 oe.menuBar.add(menu = new Menu("Group"));
229251 grabItem = menu.add(new MenuItem("Grab"));
....@@ -234,27 +256,31 @@
234256 frontItem.addActionListener(this);
235257 compositeItem = menu.add(new MenuItem("Composite"));
236258 compositeItem.addActionListener(this);
237
- hideItem = menu.add(new MenuItem("Hide"));
259
+ hideItem = menu.add(new MenuItem("Hidden Group"));
238260 hideItem.addActionListener(this);
239261 ungroupItem = menu.add(new MenuItem("Ungroup"));
240262 ungroupItem.addActionListener(this);
241263 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
264
+ randomItem = menu.add(new MenuItem("Switch node"));
243265 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);
248266 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249267 switchGeoItem.addActionListener(this);
250268 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251269 switchTransfoItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
270
+ morphItem = menu.add(new MenuItem("Morph Group"));
253271 morphItem.addActionListener(this);
272
+
273
+ if (Globals.ADVANCED)
274
+ {
275
+ physicsItem = menu.add(new MenuItem("Physics"));
276
+ physicsItem.addActionListener(this);
277
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
278
+ frameselectorItem.addActionListener(this);
254279 scriptNodeItem = menu.add(new MenuItem("Script Node"));
255280 scriptNodeItem.addActionListener(this);
256281 cameraItem = menu.add(new MenuItem("Camera"));
257282 cameraItem.addActionListener(this);
283
+ }
258284
259285 oe.menuBar.add(menu = new Menu("Object"));
260286 textureItem = menu.add(new MenuItem("Texture"));
....@@ -269,15 +295,18 @@
269295 shadowYItem.addActionListener(this);
270296 shadowZItem = menu.add(new MenuItem("Shadow Z"));
271297 shadowZItem.addActionListener(this);
298
+ if (Globals.ADVANCED)
299
+ {
272300 linkerItem = menu.add(new MenuItem("Linker"));
273301 linkerItem.addActionListener(this);
274
- templateItem = menu.add(new MenuItem("Template"));
275
- templateItem.addActionListener(this);
276302 attributeItem = menu.add(new MenuItem("Attribute"));
277303 attributeItem.addActionListener(this);
304
+ templateItem = menu.add(new MenuItem("Template"));
305
+ templateItem.addActionListener(this);
278306 pointflowItem = menu.add(new MenuItem("Point Flow"));
279307 pointflowItem.addActionListener(this);
280308 menu.add("-");
309
+ }
281310 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
282311 resetTransformItem.addActionListener(this);
283312 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
....@@ -294,8 +323,11 @@
294323 genNormalsCADItem.addActionListener(this);
295324 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296325 genNormalsMESHItem.addActionListener(this);
326
+ if (Globals.ADVANCED)
327
+ {
297328 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
298329 genNormalsMINEItem.addActionListener(this);
330
+ }
299331 stripifyItem = menu.add(new MenuItem("Stripify"));
300332 stripifyItem.addActionListener(this);
301333 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -317,10 +349,14 @@
317349 reduce34MeshItem.addActionListener(this);
318350 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
319351 increaseMeshItem.addActionListener(this);
320
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
321
- smoothMeshItem.addActionListener(this);
322352 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
323353 clipMeshItem.addActionListener(this);
354
+
355
+ if (Globals.ADVANCED)
356
+ {
357
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
358
+ smoothMeshItem.addActionListener(this);
359
+ }
324360
325361 oe.menuBar.add(menu = new Menu("Attributes"));
326362 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -330,10 +366,13 @@
330366 liveleavesItem.addActionListener(this);
331367 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
332368 unliveleavesItem.addActionListener(this);
369
+ if (Globals.ADVANCED)
370
+ {
333371 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
334372 supportleavesItem.addActionListener(this);
335373 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
336374 unsupportleavesItem.addActionListener(this);
375
+ }
337376 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
338377 hideleavesItem.addActionListener(this);
339378 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,6 +415,8 @@
376415 sortbysizeItem.addActionListener(this);
377416 sortbynameItem = menu.add(new MenuItem("Sort by name"));
378417 sortbynameItem.addActionListener(this);
418
+ if (Globals.ADVANCED)
419
+ {
379420 menu.add("-");
380421 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381422 extractGeometriesItem.addActionListener(this);
....@@ -385,11 +426,11 @@
385426 shareGeometriesItem.addActionListener(this);
386427 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
387428 mergeGeometriesItem.addActionListener(this);
429
+ }
388430
389431 oe.menuBar.add(menu = new Menu("Insert"));
390432 buildCreateMenu(menu);
391433
392
-
393434 oe.menuBar.add(menu = new Menu("Include"));
394435 importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
395436 importGFDItem.addActionListener(this);
....@@ -436,11 +477,19 @@
436477 */
437478 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438479
439
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
480
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440481 liveCB.setToolTipText("Enabled animation");
441482 liveCB.addItemListener(this);
442483
443
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
484
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
485
+ oneStepButton.setToolTipText("Animate one step forward");
486
+ oneStepButton.addActionListener(this);
487
+
488
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
489
+ fastCB.setToolTipText("Fast mode");
490
+ fastCB.addItemListener(this);
491
+
492
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444493 trackCB.setToolTipText("Enable tracking");
445494 trackCB.addItemListener(this);
446495
....@@ -450,17 +499,14 @@
450499
451500 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
452501 // 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;
458502
459
- //aConstraints.gridx = 0;
460
- //aConstraints.gridy += 1;
461
- oe.aConstraints.weighty = 0;
462
- oe.aConstraints.gridwidth = 1;
463
-
503
+ if (Globals.ADVANCED)
504
+ {
505
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
506
+ snapobjectButton.addActionListener(this);
507
+ snapobjectButton.setToolTipText("Snap Object");
508
+ }
509
+
464510 oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
465511 flashSelectionButton.setToolTipText("Show selection");
466512 flashSelectionButton.addActionListener(this);
....@@ -485,47 +531,42 @@
485531 //
486532
487533 oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
- rootButton.setToolTipText("Edit object in new tab");
534
+ rootButton.setToolTipText("Edit selection in new tab");
489535 rootButton.addActionListener(this);
490
- oe.aConstraints.gridx += 1;
491
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
536
+
537
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492538 closeButton.setToolTipText("Close tab");
493539 closeButton.addActionListener(this);
494540 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
495541 //clearButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497542
498
- oe.aConstraints.gridx = 1; //
499
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
543
+ cGridBag commandsPanel = new cGridBag();
544
+
545
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
546
+ editButton.setToolTipText("Edit selection");
500547 editButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.aConstraints.weighty = 0;
503
- oe.aConstraints.gridwidth = 1;
504548
505
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
549
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
550
+ uneditButton.setToolTipText("Unedit selection");
506551 uneditButton.addActionListener(this);
507552
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);
513
- clearPanelButton.addActionListener(this);
514
-
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);
553
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
554
+ allParamsButton.setToolTipText("Edit all params");
520555 allParamsButton.addActionListener(this);
521556
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);
557
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
558
+ clearPanelButton.setToolTipText("Clear edit panel");
559
+ clearPanelButton.addActionListener(this);
560
+
561
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
562
+ unselectButton.setToolTipText("Unselect");
527563 unselectButton.addActionListener(this);
528564
565
+ commandsPanel.preferredHeight = 1;
566
+
567
+ oe.treePanel.add(commandsPanel);
568
+ oe.treePanel.Return();
569
+
529570 // oe.aConstraints.gridx += 1;
530571 // oe.aConstraints.weighty = 0;
531572 // oe.aConstraints.gridwidth = 1;
....@@ -537,40 +578,37 @@
537578 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
538579 // gcButton.addActionListener(this);
539580
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;
581
+ cGridBag jSPPanel = new cGridBag();
582
+
583
+ JScrollPane jSP;
551584 //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);
585
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
553586 ResetModel();
554
- oe.aConstraints.weighty = 0.5;
555
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
556
- oe.aConstraints.gridy += 1;
557
- oe.aConstraints.gridwidth = 1;
587
+
588
+ oe.treePanel.add(jSPPanel);
589
+ oe.treePanel.Return();
558590
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);
591
+ cGridBag copyOptionsPanel = new cGridBag();
592
+
593
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
594
+ colorCB.setToolTipText("Copy color when dropped");
563595 colorCB.addItemListener(this);
564
- oe.aConstraints.gridx += 2;
565
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
596
+
597
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
598
+ materialCB.setToolTipText("Copy material when dropped");
566599 materialCB.addItemListener(this);
567
- oe.aConstraints.gridx += 2;
568
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
600
+
601
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
602
+ textureCB.setToolTipText("Copy texture when dropped");
569603 textureCB.addItemListener(this);
570604
571
- oe.aConstraints.gridx = 0;
572
- oe.aConstraints.gridy += 1;
605
+ copyOptionsPanel.preferredHeight = 1;
606
+ oe.treePanel.add(copyOptionsPanel);
607
+ oe.treePanel.Return();
573608
609
+// mainPanel.setDividerLocation(0.5); //1.0);
610
+// mainPanel.setResizeWeight(0.5);
611
+
574612 //jList.addListSelectionListener(this);
575613 oe.jTree.addTreeSelectionListener(this);
576614 //jTree.setRootVisible(false);
....@@ -595,43 +633,35 @@
595633
596634 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
597635 {
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;
604
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
605
- supportCB.setToolTipText("Enabled rigging");
606
- supportCB.addItemListener(this);
607
-
608
- // constraints.gridy += 1;
609
- // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
610
- // localCB.addItemListener(this);
611
-
612
- //constraints.gridy += 1;
613
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
614
- crowdCB.setToolTipText("Used for crowds");
615
- crowdCB.addItemListener(this);
616
-
617
- //constraints.gridy += 1;
618
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
619
- smoothCB.setToolTipText("Snapping delay");
620
- smoothCB.addItemListener(this);
621
-
622
- //constraints.gridy += 1;
623
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
624
- slowCB.setToolTipText("Smooth interpolation");
625
- slowCB.addItemListener(this);
626
- //constraints.gridy += 1;
627636 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
628637 boxCB.setToolTipText("Display bounding boxes");
629638 boxCB.addItemListener(this);
630
- //constraints.gridy += 1;
639
+
631640 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
632641 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
633642 zoomBoxCB.addItemListener(this);
634643
644
+ if (Globals.ADVANCED)
645
+ {
646
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
647
+ supportCB.setToolTipText("Enable rigging");
648
+ supportCB.addItemListener(this);
649
+
650
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
651
+ // localCB.addItemListener(this);
652
+
653
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
654
+ crowdCB.setToolTipText("Used for crowds");
655
+ crowdCB.addItemListener(this);
656
+
657
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
658
+ smoothCB.setToolTipText("Snapping delay");
659
+ smoothCB.addItemListener(this);
660
+
661
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
662
+ slowCB.setToolTipText("Smooth interpolation");
663
+ slowCB.addItemListener(this);
664
+
635665 // constraints.gridy += 1;
636666 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
637667 // speakerMocapCB.addItemListener(this);
....@@ -656,14 +686,20 @@
656686 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
657687 // debugCB.addItemListener(this);
658688
659
- //constraints.gridy += 1;
660689 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
661690 oeilCB.addItemListener(this);
662691
663
- //constraints.gridy += 1;
664692 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665693 lookAtCB.setToolTipText("Look-at target");
666694 lookAtCB.addItemListener(this);
695
+
696
+ }
697
+
698
+ cGridBag fill = new cGridBag();
699
+
700
+ fill.preferredHeight = 200;
701
+
702
+ panel.add(fill);
667703
668704 }
669705
....@@ -948,11 +984,11 @@
948984 {
949985 loadClipboard(true);
950986 objEditor.jTree.setSelectionPath(destinationPath);
951
- pasteInto(false);
987
+ pasteInto(false, false);
952988 } else {
953989 loadClipboard(false);
954990 objEditor.jTree.setSelectionPath(destinationPath);
955
- pasteInto(false); // true); // ???
991
+ pasteInto(false, false); // true); // ???
956992 }
957993 }
958994 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1074,27 +1110,33 @@
10741110 kleinItem.addActionListener(this);
10751111 particleItem = menu.add(new MenuItem("Particle system"));
10761112 particleItem.addActionListener(this);
1113
+ if (Globals.ADVANCED)
1114
+ {
10771115 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10781116 ragdollItem.addActionListener(this);
10791117 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10801118 ragdoll2Item.addActionListener(this);
1119
+ }
10811120 menu.add("-");
1082
- meshItem = menu.add(new MenuItem("Mesh"));
1121
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10831122 meshItem.addActionListener(this);
10841123 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10851124 // meshGroupItem.addActionListener(this);
1125
+ if (Globals.ADVANCED)
1126
+ {
10861127 springItem = menu.add(new MenuItem("Spring"));
10871128 springItem.addActionListener(this);
10881129 flagItem = menu.add(new MenuItem("Flag"));
10891130 flagItem.addActionListener(this);
1090
- bezierItem = menu.add(new MenuItem("Patch"));
1091
- bezierItem.addActionListener(this);
1092
- checkerItem = menu.add(new MenuItem("Checker"));
1093
- checkerItem.addActionListener(this);
10941131 blobItem = menu.add(new MenuItem("Blob"));
10951132 blobItem.addActionListener(this);
10961133 latheItem = menu.add(new MenuItem("Lathe"));
10971134 latheItem.addActionListener(this);
1135
+ }
1136
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1137
+ bezierItem.addActionListener(this);
1138
+ overlayItem = menu.add(new MenuItem("Overlay"));
1139
+ overlayItem.addActionListener(this);
10981140 lightItem = menu.add(new MenuItem("Light"));
10991141 lightItem.addActionListener(this);
11001142 menu.add("-");
....@@ -1104,25 +1146,26 @@
11041146 loopItem.addActionListener(this);
11051147 doubleItem = menu.add(new MenuItem("Fork"));
11061148 doubleItem.addActionListener(this);
1149
+ if (Globals.ADVANCED)
1150
+ {
11071151 tripleItem = menu.add(new MenuItem("Trident"));
11081152 tripleItem.addActionListener(this);
1153
+ }
11091154 }
11101155
11111156 void buildToolsMenu(Menu menu)
11121157 {
11131158 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11141159 animationItem.addItemListener(this);
1115
- animationItem.setState(CameraPane.ANIMATION);
1160
+ animationItem.setState(Globals.ANIMATION);
11161161
11171162 menu.add("-");
11181163 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11191164 parseverticesItem.addActionListener(this);
11201165 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11211166 textureFieldItem.addActionListener(this);
1122
- alignItem = menu.add(new MenuItem("Align"));
1167
+ alignItem = menu.add(new MenuItem("Align Object"));
11231168 alignItem.addActionListener(this);
1124
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1125
- mirrorItem.addActionListener(this);
11261169 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11271170 reduceMorphItem.addActionListener(this);
11281171 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
....@@ -1130,8 +1173,12 @@
11301173
11311174 menu.add(computeAOItem = new MenuItem("Compute AO"));
11321175 computeAOItem.addActionListener(this);
1133
- menu.add("-");
11341176
1177
+ if (Globals.ADVANCED)
1178
+ {
1179
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1180
+ mirrorItem.addActionListener(this);
1181
+ menu.add("-");
11351182 menu.add(memoryItem = new MenuItem("Memory Usage"));
11361183 memoryItem.addActionListener(this);
11371184 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1154,6 +1201,7 @@
11541201 menu.add("-");
11551202 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11561203 editScriptItem.addActionListener(this);
1204
+ }
11571205 }
11581206
11591207 void ScreenFit()
....@@ -1655,7 +1703,7 @@
16551703 {
16561704 makeSomething(new BezierSurface());
16571705 } else
1658
- if (source == checkerItem)
1706
+ if (source == overlayItem)
16591707 {
16601708 /*
16611709 Object3D obj = new BezierSurface(5,8);
....@@ -1843,6 +1891,11 @@
18431891 {
18441892 DumpObject();
18451893 } else
1894
+ if (source == oneStepButton)
1895
+ {
1896
+ Globals.ONESTEP = true;
1897
+ cameraView.repaint();
1898
+ } else
18461899 if (source == screenfitButton)
18471900 {
18481901 //Reload(lastConverter, lastFilename, true);
....@@ -1915,13 +1968,17 @@
19151968 {
19161969 paste(false);
19171970 } else
1971
+ if (source == pasteIntoItem)
1972
+ {
1973
+ pasteInto(true, false);
1974
+ } else
19181975 if (source == pasteLinkItem)
19191976 {
1920
- pasteInto(false);
1977
+ pasteInto(false, false);
19211978 } else
19221979 if (source == pasteCloneItem)
19231980 {
1924
- pasteInto(true);
1981
+ pasteInto(true, true);
19251982 } else
19261983 if (source == pasteExpandItem)
19271984 {
....@@ -2123,11 +2180,11 @@
21232180 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21242181 for (int i=0; i<group.selection.size(); i++)
21252182 {
2126
- boolean random = CameraPane.RANDOM;
2127
- CameraPane.RANDOM = false; // parse all random nodes
2183
+ boolean random = CameraPane.SWITCH;
2184
+ CameraPane.SWITCH = false; // parse all random nodes
21282185 group.selection.get(i).linkVerticesThis(content);
21292186 // group.selection.get(i).setMasterThis(content); // should be identity
2130
- CameraPane.RANDOM = random;
2187
+ CameraPane.SWITCH = random;
21312188 }
21322189 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21332190 refreshContents();
....@@ -2137,20 +2194,20 @@
21372194 {
21382195 for (int i=0; i<group.selection.size(); i++)
21392196 {
2140
- boolean random = CameraPane.RANDOM;
2141
- CameraPane.RANDOM = false; // parse all random nodes
2197
+ boolean random = CameraPane.SWITCH;
2198
+ CameraPane.SWITCH = false; // parse all random nodes
21422199 group.selection.get(i).linkVerticesThis(null);
2143
- CameraPane.RANDOM = random;
2200
+ CameraPane.SWITCH = random;
21442201 }
21452202
21462203 refreshContents();
21472204 } else
21482205 if (source == relinkverticesItem)
21492206 {
2150
- boolean random = CameraPane.RANDOM;
2151
- CameraPane.RANDOM = false; // parse all random nodes
2207
+ boolean random = CameraPane.SWITCH;
2208
+ CameraPane.SWITCH = false; // parse all random nodes
21522209 group.selection.RelinkToSupport();
2153
- CameraPane.RANDOM = random;
2210
+ CameraPane.SWITCH = random;
21542211
21552212 refreshContents();
21562213 } else
....@@ -2248,7 +2305,7 @@
22482305 RandomNode random = new RandomNode();
22492306 group(random);
22502307 if (random.size() > 0)
2251
- random.name = random.get(0).name + "Rnd";
2308
+ random.name = random.get(0).name + "Switch";
22522309 } else
22532310 if (source == physicsItem)
22542311 {
....@@ -2905,7 +2962,7 @@
29052962
29062963 child.editWindow = null; // ???????????
29072964 }
2908
- objEditor.ctrlPanel.validate();
2965
+ objEditor.ctrlPanel.FlushUI();
29092966 //objEditor.jTree.clearSelection();
29102967 //objEditor.ResetSliders();
29112968 refreshContents(true);
....@@ -3624,11 +3681,11 @@
36243681
36253682 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36263683
3627
- boolean random = CameraPane.RANDOM;
3628
- CameraPane.RANDOM = false; // parse all random nodes
3684
+ boolean random = CameraPane.SWITCH;
3685
+ CameraPane.SWITCH = false; // parse all random nodes
36293686 lowres.linkVerticesThis(null);
36303687 lowres.linkVerticesThis(sn);
3631
- CameraPane.RANDOM = random;
3688
+ CameraPane.SWITCH = random;
36323689
36333690 System.err.flush();
36343691
....@@ -4113,12 +4170,12 @@
41134170 System.err.println("info : " + child.GetPath());
41144171 }
41154172 }
4116
- else
4117
- {
4118
- objEditor.SetMaterial(group); // .GetMaterial());
4119
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4120
- System.err.println("info : " + group.GetPath());
4121
- }
4173
+// else
4174
+// {
4175
+// objEditor.SetMaterial(group); // .GetMaterial());
4176
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4177
+// System.err.println("info : " + group.GetPath());
4178
+// }
41224179
41234180 objEditor.SetText(); // jan 2014
41244181
....@@ -4386,7 +4443,7 @@
43864443 refreshContents();
43874444 }
43884445
4389
- void pasteInto(boolean copyit)
4446
+ void pasteInto(boolean copyit, boolean clone)
43904447 {
43914448 // if (GrafreeD.clipboard == null)
43924449 // return;
....@@ -4415,7 +4472,14 @@
44154472 if (copyit)
44164473 {
44174474 // paste(false);
4418
- CloneClipboard(false); // sept 2014
4475
+ if (clone)
4476
+ {
4477
+ CloneClipboard(false); // sept 2014
4478
+ }
4479
+ else
4480
+ {
4481
+ paste(false);
4482
+ }
44194483 }
44204484 else
44214485 {
....@@ -4959,10 +5023,12 @@
49595023 cButton flashSelectionButton;
49605024 cButton editButton;
49615025 cButton uneditButton;
5026
+ JCheckBox allParamsButton;
49625027 cButton clearpanelButton;
4963
- cButton allParamsButton;
49645028 cButton unselectButton;
49655029
5030
+ cButton oneStepButton;
5031
+
49665032 cButton screenfitButton;
49675033 cButton screenfitpointButton;
49685034 cButton snapobjectButton;
....@@ -5017,6 +5083,7 @@
50175083 private MenuItem mergeGeometriesItem;
50185084 private MenuItem copyItem;
50195085 private MenuItem pasteItem;
5086
+ private MenuItem pasteIntoItem;
50205087 private MenuItem pasteLinkItem;
50215088 private MenuItem pasteCloneItem;
50225089 private MenuItem pasteExpandItem;
....@@ -5114,7 +5181,7 @@
51145181 private MenuItem blobItem;
51155182 private MenuItem latheItem;
51165183 private MenuItem bezierItem;
5117
- private MenuItem checkerItem;
5184
+ private MenuItem overlayItem;
51185185 private MenuItem meshItem;
51195186 // private MenuItem meshGroupItem;
51205187 private MenuItem springItem;