From ecff440ceef3ad352aa64cedbb913107ec4863a5 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Tue, 25 Jun 2019 19:19:24 -0400 Subject: [PATCH] Fix regression with refresh --- CameraPane.java | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 41 insertions(+), 8 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 7afdef6..1175edb 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -9366,11 +9366,35 @@ jy8[3] = 0.5f; } - float[] options1 = new float[]{1000, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV + float[] options1 = new float[]{100, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV float[] options2 = new float[]{0, 1, 0, 0}; // fog density, intensity, elevation float[] options3 = new float[]{1, 1, 1, 0}; // fog color float[] options4 = new float[]{1, 0, 1, 0}; // image intensity, subsurface, lightsheen + void ResetOptions() + { + options1[0] = 100; + options1[1] = 0.00001f; + options1[2] = 20; + options1[3] = 0; + options1[4] = 0; + + options2[0] = 0; + options2[1] = 1; + options2[2] = 0; + options2[3] = 0; + + options3[0] = 1; + options3[1] = 1; + options3[2] = 1; + options3[3] = 0; + + options4[0] = 1; + options4[1] = 0; + options4[2] = 1; + options4[3] = 0; + } + static int imagecount = 0; // movie generation static int jitter = 0; @@ -10481,6 +10505,7 @@ ANTIALIAS = 0; //System.out.println("RESTART"); AAtimer.restart(); + Globals.TIMERRUNNING = true; } } } @@ -11459,7 +11484,7 @@ static boolean zoomonce = false; - void CreateSelectedPoint() + static void CreateSelectedPoint() { if (selectedpoint == null) { @@ -11479,6 +11504,9 @@ void DrawObject(GL gl, boolean draw) { + // To clear camera values + ResetOptions(); + //System.out.println("DRAW OBJECT " + mouseDown); // DrawMode() = SELECTION; //GL gl = getGL(); @@ -12046,7 +12074,7 @@ for (int i = tp.size(); --i >= 0;) { //for (int count = tp.get(i).GetTransformCount(); --count>=0;) - LA.xformPos(light, tp.get(i).GlobalTransform(), light); + LA.xformPos(light, tp.get(i).GlobalTransformInv(), light); } @@ -13840,6 +13868,7 @@ else if (evt.getSource() == AAtimer) { + Globals.TIMERRUNNING = false; if (mouseDown) { //new Exception().printStackTrace(); @@ -13914,6 +13943,7 @@ return; AAtimer.restart(); // + Globals.TIMERRUNNING = true; // waslive = LIVE; // LIVE = false; @@ -14377,7 +14407,8 @@ info.camera = renderCamera; info.x = x; info.y = y; - object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0); + object.GetWindow().copy + .doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0); } else { if (x < startX) @@ -14541,9 +14572,9 @@ ci.camera = renderCamera; if (!isRenderer) { - ObjEditor editWindow = object.editWindow; - Object3D copy = editWindow.copy; - if (copy.doEditClick(ci, 0)) + //ObjEditor editWindow = object.editWindow; + //Object3D copy = editWindow.copy; + if (object.doEditClick(ci, 0)) { setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else @@ -15377,7 +15408,7 @@ } */ - object.editWindow.EditSelection(); + object.editWindow.EditSelection(false); } void SelectParent() @@ -16622,6 +16653,8 @@ // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]); // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]); + CreateSelectedPoint(); + // Will fit the mesh !!! selectedpoint.toParent[0][0] = 0.0001; selectedpoint.toParent[1][1] = 0.0001; -- Gitblit v1.6.2