.. | .. |
---|
2065 | 2065 | //System.err.println("Oeil on"); |
---|
2066 | 2066 | OEIL = true; |
---|
2067 | 2067 | if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) |
---|
2068 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 2068 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
2069 | 2069 | //pingthread.StepToTarget(true); |
---|
2070 | 2070 | } |
---|
2071 | 2071 | |
---|
.. | .. |
---|
11527 | 11527 | if ((TRACK || SHADOWTRACK) || zoomonce) |
---|
11528 | 11528 | { |
---|
11529 | 11529 | if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) |
---|
11530 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 11530 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
11531 | 11531 | pingthread.StepToTarget(true); // true); |
---|
11532 | 11532 | // zoomonce = false; |
---|
11533 | 11533 | } |
---|
.. | .. |
---|
13943 | 13943 | |
---|
13944 | 13944 | // fev 2014??? |
---|
13945 | 13945 | if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode) |
---|
13946 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 13946 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
13947 | 13947 | pingthread.StepToTarget(true); // true); |
---|
13948 | 13948 | } |
---|
13949 | 13949 | // if (!LIVE) |
---|
.. | .. |
---|
14604 | 14604 | Globals.MOUSEDRAGGED = false; |
---|
14605 | 14605 | |
---|
14606 | 14606 | movingcamera = false; |
---|
14607 | | - X = Y = 0; |
---|
| 14607 | + X = 0; // getBounds().width/2; |
---|
| 14608 | + Y = 0; // getBounds().height/2; |
---|
14608 | 14609 | //System.out.println("mouseReleased: " + e); |
---|
14609 | 14610 | clickEnd(e.getX(), e.getY(), e.getModifiersEx()); |
---|
14610 | 14611 | } |
---|
.. | .. |
---|
15172 | 15173 | ClearSelection(); |
---|
15173 | 15174 | break; |
---|
15174 | 15175 | case '+': |
---|
| 15176 | + |
---|
15175 | 15177 | /* |
---|
15176 | 15178 | //fontsize += 1; |
---|
15177 | 15179 | bbzoom *= 2; |
---|
.. | .. |
---|
15189 | 15191 | case '=': |
---|
15190 | 15192 | IncDepth(); |
---|
15191 | 15193 | //fontsize += 1; |
---|
15192 | | - object.editWindow.refreshContents(true); |
---|
| 15194 | + object.GetWindow().refreshContents(true); |
---|
15193 | 15195 | maskbit = 6; |
---|
15194 | 15196 | break; |
---|
15195 | 15197 | case '-': //if (PixelThreshold>1) PixelThreshold /= 2; |
---|
15196 | 15198 | DecDepth(); |
---|
15197 | 15199 | maskbit = 5; |
---|
15198 | 15200 | //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); |
---|
15203 | 15205 | break; |
---|
15204 | 15206 | case '{': |
---|
15205 | 15207 | manipCamera.shaper_fovy /= 1.1; |
---|
.. | .. |
---|
15423 | 15425 | } |
---|
15424 | 15426 | */ |
---|
15425 | 15427 | |
---|
15426 | | - object.editWindow.EditSelection(false); |
---|
| 15428 | + object.GetWindow().EditSelection(false); |
---|
15427 | 15429 | } |
---|
15428 | 15430 | |
---|
15429 | 15431 | void SelectParent() |
---|
.. | .. |
---|
15440 | 15442 | { |
---|
15441 | 15443 | //selectees.remove(i); |
---|
15442 | 15444 | 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); |
---|
15444 | 15446 | } else |
---|
15445 | 15447 | { |
---|
15446 | | - group.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15448 | + group.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15447 | 15449 | } |
---|
15448 | 15450 | |
---|
15449 | 15451 | first = false; |
---|
.. | .. |
---|
15485 | 15487 | for (int j = 0; j < group.children.size(); j++) |
---|
15486 | 15488 | { |
---|
15487 | 15489 | elem = (Object3D) group.children.elementAt(j); |
---|
15488 | | - object.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15490 | + object.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15489 | 15491 | first = false; |
---|
15490 | 15492 | } |
---|
15491 | 15493 | } else |
---|
15492 | 15494 | { |
---|
15493 | | - object.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15495 | + object.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15494 | 15496 | } |
---|
15495 | 15497 | |
---|
15496 | 15498 | first = false; |
---|
.. | .. |
---|
15501 | 15503 | { |
---|
15502 | 15504 | //Composite group = (Composite) object; |
---|
15503 | 15505 | Object3D group = object; |
---|
15504 | | - group.editWindow.loadClipboard(true); // ClearSelection(false); |
---|
| 15506 | + group.GetWindow().loadClipboard(true); // ClearSelection(false); |
---|
15505 | 15507 | } |
---|
15506 | 15508 | |
---|
15507 | 15509 | void ResetTransform(int mask) |
---|
15508 | 15510 | { |
---|
15509 | 15511 | //Composite group = (Composite) object; |
---|
15510 | 15512 | Object3D group = object; |
---|
15511 | | - group.editWindow.ResetTransform(mask); |
---|
| 15513 | + group.GetWindow().ResetTransform(mask); |
---|
15512 | 15514 | } |
---|
15513 | 15515 | |
---|
15514 | 15516 | void FlipTransform() |
---|
15515 | 15517 | { |
---|
15516 | 15518 | //Composite group = (Composite) object; |
---|
15517 | 15519 | Object3D group = object; |
---|
15518 | | - group.editWindow.FlipTransform(); |
---|
| 15520 | + group.GetWindow().FlipTransform(); |
---|
15519 | 15521 | // group.editWindow.ReduceMesh(true); |
---|
15520 | 15522 | } |
---|
15521 | 15523 | |
---|
.. | .. |
---|
15523 | 15525 | { |
---|
15524 | 15526 | //Composite group = (Composite) object; |
---|
15525 | 15527 | Object3D group = object; |
---|
15526 | | - group.editWindow.PrintMemory(); |
---|
| 15528 | + group.GetWindow().PrintMemory(); |
---|
15527 | 15529 | // group.editWindow.ReduceMesh(true); |
---|
15528 | 15530 | } |
---|
15529 | 15531 | |
---|
.. | .. |
---|
15531 | 15533 | { |
---|
15532 | 15534 | //Composite group = (Composite) object; |
---|
15533 | 15535 | Object3D group = object; |
---|
15534 | | - group.editWindow.ResetCentroid(); |
---|
| 15536 | + group.GetWindow().ResetCentroid(); |
---|
15535 | 15537 | } |
---|
15536 | 15538 | |
---|
15537 | 15539 | void IncDepth() |
---|
.. | .. |
---|
15716 | 15718 | */ |
---|
15717 | 15719 | if (!isRenderer) |
---|
15718 | 15720 | { |
---|
15719 | | - object.drawEditHandles(info, 0); |
---|
15720 | | - |
---|
15721 | | - if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0) |
---|
| 15721 | + if (object.selection.Size() > 0) |
---|
15722 | 15722 | { |
---|
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) |
---|
15724 | 15729 | { |
---|
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; |
---|
15734 | 15737 | } |
---|
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 | + } |
---|
15736 | 15757 | } |
---|
15737 | 15758 | } |
---|
15738 | 15759 | } |
---|
.. | .. |
---|
16723 | 16744 | } |
---|
16724 | 16745 | |
---|
16725 | 16746 | if (!movingcamera && !PAINTMODE) |
---|
16726 | | - object.editWindow.ScreenFitPoint(); // fev 2014 |
---|
| 16747 | + object.GetWindow().ScreenFitPoint(); // fev 2014 |
---|
16727 | 16748 | |
---|
16728 | 16749 | if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
16729 | 16750 | { |
---|
.. | .. |
---|
16735 | 16756 | |
---|
16736 | 16757 | group.add(paintobj); // link |
---|
16737 | 16758 | |
---|
16738 | | - object.editWindow.SnapObject(group); |
---|
| 16759 | + object.GetWindow().SnapObject(group); |
---|
16739 | 16760 | |
---|
16740 | | - Object3D folder = object.editWindow.copy; |
---|
| 16761 | + Object3D folder = object.GetWindow().copy; |
---|
16741 | 16762 | |
---|
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); |
---|
16744 | 16765 | |
---|
16745 | 16766 | folder.add(group); |
---|
16746 | 16767 | |
---|
16747 | | - object.editWindow.ResetModel(); |
---|
16748 | | - object.editWindow.refreshContents(); |
---|
| 16768 | + object.GetWindow().ResetModel(); |
---|
| 16769 | + object.GetWindow().refreshContents(); |
---|
16749 | 16770 | } |
---|
16750 | 16771 | else |
---|
16751 | 16772 | paintcount = 0; |
---|