Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-02-14 16:40:29 +0400
committerThomas Dinges <blender@dingto.org>2014-02-14 16:41:02 +0400
commit34d17463311846ac40966ce262c99d790d31f19e (patch)
treefd72622afe9faf3b60528658a9f89f0e5629471a /intern/cycles/util/util_view.cpp
parent30c9fe19a31f6f92be4de2abacb9fd96179a9a04 (diff)
Cycles Standalone: Add interactive mode (I-key), to avoid accidental changes/movement.
Also some code and whitespace cleanup.
Diffstat (limited to 'intern/cycles/util/util_view.cpp')
-rw-r--r--intern/cycles/util/util_view.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/intern/cycles/util/util_view.cpp b/intern/cycles/util/util_view.cpp
index de655d9d41e..361a7bc95f2 100644
--- a/intern/cycles/util/util_view.cpp
+++ b/intern/cycles/util/util_view.cpp
@@ -42,7 +42,7 @@ struct View {
bool first_display;
bool redraw;
-
+
int mouseX, mouseY;
int mouseBut0, mouseBut2;
@@ -104,9 +104,10 @@ void view_display_help()
view_display_text(x1+20, y2-120, "r: Restart the render");
view_display_text(x1+20, y2-140, "q: Quit the program");
view_display_text(x1+20, y2-160, "esc: Cancel the render");
-
- view_display_text(x1+20, y2-190, "LMB: Move camera");
- view_display_text(x1+20, y2-210, "RMB: Rotate camera");
+
+ view_display_text(x1+20, y2-190, "Interactive Mode (i-key):");
+ view_display_text(x1+20, y2-210, "LMB: Move camera");
+ view_display_text(x1+20, y2-230, "RMB: Rotate camera");
glColor3f(1.0f, 1.0f, 1.0f);
}
@@ -142,7 +143,7 @@ static void view_reshape(int width, int height)
{
if(width <= 0 || height <= 0)
return;
-
+
V.width = width;
V.height = height;
@@ -200,10 +201,10 @@ static void view_motion(int x, int y)
const int but = V.mouseBut0? 0:2;
const int distX = x - V.mouseX;
const int distY = y - V.mouseY;
-
+
if(V.motion)
V.motion(distX, distY, but);
-
+
V.mouseX = x;
V.mouseY = y;
}