Normand Briere
2019-05-02 a7277e6c6381e55761f7fa87276260fac1c94d5e
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,17 +163,21 @@
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("-");
171174 cloneItem = menu.add(new MenuItem("Clone"));
172175 cloneItem.addActionListener(this);
176
+ if (Globals.ADVANCED)
177
+ {
173178 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
174179 cloneSupportItem.addActionListener(this);
180
+ }
175181 menu.add("-");
176182 cutItem = menu.add(new MenuItem("Cut"));
177183 cutItem.addActionListener(this);
....@@ -179,18 +185,31 @@
179185 copyItem.addActionListener(this);
180186 pasteItem = menu.add(new MenuItem("Paste"));
181187 pasteItem.addActionListener(this);
188
+ menu.add("-");
189
+
190
+ menu.add("-");
191
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
192
+ pasteIntoItem.addActionListener(this);
182193 pasteLinkItem = menu.add(new MenuItem("Paste link"));
183194 pasteLinkItem.addActionListener(this);
184195 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
185196 pasteCloneItem.addActionListener(this);
186197 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
187198 // pasteExpandItem.addActionListener(this);
199
+ menu.add("-");
188200 clearItem = menu.add(new MenuItem("Clear"));
189201 clearItem.addActionListener(this);
202
+
203
+ if (Globals.ADVANCED)
204
+ {
205
+ // Deletes the cameras...
190206 clearAllItem = menu.add(new MenuItem("Clear All"));
191207 clearAllItem.addActionListener(this);
208
+ }
192209
193210 oe.menuBar.add(menu = new Menu("Setting"));
211
+ if (Globals.ADVANCED)
212
+ {
194213 resetMeshItem = menu.add(new MenuItem("Reset All"));
195214 resetMeshItem.addActionListener(this);
196215 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -200,6 +219,7 @@
200219 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
201220 resetreferencesItem.addActionListener(this);
202221 menu.add("-");
222
+ }
203223 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
204224 overwriteGeoItem.addActionListener(this);
205225 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -211,19 +231,26 @@
211231 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
212232 overwriteUVItem.addActionListener(this);
213233 menu.add("-");
234
+ if (Globals.ADVANCED)
235
+ {
214236 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
215237 generateMeshItem.addActionListener(this);
216238 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
217239 poseMeshItem.addActionListener(this);
218240 menu.add("-");
241
+ }
219242 resetsupportItem = menu.add(new MenuItem("Reset support"));
220243 resetsupportItem.addActionListener(this);
221244 linkverticesItem = menu.add(new MenuItem("Link to Support"));
222245 linkverticesItem.addActionListener(this);
223246 relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224247 relinkverticesItem.addActionListener(this);
248
+
249
+ if (Globals.ADVANCED)
250
+ {
225251 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
226252 setMasterItem.addActionListener(this);
253
+ }
227254
228255 oe.menuBar.add(menu = new Menu("Group"));
229256 grabItem = menu.add(new MenuItem("Grab"));
....@@ -234,27 +261,32 @@
234261 frontItem.addActionListener(this);
235262 compositeItem = menu.add(new MenuItem("Composite"));
236263 compositeItem.addActionListener(this);
237
- hideItem = menu.add(new MenuItem("Hide"));
264
+ hideItem = menu.add(new MenuItem("Hidden Group"));
238265 hideItem.addActionListener(this);
239266 ungroupItem = menu.add(new MenuItem("Ungroup"));
240267 ungroupItem.addActionListener(this);
241268 menu.add("-");
242
- randomItem = menu.add(new MenuItem("Random"));
269
+ randomItem = menu.add(new MenuItem("Switch node"));
243270 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);
248271 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
249272 switchGeoItem.addActionListener(this);
250273 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
251274 switchTransfoItem.addActionListener(this);
252
- morphItem = menu.add(new MenuItem("Morph"));
275
+ morphItem = menu.add(new MenuItem("Morph Group"));
253276 morphItem.addActionListener(this);
277
+
278
+ if (Globals.ADVANCED)
279
+ {
280
+ menu.add("-");
281
+ physicsItem = menu.add(new MenuItem("Physics"));
282
+ physicsItem.addActionListener(this);
283
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
284
+ frameselectorItem.addActionListener(this);
254285 scriptNodeItem = menu.add(new MenuItem("Script Node"));
255286 scriptNodeItem.addActionListener(this);
256287 cameraItem = menu.add(new MenuItem("Camera"));
257288 cameraItem.addActionListener(this);
289
+ }
258290
259291 oe.menuBar.add(menu = new Menu("Object"));
260292 textureItem = menu.add(new MenuItem("Texture"));
....@@ -269,14 +301,18 @@
269301 shadowYItem.addActionListener(this);
270302 shadowZItem = menu.add(new MenuItem("Shadow Z"));
271303 shadowZItem.addActionListener(this);
304
+ if (Globals.ADVANCED)
305
+ {
306
+ menu.add("-");
272307 linkerItem = menu.add(new MenuItem("Linker"));
273308 linkerItem.addActionListener(this);
274
- templateItem = menu.add(new MenuItem("Template"));
275
- templateItem.addActionListener(this);
276309 attributeItem = menu.add(new MenuItem("Attribute"));
277310 attributeItem.addActionListener(this);
311
+ templateItem = menu.add(new MenuItem("Template"));
312
+ templateItem.addActionListener(this);
278313 pointflowItem = menu.add(new MenuItem("Point Flow"));
279314 pointflowItem.addActionListener(this);
315
+ }
280316 menu.add("-");
281317 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
282318 resetTransformItem.addActionListener(this);
....@@ -294,8 +330,11 @@
294330 genNormalsCADItem.addActionListener(this);
295331 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296332 genNormalsMESHItem.addActionListener(this);
333
+ if (Globals.ADVANCED)
334
+ {
297335 genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
298336 genNormalsMINEItem.addActionListener(this);
337
+ }
299338 stripifyItem = menu.add(new MenuItem("Stripify"));
300339 stripifyItem.addActionListener(this);
301340 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -317,10 +356,14 @@
317356 reduce34MeshItem.addActionListener(this);
318357 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
319358 increaseMeshItem.addActionListener(this);
320
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
321
- smoothMeshItem.addActionListener(this);
322359 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
323360 clipMeshItem.addActionListener(this);
361
+
362
+ if (Globals.ADVANCED)
363
+ {
364
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
365
+ smoothMeshItem.addActionListener(this);
366
+ }
324367
325368 oe.menuBar.add(menu = new Menu("Attributes"));
326369 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -330,10 +373,13 @@
330373 liveleavesItem.addActionListener(this);
331374 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
332375 unliveleavesItem.addActionListener(this);
376
+ if (Globals.ADVANCED)
377
+ {
333378 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
334379 supportleavesItem.addActionListener(this);
335380 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
336381 unsupportleavesItem.addActionListener(this);
382
+ }
337383 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
338384 hideleavesItem.addActionListener(this);
339385 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -376,6 +422,8 @@
376422 sortbysizeItem.addActionListener(this);
377423 sortbynameItem = menu.add(new MenuItem("Sort by name"));
378424 sortbynameItem.addActionListener(this);
425
+ if (Globals.ADVANCED)
426
+ {
379427 menu.add("-");
380428 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381429 extractGeometriesItem.addActionListener(this);
....@@ -385,11 +433,11 @@
385433 shareGeometriesItem.addActionListener(this);
386434 mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
387435 mergeGeometriesItem.addActionListener(this);
436
+ }
388437
389438 oe.menuBar.add(menu = new Menu("Insert"));
390439 buildCreateMenu(menu);
391440
392
-
393441 oe.menuBar.add(menu = new Menu("Include"));
394442 importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
395443 importGFDItem.addActionListener(this);
....@@ -436,11 +484,19 @@
436484 */
437485 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438486
439
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
487
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440488 liveCB.setToolTipText("Enabled animation");
441489 liveCB.addItemListener(this);
442490
443
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
491
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ oneStepButton.setToolTipText("Animate one step forward");
493
+ oneStepButton.addActionListener(this);
494
+
495
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
496
+ fastCB.setToolTipText("Fast mode");
497
+ fastCB.addItemListener(this);
498
+
499
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444500 trackCB.setToolTipText("Enable tracking");
445501 trackCB.addItemListener(this);
446502
....@@ -450,17 +506,14 @@
450506
451507 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
452508 // 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;
458509
459
- //aConstraints.gridx = 0;
460
- //aConstraints.gridy += 1;
461
- oe.aConstraints.weighty = 0;
462
- oe.aConstraints.gridwidth = 1;
463
-
510
+ if (Globals.ADVANCED)
511
+ {
512
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513
+ snapobjectButton.addActionListener(this);
514
+ snapobjectButton.setToolTipText("Snap Object");
515
+ }
516
+
464517 oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
465518 flashSelectionButton.setToolTipText("Show selection");
466519 flashSelectionButton.addActionListener(this);
....@@ -485,47 +538,42 @@
485538 //
486539
487540 oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
- rootButton.setToolTipText("Edit object in new tab");
541
+ rootButton.setToolTipText("Edit selection in new tab");
489542 rootButton.addActionListener(this);
490
- oe.aConstraints.gridx += 1;
491
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
543
+
544
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492545 closeButton.setToolTipText("Close tab");
493546 closeButton.addActionListener(this);
494547 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
495548 //clearButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497549
498
- oe.aConstraints.gridx = 1; //
499
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
550
+ cGridBag commandsPanel = new cGridBag();
551
+
552
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
553
+ editButton.setToolTipText("Edit selection");
500554 editButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.aConstraints.weighty = 0;
503
- oe.aConstraints.gridwidth = 1;
504555
505
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
556
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
557
+ uneditButton.setToolTipText("Unedit selection");
506558 uneditButton.addActionListener(this);
507559
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);
560
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
561
+ allParamsButton.setToolTipText("Edit all params");
520562 allParamsButton.addActionListener(this);
521563
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);
564
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
565
+ clearPanelButton.setToolTipText("Clear edit panel");
566
+ clearPanelButton.addActionListener(this);
567
+
568
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
569
+ unselectButton.setToolTipText("Unselect");
527570 unselectButton.addActionListener(this);
528571
572
+ commandsPanel.preferredHeight = 1;
573
+
574
+ oe.treePanel.add(commandsPanel);
575
+ oe.treePanel.Return();
576
+
529577 // oe.aConstraints.gridx += 1;
530578 // oe.aConstraints.weighty = 0;
531579 // oe.aConstraints.gridwidth = 1;
....@@ -537,40 +585,37 @@
537585 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
538586 // gcButton.addActionListener(this);
539587
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;
588
+ cGridBag jSPPanel = new cGridBag();
589
+
590
+ JScrollPane jSP;
551591 //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);
592
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
553593 ResetModel();
554
- oe.aConstraints.weighty = 0.5;
555
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
556
- oe.aConstraints.gridy += 1;
557
- oe.aConstraints.gridwidth = 1;
594
+
595
+ oe.treePanel.add(jSPPanel);
596
+ oe.treePanel.Return();
558597
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);
598
+ cGridBag copyOptionsPanel = new cGridBag();
599
+
600
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
601
+ colorCB.setToolTipText("Copy color when dropped");
563602 colorCB.addItemListener(this);
564
- oe.aConstraints.gridx += 2;
565
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
603
+
604
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
605
+ materialCB.setToolTipText("Copy material when dropped");
566606 materialCB.addItemListener(this);
567
- oe.aConstraints.gridx += 2;
568
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
607
+
608
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
609
+ textureCB.setToolTipText("Copy texture when dropped");
569610 textureCB.addItemListener(this);
570611
571
- oe.aConstraints.gridx = 0;
572
- oe.aConstraints.gridy += 1;
612
+ copyOptionsPanel.preferredHeight = 1;
613
+ oe.treePanel.add(copyOptionsPanel);
614
+ oe.treePanel.Return();
573615
616
+// mainPanel.setDividerLocation(0.5); //1.0);
617
+// mainPanel.setResizeWeight(0.5);
618
+
574619 //jList.addListSelectionListener(this);
575620 oe.jTree.addTreeSelectionListener(this);
576621 //jTree.setRootVisible(false);
....@@ -595,43 +640,35 @@
595640
596641 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
597642 {
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;
627643 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
628644 boxCB.setToolTipText("Display bounding boxes");
629645 boxCB.addItemListener(this);
630
- //constraints.gridy += 1;
646
+
631647 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
632648 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
633649 zoomBoxCB.addItemListener(this);
634650
651
+ if (Globals.ADVANCED)
652
+ {
653
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
654
+ supportCB.setToolTipText("Enable rigging");
655
+ supportCB.addItemListener(this);
656
+
657
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
658
+ // localCB.addItemListener(this);
659
+
660
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
661
+ crowdCB.setToolTipText("Used for crowds");
662
+ crowdCB.addItemListener(this);
663
+
664
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
665
+ smoothCB.setToolTipText("Snapping delay");
666
+ smoothCB.addItemListener(this);
667
+
668
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
669
+ slowCB.setToolTipText("Smooth interpolation");
670
+ slowCB.addItemListener(this);
671
+
635672 // constraints.gridy += 1;
636673 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
637674 // speakerMocapCB.addItemListener(this);
....@@ -656,14 +693,20 @@
656693 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
657694 // debugCB.addItemListener(this);
658695
659
- //constraints.gridy += 1;
660696 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
661697 oeilCB.addItemListener(this);
662698
663
- //constraints.gridy += 1;
664699 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665700 lookAtCB.setToolTipText("Look-at target");
666701 lookAtCB.addItemListener(this);
702
+
703
+ }
704
+
705
+ cGridBag fill = new cGridBag();
706
+
707
+ fill.preferredHeight = 200;
708
+
709
+ panel.add(fill);
667710
668711 }
669712
....@@ -948,11 +991,11 @@
948991 {
949992 loadClipboard(true);
950993 objEditor.jTree.setSelectionPath(destinationPath);
951
- pasteInto(false);
994
+ pasteInto(false, false);
952995 } else {
953996 loadClipboard(false);
954997 objEditor.jTree.setSelectionPath(destinationPath);
955
- pasteInto(false); // true); // ???
998
+ pasteInto(false, false); // true); // ???
956999 }
9571000 }
9581001 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1074,27 +1117,33 @@
10741117 kleinItem.addActionListener(this);
10751118 particleItem = menu.add(new MenuItem("Particle system"));
10761119 particleItem.addActionListener(this);
1120
+ if (Globals.ADVANCED)
1121
+ {
10771122 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10781123 ragdollItem.addActionListener(this);
10791124 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10801125 ragdoll2Item.addActionListener(this);
1126
+ }
10811127 menu.add("-");
1082
- meshItem = menu.add(new MenuItem("Mesh"));
1128
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10831129 meshItem.addActionListener(this);
10841130 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10851131 // meshGroupItem.addActionListener(this);
1132
+ if (Globals.ADVANCED)
1133
+ {
10861134 springItem = menu.add(new MenuItem("Spring"));
10871135 springItem.addActionListener(this);
10881136 flagItem = menu.add(new MenuItem("Flag"));
10891137 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);
10941138 blobItem = menu.add(new MenuItem("Blob"));
10951139 blobItem.addActionListener(this);
10961140 latheItem = menu.add(new MenuItem("Lathe"));
10971141 latheItem.addActionListener(this);
1142
+ }
1143
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1144
+ bezierItem.addActionListener(this);
1145
+ overlayItem = menu.add(new MenuItem("Overlay"));
1146
+ overlayItem.addActionListener(this);
10981147 lightItem = menu.add(new MenuItem("Light"));
10991148 lightItem.addActionListener(this);
11001149 menu.add("-");
....@@ -1104,34 +1153,39 @@
11041153 loopItem.addActionListener(this);
11051154 doubleItem = menu.add(new MenuItem("Fork"));
11061155 doubleItem.addActionListener(this);
1156
+ if (Globals.ADVANCED)
1157
+ {
11071158 tripleItem = menu.add(new MenuItem("Trident"));
11081159 tripleItem.addActionListener(this);
1160
+ }
11091161 }
11101162
11111163 void buildToolsMenu(Menu menu)
11121164 {
11131165 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11141166 animationItem.addItemListener(this);
1115
- animationItem.setState(CameraPane.ANIMATION);
1167
+ animationItem.setState(Globals.ANIMATION);
11161168
11171169 menu.add("-");
11181170 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
11191171 parseverticesItem.addActionListener(this);
11201172 textureFieldItem = menu.add(new MenuItem("Texture Field"));
11211173 textureFieldItem.addActionListener(this);
1122
- alignItem = menu.add(new MenuItem("Align"));
1174
+ alignItem = menu.add(new MenuItem("Align Objects"));
11231175 alignItem.addActionListener(this);
1124
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1125
- mirrorItem.addActionListener(this);
11261176 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
11271177 reduceMorphItem.addActionListener(this);
11281178 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
11291179 reduce34MorphItem.addActionListener(this);
1130
-
1180
+ menu.add("-");
11311181 menu.add(computeAOItem = new MenuItem("Compute AO"));
11321182 computeAOItem.addActionListener(this);
1133
- menu.add("-");
11341183
1184
+ if (Globals.ADVANCED)
1185
+ {
1186
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1187
+ mirrorItem.addActionListener(this);
1188
+ menu.add("-");
11351189 menu.add(memoryItem = new MenuItem("Memory Usage"));
11361190 memoryItem.addActionListener(this);
11371191 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1154,6 +1208,7 @@
11541208 menu.add("-");
11551209 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11561210 editScriptItem.addActionListener(this);
1211
+ }
11571212 }
11581213
11591214 void ScreenFit()
....@@ -1655,7 +1710,7 @@
16551710 {
16561711 makeSomething(new BezierSurface());
16571712 } else
1658
- if (source == checkerItem)
1713
+ if (source == overlayItem)
16591714 {
16601715 /*
16611716 Object3D obj = new BezierSurface(5,8);
....@@ -1843,6 +1898,11 @@
18431898 {
18441899 DumpObject();
18451900 } else
1901
+ if (source == oneStepButton)
1902
+ {
1903
+ Globals.ONESTEP = true;
1904
+ cameraView.repaint();
1905
+ } else
18461906 if (source == screenfitButton)
18471907 {
18481908 //Reload(lastConverter, lastFilename, true);
....@@ -1915,13 +1975,17 @@
19151975 {
19161976 paste(false);
19171977 } else
1978
+ if (source == pasteIntoItem)
1979
+ {
1980
+ pasteInto(true, false);
1981
+ } else
19181982 if (source == pasteLinkItem)
19191983 {
1920
- pasteInto(false);
1984
+ pasteInto(false, false);
19211985 } else
19221986 if (source == pasteCloneItem)
19231987 {
1924
- pasteInto(true);
1988
+ pasteInto(true, true);
19251989 } else
19261990 if (source == pasteExpandItem)
19271991 {
....@@ -2123,11 +2187,11 @@
21232187 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
21242188 for (int i=0; i<group.selection.size(); i++)
21252189 {
2126
- boolean random = CameraPane.RANDOM;
2127
- CameraPane.RANDOM = false; // parse all random nodes
2190
+ boolean random = CameraPane.SWITCH;
2191
+ CameraPane.SWITCH = false; // parse all random nodes
21282192 group.selection.get(i).linkVerticesThis(content);
21292193 // group.selection.get(i).setMasterThis(content); // should be identity
2130
- CameraPane.RANDOM = random;
2194
+ CameraPane.SWITCH = random;
21312195 }
21322196 Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21332197 refreshContents();
....@@ -2137,20 +2201,20 @@
21372201 {
21382202 for (int i=0; i<group.selection.size(); i++)
21392203 {
2140
- boolean random = CameraPane.RANDOM;
2141
- CameraPane.RANDOM = false; // parse all random nodes
2204
+ boolean random = CameraPane.SWITCH;
2205
+ CameraPane.SWITCH = false; // parse all random nodes
21422206 group.selection.get(i).linkVerticesThis(null);
2143
- CameraPane.RANDOM = random;
2207
+ CameraPane.SWITCH = random;
21442208 }
21452209
21462210 refreshContents();
21472211 } else
21482212 if (source == relinkverticesItem)
21492213 {
2150
- boolean random = CameraPane.RANDOM;
2151
- CameraPane.RANDOM = false; // parse all random nodes
2214
+ boolean random = CameraPane.SWITCH;
2215
+ CameraPane.SWITCH = false; // parse all random nodes
21522216 group.selection.RelinkToSupport();
2153
- CameraPane.RANDOM = random;
2217
+ CameraPane.SWITCH = random;
21542218
21552219 refreshContents();
21562220 } else
....@@ -2248,7 +2312,7 @@
22482312 RandomNode random = new RandomNode();
22492313 group(random);
22502314 if (random.size() > 0)
2251
- random.name = random.get(0).name + "Rnd";
2315
+ random.name = random.get(0).name + "Switch";
22522316 } else
22532317 if (source == physicsItem)
22542318 {
....@@ -2905,7 +2969,7 @@
29052969
29062970 child.editWindow = null; // ???????????
29072971 }
2908
- objEditor.ctrlPanel.validate();
2972
+ objEditor.ctrlPanel.FlushUI();
29092973 //objEditor.jTree.clearSelection();
29102974 //objEditor.ResetSliders();
29112975 refreshContents(true);
....@@ -3624,11 +3688,11 @@
36243688
36253689 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
36263690
3627
- boolean random = CameraPane.RANDOM;
3628
- CameraPane.RANDOM = false; // parse all random nodes
3691
+ boolean random = CameraPane.SWITCH;
3692
+ CameraPane.SWITCH = false; // parse all random nodes
36293693 lowres.linkVerticesThis(null);
36303694 lowres.linkVerticesThis(sn);
3631
- CameraPane.RANDOM = random;
3695
+ CameraPane.SWITCH = random;
36323696
36333697 System.err.flush();
36343698
....@@ -4113,12 +4177,12 @@
41134177 System.err.println("info : " + child.GetPath());
41144178 }
41154179 }
4116
- else
4117
- {
4118
- objEditor.SetMaterial(group); // .GetMaterial());
4119
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4120
- System.err.println("info : " + group.GetPath());
4121
- }
4180
+// else
4181
+// {
4182
+// objEditor.SetMaterial(group); // .GetMaterial());
4183
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4184
+// System.err.println("info : " + group.GetPath());
4185
+// }
41224186
41234187 objEditor.SetText(); // jan 2014
41244188
....@@ -4386,7 +4450,7 @@
43864450 refreshContents();
43874451 }
43884452
4389
- void pasteInto(boolean copyit)
4453
+ void pasteInto(boolean copyit, boolean clone)
43904454 {
43914455 // if (GrafreeD.clipboard == null)
43924456 // return;
....@@ -4415,7 +4479,14 @@
44154479 if (copyit)
44164480 {
44174481 // paste(false);
4418
- CloneClipboard(false); // sept 2014
4482
+ if (clone)
4483
+ {
4484
+ CloneClipboard(false); // sept 2014
4485
+ }
4486
+ else
4487
+ {
4488
+ paste(false);
4489
+ }
44194490 }
44204491 else
44214492 {
....@@ -4959,10 +5030,12 @@
49595030 cButton flashSelectionButton;
49605031 cButton editButton;
49615032 cButton uneditButton;
5033
+ JCheckBox allParamsButton;
49625034 cButton clearpanelButton;
4963
- cButton allParamsButton;
49645035 cButton unselectButton;
49655036
5037
+ cButton oneStepButton;
5038
+
49665039 cButton screenfitButton;
49675040 cButton screenfitpointButton;
49685041 cButton snapobjectButton;
....@@ -5017,6 +5090,7 @@
50175090 private MenuItem mergeGeometriesItem;
50185091 private MenuItem copyItem;
50195092 private MenuItem pasteItem;
5093
+ private MenuItem pasteIntoItem;
50205094 private MenuItem pasteLinkItem;
50215095 private MenuItem pasteCloneItem;
50225096 private MenuItem pasteExpandItem;
....@@ -5114,7 +5188,7 @@
51145188 private MenuItem blobItem;
51155189 private MenuItem latheItem;
51165190 private MenuItem bezierItem;
5117
- private MenuItem checkerItem;
5191
+ private MenuItem overlayItem;
51185192 private MenuItem meshItem;
51195193 // private MenuItem meshGroupItem;
51205194 private MenuItem springItem;