.. | .. |
---|
335 | 335 | display.options1[2] = material.shadowbias; |
---|
336 | 336 | display.options1[3] = material.aniso; |
---|
337 | 337 | display.options1[4] = material.anisoV; |
---|
| 338 | +// System.out.println("display.options1[0] " + display.options1[0]); |
---|
| 339 | +// System.out.println("display.options1[1] " + display.options1[1]); |
---|
| 340 | +// System.out.println("display.options1[2] " + display.options1[2]); |
---|
| 341 | +// System.out.println("display.options1[3] " + display.options1[3]); |
---|
| 342 | +// System.out.println("display.options1[4] " + display.options1[4]); |
---|
338 | 343 | display.options2[0] = material.opacity; |
---|
339 | 344 | display.options2[1] = material.diffuse; |
---|
340 | 345 | display.options2[2] = material.factor; |
---|
| 346 | +// System.out.println("display.options2[0] " + display.options2[0]); |
---|
| 347 | +// System.out.println("display.options2[1] " + display.options2[1]); |
---|
| 348 | +// System.out.println("display.options2[2] " + display.options2[2]); |
---|
341 | 349 | |
---|
342 | 350 | cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3); |
---|
| 351 | +// System.out.println("display.options3[0] " + display.options3[0]); |
---|
| 352 | +// System.out.println("display.options3[1] " + display.options3[1]); |
---|
| 353 | +// System.out.println("display.options3[2] " + display.options3[2]); |
---|
343 | 354 | display.options4[0] = material.cameralight/0.2f; |
---|
344 | 355 | display.options4[1] = material.subsurface; |
---|
345 | 356 | display.options4[2] = material.sheen; |
---|
| 357 | +// System.out.println("display.options4[0] " + display.options4[0]); |
---|
| 358 | +// System.out.println("display.options4[1] " + display.options4[1]); |
---|
| 359 | +// System.out.println("display.options4[2] " + display.options4[2]); |
---|
346 | 360 | |
---|
347 | 361 | // if (display.CURRENTANTIALIAS > 0) |
---|
348 | 362 | // display.options3[3] /= 4; |
---|
.. | .. |
---|
2051 | 2065 | //System.err.println("Oeil on"); |
---|
2052 | 2066 | OEIL = true; |
---|
2053 | 2067 | if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) |
---|
2054 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 2068 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
2055 | 2069 | //pingthread.StepToTarget(true); |
---|
2056 | 2070 | } |
---|
2057 | 2071 | |
---|
.. | .. |
---|
9366 | 9380 | jy8[3] = 0.5f; |
---|
9367 | 9381 | } |
---|
9368 | 9382 | |
---|
9369 | | - float[] options1 = new float[]{1000, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV |
---|
| 9383 | + float[] options1 = new float[]{100, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV |
---|
9370 | 9384 | float[] options2 = new float[]{0, 1, 0, 0}; // fog density, intensity, elevation |
---|
9371 | 9385 | float[] options3 = new float[]{1, 1, 1, 0}; // fog color |
---|
9372 | 9386 | float[] options4 = new float[]{1, 0, 1, 0}; // image intensity, subsurface, lightsheen |
---|
9373 | 9387 | |
---|
| 9388 | + void ResetOptions() |
---|
| 9389 | + { |
---|
| 9390 | + options1[0] = 100; |
---|
| 9391 | + options1[1] = 0.025f; |
---|
| 9392 | + options1[2] = 0.01f; |
---|
| 9393 | + options1[3] = 0; |
---|
| 9394 | + options1[4] = 0; |
---|
| 9395 | + |
---|
| 9396 | + options2[0] = 0; |
---|
| 9397 | + options2[1] = 0.75f; |
---|
| 9398 | + options2[2] = 0; |
---|
| 9399 | + options2[3] = 0; |
---|
| 9400 | + |
---|
| 9401 | + options3[0] = 1; |
---|
| 9402 | + options3[1] = 1; |
---|
| 9403 | + options3[2] = 1; |
---|
| 9404 | + options3[3] = 0; |
---|
| 9405 | + |
---|
| 9406 | + options4[0] = 1; |
---|
| 9407 | + options4[1] = 0; |
---|
| 9408 | + options4[2] = 1; |
---|
| 9409 | + options4[3] = 0; |
---|
| 9410 | + } |
---|
| 9411 | + |
---|
9374 | 9412 | static int imagecount = 0; // movie generation |
---|
9375 | 9413 | |
---|
9376 | 9414 | static int jitter = 0; |
---|
.. | .. |
---|
10990 | 11028 | |
---|
10991 | 11029 | gl.glMatrixMode(GL.GL_MODELVIEW); |
---|
10992 | 11030 | |
---|
10993 | | -//gl.glHint(gl.GL_POLYGON_SMOOTH_HINT, gl.GL_NICEST); |
---|
10994 | | -//gl.glEnable(gl.GL_POLYGON_SMOOTH); |
---|
10995 | | -//gl.glEnable(gl.GL_MULTISAMPLE); |
---|
| 11031 | +gl.glEnable(gl.GL_POLYGON_SMOOTH); |
---|
| 11032 | +gl.glHint(gl.GL_POLYGON_SMOOTH_HINT, gl.GL_NICEST); |
---|
| 11033 | +gl.glEnable(gl.GL_MULTISAMPLE); |
---|
10996 | 11034 | } else |
---|
10997 | 11035 | { |
---|
10998 | 11036 | //gl.glDisable(GL.GL_TEXTURE_2D); |
---|
.. | .. |
---|
11003 | 11041 | //System.out.println("BLENDING ON"); |
---|
11004 | 11042 | gl.glEnable(GL.GL_BLEND); |
---|
11005 | 11043 | gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); |
---|
11006 | | - |
---|
| 11044 | +// gl.glBlendFunc(GL.GL_SRC_ALPHA_SATURATE, GL.GL_ONE); |
---|
11007 | 11045 | gl.glMatrixMode(gl.GL_PROJECTION); |
---|
11008 | 11046 | gl.glLoadIdentity(); |
---|
11009 | 11047 | |
---|
.. | .. |
---|
11480 | 11518 | |
---|
11481 | 11519 | void DrawObject(GL gl, boolean draw) |
---|
11482 | 11520 | { |
---|
| 11521 | + // To clear camera values |
---|
| 11522 | + ResetOptions(); |
---|
| 11523 | + |
---|
11483 | 11524 | //System.out.println("DRAW OBJECT " + mouseDown); |
---|
11484 | 11525 | // DrawMode() = SELECTION; |
---|
11485 | 11526 | //GL gl = getGL(); |
---|
11486 | 11527 | if ((TRACK || SHADOWTRACK) || zoomonce) |
---|
11487 | 11528 | { |
---|
11488 | 11529 | if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) |
---|
11489 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 11530 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
11490 | 11531 | pingthread.StepToTarget(true); // true); |
---|
11491 | 11532 | // zoomonce = false; |
---|
11492 | 11533 | } |
---|
.. | .. |
---|
12047 | 12088 | for (int i = tp.size(); --i >= 0;) |
---|
12048 | 12089 | { |
---|
12049 | 12090 | //for (int count = tp.get(i).GetTransformCount(); --count>=0;) |
---|
12050 | | - LA.xformPos(light, tp.get(i).GlobalTransform(), light); |
---|
| 12091 | + LA.xformPos(light, tp.get(i).GlobalTransformInv(), light); |
---|
12051 | 12092 | } |
---|
12052 | 12093 | |
---|
12053 | 12094 | |
---|
.. | .. |
---|
13334 | 13375 | "DP3 " + dest + ".z," + "normals," + "eye;" + |
---|
13335 | 13376 | "MAX " + dest + ".w," + dest + ".z," + "eps.x;" + |
---|
13336 | 13377 | //"MOV " + dest + ".w," + "normal.z;" + |
---|
13337 | | - "MUL " + dest + ".z," + "params2.w," + dest + ".x;" + |
---|
13338 | | - "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" + |
---|
13339 | | - //"MOV " + dest + ".z," + "params2.w;" + |
---|
| 13378 | +// "MUL " + dest + ".z," + "params2.w," + dest + ".x;" + // PRETTY HEURISTIC FOR VELVET |
---|
| 13379 | +// "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" + |
---|
| 13380 | + |
---|
| 13381 | + "MOV " + dest + ".z," + "params2.w;" + // EXACT |
---|
13340 | 13382 | "POW " + dest + ".w," + dest + ".w," + dest + ".z;" + |
---|
13341 | 13383 | "RCP " + dest + ".w," + dest + ".w;" + |
---|
13342 | 13384 | //"RSQ " + dest + ".w," + dest + ".w;" + |
---|
.. | .. |
---|
13901 | 13943 | |
---|
13902 | 13944 | // fev 2014??? |
---|
13903 | 13945 | if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode) |
---|
13904 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 13946 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
13905 | 13947 | pingthread.StepToTarget(true); // true); |
---|
13906 | 13948 | } |
---|
13907 | 13949 | // if (!LIVE) |
---|
.. | .. |
---|
14255 | 14297 | void GoDown(int mod) |
---|
14256 | 14298 | { |
---|
14257 | 14299 | MODIFIERS |= COMMAND; |
---|
14258 | | - /* |
---|
| 14300 | + /**/ |
---|
14259 | 14301 | if((mod&SHIFT) == SHIFT) |
---|
14260 | 14302 | manipCamera.RotatePosition(0, -speed); |
---|
14261 | 14303 | else |
---|
14262 | | - manipCamera.BackForth(0, -speed*delta, getWidth()); |
---|
14263 | | - */ |
---|
| 14304 | + manipCamera.BackForth(0, -speed*delta, 0); // getWidth()); |
---|
| 14305 | + /**/ |
---|
14264 | 14306 | if ((mod & SHIFT) == SHIFT) |
---|
14265 | 14307 | { |
---|
14266 | 14308 | mouseMode = mouseMode; // VR?? |
---|
.. | .. |
---|
14276 | 14318 | void GoUp(int mod) |
---|
14277 | 14319 | { |
---|
14278 | 14320 | MODIFIERS |= COMMAND; |
---|
14279 | | - /* |
---|
| 14321 | + /**/ |
---|
14280 | 14322 | if((mod&SHIFT) == SHIFT) |
---|
14281 | 14323 | manipCamera.RotatePosition(0, speed); |
---|
14282 | 14324 | else |
---|
14283 | | - manipCamera.BackForth(0, speed*delta, getWidth()); |
---|
14284 | | - */ |
---|
| 14325 | + manipCamera.BackForth(0, speed*delta, 0); // getWidth()); |
---|
| 14326 | + /**/ |
---|
14285 | 14327 | if ((mod & SHIFT) == SHIFT) |
---|
14286 | 14328 | { |
---|
14287 | 14329 | mouseMode = mouseMode; |
---|
.. | .. |
---|
14297 | 14339 | void GoLeft(int mod) |
---|
14298 | 14340 | { |
---|
14299 | 14341 | MODIFIERS |= COMMAND; |
---|
14300 | | - /* |
---|
| 14342 | + /**/ |
---|
14301 | 14343 | if((mod&SHIFT) == SHIFT) |
---|
14302 | | - manipCamera.RotatePosition(speed, 0); |
---|
14303 | | - else |
---|
14304 | 14344 | manipCamera.Translate(speed*delta, 0, getWidth()); |
---|
14305 | | - */ |
---|
| 14345 | + else |
---|
| 14346 | + manipCamera.RotatePosition(speed, 0); |
---|
| 14347 | + /**/ |
---|
14306 | 14348 | if ((mod & SHIFT) == SHIFT) |
---|
14307 | 14349 | { |
---|
14308 | 14350 | mouseMode = mouseMode; |
---|
.. | .. |
---|
14318 | 14360 | void GoRight(int mod) |
---|
14319 | 14361 | { |
---|
14320 | 14362 | MODIFIERS |= COMMAND; |
---|
14321 | | - /* |
---|
| 14363 | + /**/ |
---|
14322 | 14364 | if((mod&SHIFT) == SHIFT) |
---|
14323 | | - manipCamera.RotatePosition(-speed, 0); |
---|
14324 | | - else |
---|
14325 | 14365 | manipCamera.Translate(-speed*delta, 0, getWidth()); |
---|
14326 | | - */ |
---|
| 14366 | + else |
---|
| 14367 | + manipCamera.RotatePosition(-speed, 0); |
---|
| 14368 | + /**/ |
---|
14327 | 14369 | if ((mod & SHIFT) == SHIFT) |
---|
14328 | 14370 | { |
---|
14329 | 14371 | mouseMode = mouseMode; |
---|
.. | .. |
---|
14562 | 14604 | Globals.MOUSEDRAGGED = false; |
---|
14563 | 14605 | |
---|
14564 | 14606 | movingcamera = false; |
---|
14565 | | - X = Y = 0; |
---|
| 14607 | + X = 0; // getBounds().width/2; |
---|
| 14608 | + Y = 0; // getBounds().height/2; |
---|
14566 | 14609 | //System.out.println("mouseReleased: " + e); |
---|
14567 | 14610 | clickEnd(e.getX(), e.getY(), e.getModifiersEx()); |
---|
14568 | 14611 | } |
---|
.. | .. |
---|
14903 | 14946 | case 'E' : COMPACT ^= true; |
---|
14904 | 14947 | repaint(); |
---|
14905 | 14948 | break; |
---|
14906 | | - case 'W' : DEBUGHSB ^= true; |
---|
| 14949 | + case 'W' : // Wide Window (fullscreen) |
---|
| 14950 | + //DEBUGHSB ^= true; |
---|
| 14951 | + ObjEditor.theFrame.ToggleFullScreen(); |
---|
14907 | 14952 | repaint(); |
---|
14908 | 14953 | break; |
---|
14909 | 14954 | case 'u' : Udebug ^= true; Vdebug = false; NORMALdebug = false; programInitialized = false; repaint(); break; |
---|
.. | .. |
---|
14929 | 14974 | repaint(); |
---|
14930 | 14975 | break; |
---|
14931 | 14976 | case 'l': |
---|
14932 | | - lightMode ^= true; |
---|
14933 | | - Globals.lighttouched = true; |
---|
14934 | | - manipCamera = renderCamera = lightMode ? lightCamera : eyeCamera; |
---|
14935 | | - targetLookAt.set(manipCamera.lookAt); |
---|
14936 | | - repaint(); |
---|
14937 | | - break; |
---|
14938 | | - case 'L': |
---|
| 14977 | + //case 'L': |
---|
14939 | 14978 | if (lightMode) |
---|
14940 | 14979 | { |
---|
14941 | 14980 | lightMode = false; |
---|
.. | .. |
---|
15078 | 15117 | case '_': |
---|
15079 | 15118 | kompactbit = 5; |
---|
15080 | 15119 | break; |
---|
15081 | | - case '+': |
---|
15082 | | - kompactbit = 6; |
---|
15083 | | - break; |
---|
| 15120 | +// case '+': |
---|
| 15121 | +// kompactbit = 6; |
---|
| 15122 | +// break; |
---|
15084 | 15123 | case ' ': |
---|
15085 | | - ObjEditor.theFrame.ToggleFullScreen(); |
---|
| 15124 | + lightMode ^= true; |
---|
| 15125 | + Globals.lighttouched = true; |
---|
| 15126 | + manipCamera = renderCamera = lightMode ? lightCamera : eyeCamera; |
---|
| 15127 | + targetLookAt.set(manipCamera.lookAt); |
---|
15086 | 15128 | repaint(); |
---|
15087 | 15129 | break; |
---|
15088 | 15130 | //case '`' : |
---|
.. | .. |
---|
15129 | 15171 | case DELETE: |
---|
15130 | 15172 | ClearSelection(); |
---|
15131 | 15173 | break; |
---|
15132 | | - /* |
---|
15133 | 15174 | case '+': |
---|
| 15175 | + |
---|
| 15176 | + /* |
---|
15134 | 15177 | //fontsize += 1; |
---|
15135 | 15178 | bbzoom *= 2; |
---|
15136 | 15179 | repaint(); |
---|
.. | .. |
---|
15147 | 15190 | case '=': |
---|
15148 | 15191 | IncDepth(); |
---|
15149 | 15192 | //fontsize += 1; |
---|
15150 | | - object.editWindow.refreshContents(true); |
---|
| 15193 | + object.GetWindow().refreshContents(true); |
---|
15151 | 15194 | maskbit = 6; |
---|
15152 | 15195 | break; |
---|
15153 | 15196 | case '-': //if (PixelThreshold>1) PixelThreshold /= 2; |
---|
15154 | 15197 | DecDepth(); |
---|
15155 | 15198 | maskbit = 5; |
---|
15156 | 15199 | //if(fontsize > 1) fontsize -= 1; |
---|
15157 | | - if (object.editWindow == null) |
---|
15158 | | - new Exception().printStackTrace(); |
---|
15159 | | - else |
---|
15160 | | - object.editWindow.refreshContents(true); |
---|
| 15200 | +// if (object.editWindow == null) |
---|
| 15201 | +// new Exception().printStackTrace(); |
---|
| 15202 | +// else |
---|
| 15203 | + object.GetWindow().refreshContents(true); |
---|
15161 | 15204 | break; |
---|
15162 | 15205 | case '{': |
---|
15163 | 15206 | manipCamera.shaper_fovy /= 1.1; |
---|
.. | .. |
---|
15381 | 15424 | } |
---|
15382 | 15425 | */ |
---|
15383 | 15426 | |
---|
15384 | | - object.editWindow.EditSelection(false); |
---|
| 15427 | + object.GetWindow().EditSelection(false); |
---|
15385 | 15428 | } |
---|
15386 | 15429 | |
---|
15387 | 15430 | void SelectParent() |
---|
.. | .. |
---|
15398 | 15441 | { |
---|
15399 | 15442 | //selectees.remove(i); |
---|
15400 | 15443 | System.out.println("select parent of " + elem); |
---|
15401 | | - group.editWindow.Select(elem.parent.GetTreePath(), first, true); |
---|
| 15444 | + group.GetWindow().Select(elem.parent.GetTreePath(), first, true); |
---|
15402 | 15445 | } else |
---|
15403 | 15446 | { |
---|
15404 | | - group.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15447 | + group.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15405 | 15448 | } |
---|
15406 | 15449 | |
---|
15407 | 15450 | first = false; |
---|
.. | .. |
---|
15443 | 15486 | for (int j = 0; j < group.children.size(); j++) |
---|
15444 | 15487 | { |
---|
15445 | 15488 | elem = (Object3D) group.children.elementAt(j); |
---|
15446 | | - object.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15489 | + object.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15447 | 15490 | first = false; |
---|
15448 | 15491 | } |
---|
15449 | 15492 | } else |
---|
15450 | 15493 | { |
---|
15451 | | - object.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15494 | + object.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15452 | 15495 | } |
---|
15453 | 15496 | |
---|
15454 | 15497 | first = false; |
---|
.. | .. |
---|
15459 | 15502 | { |
---|
15460 | 15503 | //Composite group = (Composite) object; |
---|
15461 | 15504 | Object3D group = object; |
---|
15462 | | - group.editWindow.loadClipboard(true); // ClearSelection(false); |
---|
| 15505 | + group.GetWindow().loadClipboard(true); // ClearSelection(false); |
---|
15463 | 15506 | } |
---|
15464 | 15507 | |
---|
15465 | 15508 | void ResetTransform(int mask) |
---|
15466 | 15509 | { |
---|
15467 | 15510 | //Composite group = (Composite) object; |
---|
15468 | 15511 | Object3D group = object; |
---|
15469 | | - group.editWindow.ResetTransform(mask); |
---|
| 15512 | + group.GetWindow().ResetTransform(mask); |
---|
15470 | 15513 | } |
---|
15471 | 15514 | |
---|
15472 | 15515 | void FlipTransform() |
---|
15473 | 15516 | { |
---|
15474 | 15517 | //Composite group = (Composite) object; |
---|
15475 | 15518 | Object3D group = object; |
---|
15476 | | - group.editWindow.FlipTransform(); |
---|
| 15519 | + group.GetWindow().FlipTransform(); |
---|
15477 | 15520 | // group.editWindow.ReduceMesh(true); |
---|
15478 | 15521 | } |
---|
15479 | 15522 | |
---|
.. | .. |
---|
15481 | 15524 | { |
---|
15482 | 15525 | //Composite group = (Composite) object; |
---|
15483 | 15526 | Object3D group = object; |
---|
15484 | | - group.editWindow.PrintMemory(); |
---|
| 15527 | + group.GetWindow().PrintMemory(); |
---|
15485 | 15528 | // group.editWindow.ReduceMesh(true); |
---|
15486 | 15529 | } |
---|
15487 | 15530 | |
---|
.. | .. |
---|
15489 | 15532 | { |
---|
15490 | 15533 | //Composite group = (Composite) object; |
---|
15491 | 15534 | Object3D group = object; |
---|
15492 | | - group.editWindow.ResetCentroid(); |
---|
| 15535 | + group.GetWindow().ResetCentroid(); |
---|
15493 | 15536 | } |
---|
15494 | 15537 | |
---|
15495 | 15538 | void IncDepth() |
---|
.. | .. |
---|
15674 | 15717 | */ |
---|
15675 | 15718 | if (!isRenderer) |
---|
15676 | 15719 | { |
---|
15677 | | - object.drawEditHandles(info, 0); |
---|
15678 | | - |
---|
15679 | | - if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0) |
---|
| 15720 | + if (object.selection.Size() > 0) |
---|
15680 | 15721 | { |
---|
15681 | | - switch (object.selection.get(0).hitSomething) |
---|
| 15722 | + int hitSomething = object.selection.get(0).hitSomething; |
---|
| 15723 | + |
---|
| 15724 | + info.DX = 0; |
---|
| 15725 | + info.DY = 0; |
---|
| 15726 | + info.W = 1; |
---|
| 15727 | + if (hitSomething == Object3D.hitCenter) |
---|
15682 | 15728 | { |
---|
15683 | | - case Object3D.hitCenter: gr.setColor(Color.pink); |
---|
15684 | | - gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
15685 | | - break; |
---|
15686 | | - case Object3D.hitRotate: gr.setColor(Color.yellow); |
---|
15687 | | - gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
15688 | | - break; |
---|
15689 | | - case Object3D.hitScale: gr.setColor(Color.cyan); |
---|
15690 | | - gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
15691 | | - break; |
---|
| 15729 | + info.DX = X; |
---|
| 15730 | + if (X != 0) |
---|
| 15731 | + info.DX -= info.bounds.width/2; |
---|
| 15732 | + |
---|
| 15733 | + info.DY = Y; |
---|
| 15734 | + if (Y != 0) |
---|
| 15735 | + info.DY -= info.bounds.height/2; |
---|
15692 | 15736 | } |
---|
15693 | | - |
---|
| 15737 | + |
---|
| 15738 | + object.drawEditHandles(info, 0); |
---|
| 15739 | + |
---|
| 15740 | + if (drag && (X != 0 || Y != 0)) |
---|
| 15741 | + { |
---|
| 15742 | + switch (hitSomething) |
---|
| 15743 | + { |
---|
| 15744 | + case Object3D.hitCenter: gr.setColor(Color.pink); |
---|
| 15745 | + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
| 15746 | + break; |
---|
| 15747 | + case Object3D.hitRotate: gr.setColor(Color.yellow); |
---|
| 15748 | + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
| 15749 | + break; |
---|
| 15750 | + case Object3D.hitScale: gr.setColor(Color.cyan); |
---|
| 15751 | + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
| 15752 | + break; |
---|
| 15753 | + } |
---|
| 15754 | + |
---|
| 15755 | + } |
---|
15694 | 15756 | } |
---|
15695 | 15757 | } |
---|
15696 | 15758 | } |
---|
.. | .. |
---|
16681 | 16743 | } |
---|
16682 | 16744 | |
---|
16683 | 16745 | if (!movingcamera && !PAINTMODE) |
---|
16684 | | - object.editWindow.ScreenFitPoint(); // fev 2014 |
---|
| 16746 | + object.GetWindow().ScreenFitPoint(); // fev 2014 |
---|
16685 | 16747 | |
---|
16686 | 16748 | if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
16687 | 16749 | { |
---|
.. | .. |
---|
16693 | 16755 | |
---|
16694 | 16756 | group.add(paintobj); // link |
---|
16695 | 16757 | |
---|
16696 | | - object.editWindow.SnapObject(group); |
---|
| 16758 | + object.GetWindow().SnapObject(group); |
---|
16697 | 16759 | |
---|
16698 | | - Object3D folder = object.editWindow.copy; |
---|
| 16760 | + Object3D folder = object.GetWindow().copy; |
---|
16699 | 16761 | |
---|
16700 | | - if (object.editWindow.copy.selection.Size() > 0) |
---|
16701 | | - folder = object.editWindow.copy.selection.elementAt(0); |
---|
| 16762 | + if (object.GetWindow().copy.selection.Size() > 0) |
---|
| 16763 | + folder = object.GetWindow().copy.selection.elementAt(0); |
---|
16702 | 16764 | |
---|
16703 | 16765 | folder.add(group); |
---|
16704 | 16766 | |
---|
16705 | | - object.editWindow.ResetModel(); |
---|
16706 | | - object.editWindow.refreshContents(); |
---|
| 16767 | + object.GetWindow().ResetModel(); |
---|
| 16768 | + object.GetWindow().refreshContents(); |
---|
16707 | 16769 | } |
---|
16708 | 16770 | else |
---|
16709 | 16771 | paintcount = 0; |
---|
.. | .. |
---|
16742 | 16804 | //System.out.println("objects[color] = " + objects[color]); |
---|
16743 | 16805 | //objects[color].Select(); |
---|
16744 | 16806 | indexcount = 0; |
---|
| 16807 | + ObjEditor window = object.GetWindow(); |
---|
| 16808 | + if (window != null && deselect) |
---|
| 16809 | + { |
---|
| 16810 | + window.Select(null, deselect, true); |
---|
| 16811 | + } |
---|
16745 | 16812 | object.Select(color, deselect); |
---|
16746 | 16813 | } |
---|
16747 | 16814 | |
---|