Normand Briere
2019-07-06 77633b188d01228383ced79c26b41ebb2989624c
CameraPane.java
....@@ -2065,7 +2065,7 @@
20652065 //System.err.println("Oeil on");
20662066 OEIL = true;
20672067 if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode)
2068
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
2068
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
20692069 //pingthread.StepToTarget(true);
20702070 }
20712071
....@@ -11527,7 +11527,7 @@
1152711527 if ((TRACK || SHADOWTRACK) || zoomonce)
1152811528 {
1152911529 if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode)
11530
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
11530
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
1153111531 pingthread.StepToTarget(true); // true);
1153211532 // zoomonce = false;
1153311533 }
....@@ -13943,7 +13943,7 @@
1394313943
1394413944 // fev 2014???
1394513945 if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode)
13946
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
13946
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
1394713947 pingthread.StepToTarget(true); // true);
1394813948 }
1394913949 // if (!LIVE)
....@@ -14604,7 +14604,8 @@
1460414604 Globals.MOUSEDRAGGED = false;
1460514605
1460614606 movingcamera = false;
14607
- X = Y = 0;
14607
+ X = 0; // getBounds().width/2;
14608
+ Y = 0; // getBounds().height/2;
1460814609 //System.out.println("mouseReleased: " + e);
1460914610 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1461014611 }
....@@ -15190,17 +15191,17 @@
1519015191 case '=':
1519115192 IncDepth();
1519215193 //fontsize += 1;
15193
- object.editWindow.refreshContents(true);
15194
+ object.GetWindow().refreshContents(true);
1519415195 maskbit = 6;
1519515196 break;
1519615197 case '-': //if (PixelThreshold>1) PixelThreshold /= 2;
1519715198 DecDepth();
1519815199 maskbit = 5;
1519915200 //if(fontsize > 1) fontsize -= 1;
15200
- if (object.editWindow == null)
15201
- new Exception().printStackTrace();
15202
- else
15203
- object.editWindow.refreshContents(true);
15201
+// if (object.editWindow == null)
15202
+// new Exception().printStackTrace();
15203
+// else
15204
+ object.GetWindow().refreshContents(true);
1520415205 break;
1520515206 case '{':
1520615207 manipCamera.shaper_fovy /= 1.1;
....@@ -15424,7 +15425,7 @@
1542415425 }
1542515426 */
1542615427
15427
- object.editWindow.EditSelection(false);
15428
+ object.GetWindow().EditSelection(false);
1542815429 }
1542915430
1543015431 void SelectParent()
....@@ -15441,10 +15442,10 @@
1544115442 {
1544215443 //selectees.remove(i);
1544315444 System.out.println("select parent of " + elem);
15444
- group.editWindow.Select(elem.parent.GetTreePath(), first, true);
15445
+ group.GetWindow().Select(elem.parent.GetTreePath(), first, true);
1544515446 } else
1544615447 {
15447
- group.editWindow.Select(elem.GetTreePath(), first, true);
15448
+ group.GetWindow().Select(elem.GetTreePath(), first, true);
1544815449 }
1544915450
1545015451 first = false;
....@@ -15486,12 +15487,12 @@
1548615487 for (int j = 0; j < group.children.size(); j++)
1548715488 {
1548815489 elem = (Object3D) group.children.elementAt(j);
15489
- object.editWindow.Select(elem.GetTreePath(), first, true);
15490
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1549015491 first = false;
1549115492 }
1549215493 } else
1549315494 {
15494
- object.editWindow.Select(elem.GetTreePath(), first, true);
15495
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1549515496 }
1549615497
1549715498 first = false;
....@@ -15502,21 +15503,21 @@
1550215503 {
1550315504 //Composite group = (Composite) object;
1550415505 Object3D group = object;
15505
- group.editWindow.loadClipboard(true); // ClearSelection(false);
15506
+ group.GetWindow().loadClipboard(true); // ClearSelection(false);
1550615507 }
1550715508
1550815509 void ResetTransform(int mask)
1550915510 {
1551015511 //Composite group = (Composite) object;
1551115512 Object3D group = object;
15512
- group.editWindow.ResetTransform(mask);
15513
+ group.GetWindow().ResetTransform(mask);
1551315514 }
1551415515
1551515516 void FlipTransform()
1551615517 {
1551715518 //Composite group = (Composite) object;
1551815519 Object3D group = object;
15519
- group.editWindow.FlipTransform();
15520
+ group.GetWindow().FlipTransform();
1552015521 // group.editWindow.ReduceMesh(true);
1552115522 }
1552215523
....@@ -15524,7 +15525,7 @@
1552415525 {
1552515526 //Composite group = (Composite) object;
1552615527 Object3D group = object;
15527
- group.editWindow.PrintMemory();
15528
+ group.GetWindow().PrintMemory();
1552815529 // group.editWindow.ReduceMesh(true);
1552915530 }
1553015531
....@@ -15532,7 +15533,7 @@
1553215533 {
1553315534 //Composite group = (Composite) object;
1553415535 Object3D group = object;
15535
- group.editWindow.ResetCentroid();
15536
+ group.GetWindow().ResetCentroid();
1553615537 }
1553715538
1553815539 void IncDepth()
....@@ -15717,23 +15718,42 @@
1571715718 */
1571815719 if (!isRenderer)
1571915720 {
15720
- object.drawEditHandles(info, 0);
15721
-
15722
- if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0)
15721
+ if (object.selection.Size() > 0)
1572315722 {
15724
- switch (object.selection.get(0).hitSomething)
15723
+ int hitSomething = object.selection.get(0).hitSomething;
15724
+
15725
+ info.DX = 0;
15726
+ info.DY = 0;
15727
+ info.W = 1;
15728
+ if (hitSomething == Object3D.hitCenter)
1572515729 {
15726
- case Object3D.hitCenter: gr.setColor(Color.pink);
15727
- gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15728
- break;
15729
- case Object3D.hitRotate: gr.setColor(Color.yellow);
15730
- gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15731
- break;
15732
- case Object3D.hitScale: gr.setColor(Color.cyan);
15733
- gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15734
- break;
15730
+ info.DX = X;
15731
+ if (X != 0)
15732
+ info.DX -= info.bounds.width/2;
15733
+
15734
+ info.DY = Y;
15735
+ if (Y != 0)
15736
+ info.DY -= info.bounds.height/2;
1573515737 }
15736
-
15738
+
15739
+ object.drawEditHandles(info, 0);
15740
+
15741
+ if (drag && (X != 0 || Y != 0))
15742
+ {
15743
+ switch (hitSomething)
15744
+ {
15745
+ case Object3D.hitCenter: gr.setColor(Color.pink);
15746
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15747
+ break;
15748
+ case Object3D.hitRotate: gr.setColor(Color.yellow);
15749
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15750
+ break;
15751
+ case Object3D.hitScale: gr.setColor(Color.cyan);
15752
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15753
+ break;
15754
+ }
15755
+
15756
+ }
1573715757 }
1573815758 }
1573915759 }
....@@ -16724,7 +16744,7 @@
1672416744 }
1672516745
1672616746 if (!movingcamera && !PAINTMODE)
16727
- object.editWindow.ScreenFitPoint(); // fev 2014
16747
+ object.GetWindow().ScreenFitPoint(); // fev 2014
1672816748
1672916749 if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1673016750 {
....@@ -16736,17 +16756,17 @@
1673616756
1673716757 group.add(paintobj); // link
1673816758
16739
- object.editWindow.SnapObject(group);
16759
+ object.GetWindow().SnapObject(group);
1674016760
16741
- Object3D folder = object.editWindow.copy;
16761
+ Object3D folder = object.GetWindow().copy;
1674216762
16743
- if (object.editWindow.copy.selection.Size() > 0)
16744
- folder = object.editWindow.copy.selection.elementAt(0);
16763
+ if (object.GetWindow().copy.selection.Size() > 0)
16764
+ folder = object.GetWindow().copy.selection.elementAt(0);
1674516765
1674616766 folder.add(group);
1674716767
16748
- object.editWindow.ResetModel();
16749
- object.editWindow.refreshContents();
16768
+ object.GetWindow().ResetModel();
16769
+ object.GetWindow().refreshContents();
1675016770 }
1675116771 else
1675216772 paintcount = 0;