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 }
....@@ -15172,6 +15173,7 @@
1517215173 ClearSelection();
1517315174 break;
1517415175 case '+':
15176
+
1517515177 /*
1517615178 //fontsize += 1;
1517715179 bbzoom *= 2;
....@@ -15189,17 +15191,17 @@
1518915191 case '=':
1519015192 IncDepth();
1519115193 //fontsize += 1;
15192
- object.editWindow.refreshContents(true);
15194
+ object.GetWindow().refreshContents(true);
1519315195 maskbit = 6;
1519415196 break;
1519515197 case '-': //if (PixelThreshold>1) PixelThreshold /= 2;
1519615198 DecDepth();
1519715199 maskbit = 5;
1519815200 //if(fontsize > 1) fontsize -= 1;
15199
- if (object.editWindow == null)
15200
- new Exception().printStackTrace();
15201
- else
15202
- object.editWindow.refreshContents(true);
15201
+// if (object.editWindow == null)
15202
+// new Exception().printStackTrace();
15203
+// else
15204
+ object.GetWindow().refreshContents(true);
1520315205 break;
1520415206 case '{':
1520515207 manipCamera.shaper_fovy /= 1.1;
....@@ -15423,7 +15425,7 @@
1542315425 }
1542415426 */
1542515427
15426
- object.editWindow.EditSelection(false);
15428
+ object.GetWindow().EditSelection(false);
1542715429 }
1542815430
1542915431 void SelectParent()
....@@ -15440,10 +15442,10 @@
1544015442 {
1544115443 //selectees.remove(i);
1544215444 System.out.println("select parent of " + elem);
15443
- group.editWindow.Select(elem.parent.GetTreePath(), first, true);
15445
+ group.GetWindow().Select(elem.parent.GetTreePath(), first, true);
1544415446 } else
1544515447 {
15446
- group.editWindow.Select(elem.GetTreePath(), first, true);
15448
+ group.GetWindow().Select(elem.GetTreePath(), first, true);
1544715449 }
1544815450
1544915451 first = false;
....@@ -15485,12 +15487,12 @@
1548515487 for (int j = 0; j < group.children.size(); j++)
1548615488 {
1548715489 elem = (Object3D) group.children.elementAt(j);
15488
- object.editWindow.Select(elem.GetTreePath(), first, true);
15490
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1548915491 first = false;
1549015492 }
1549115493 } else
1549215494 {
15493
- object.editWindow.Select(elem.GetTreePath(), first, true);
15495
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1549415496 }
1549515497
1549615498 first = false;
....@@ -15501,21 +15503,21 @@
1550115503 {
1550215504 //Composite group = (Composite) object;
1550315505 Object3D group = object;
15504
- group.editWindow.loadClipboard(true); // ClearSelection(false);
15506
+ group.GetWindow().loadClipboard(true); // ClearSelection(false);
1550515507 }
1550615508
1550715509 void ResetTransform(int mask)
1550815510 {
1550915511 //Composite group = (Composite) object;
1551015512 Object3D group = object;
15511
- group.editWindow.ResetTransform(mask);
15513
+ group.GetWindow().ResetTransform(mask);
1551215514 }
1551315515
1551415516 void FlipTransform()
1551515517 {
1551615518 //Composite group = (Composite) object;
1551715519 Object3D group = object;
15518
- group.editWindow.FlipTransform();
15520
+ group.GetWindow().FlipTransform();
1551915521 // group.editWindow.ReduceMesh(true);
1552015522 }
1552115523
....@@ -15523,7 +15525,7 @@
1552315525 {
1552415526 //Composite group = (Composite) object;
1552515527 Object3D group = object;
15526
- group.editWindow.PrintMemory();
15528
+ group.GetWindow().PrintMemory();
1552715529 // group.editWindow.ReduceMesh(true);
1552815530 }
1552915531
....@@ -15531,7 +15533,7 @@
1553115533 {
1553215534 //Composite group = (Composite) object;
1553315535 Object3D group = object;
15534
- group.editWindow.ResetCentroid();
15536
+ group.GetWindow().ResetCentroid();
1553515537 }
1553615538
1553715539 void IncDepth()
....@@ -15716,23 +15718,42 @@
1571615718 */
1571715719 if (!isRenderer)
1571815720 {
15719
- object.drawEditHandles(info, 0);
15720
-
15721
- if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0)
15721
+ if (object.selection.Size() > 0)
1572215722 {
15723
- 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)
1572415729 {
15725
- case Object3D.hitCenter: gr.setColor(Color.pink);
15726
- gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15727
- break;
15728
- case Object3D.hitRotate: gr.setColor(Color.yellow);
15729
- gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15730
- break;
15731
- case Object3D.hitScale: gr.setColor(Color.cyan);
15732
- gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15733
- 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;
1573415737 }
15735
-
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
+ }
1573615757 }
1573715758 }
1573815759 }
....@@ -16723,7 +16744,7 @@
1672316744 }
1672416745
1672516746 if (!movingcamera && !PAINTMODE)
16726
- object.editWindow.ScreenFitPoint(); // fev 2014
16747
+ object.GetWindow().ScreenFitPoint(); // fev 2014
1672716748
1672816749 if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1672916750 {
....@@ -16735,17 +16756,17 @@
1673516756
1673616757 group.add(paintobj); // link
1673716758
16738
- object.editWindow.SnapObject(group);
16759
+ object.GetWindow().SnapObject(group);
1673916760
16740
- Object3D folder = object.editWindow.copy;
16761
+ Object3D folder = object.GetWindow().copy;
1674116762
16742
- if (object.editWindow.copy.selection.Size() > 0)
16743
- folder = object.editWindow.copy.selection.elementAt(0);
16763
+ if (object.GetWindow().copy.selection.Size() > 0)
16764
+ folder = object.GetWindow().copy.selection.elementAt(0);
1674416765
1674516766 folder.add(group);
1674616767
16747
- object.editWindow.ResetModel();
16748
- object.editWindow.refreshContents();
16768
+ object.GetWindow().ResetModel();
16769
+ object.GetWindow().refreshContents();
1674916770 }
1675016771 else
1675116772 paintcount = 0;