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:
authorCampbell Barton <ideasman42@gmail.com>2015-11-23 07:31:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-23 09:40:09 +0300
commita269287f36cfb99621fc8a5172c050f4a1046ba1 (patch)
tree9b7f9016348a94b67fb6300ab6a8c795f64dea65 /source/blender/freestyle/intern/application
parent6a393fc9980cd57f6cd183dbe43088d8d816a556 (diff)
Cleanup: use single struct for freestyle globals
Was shadowing local vars.
Diffstat (limited to 'source/blender/freestyle/intern/application')
-rw-r--r--source/blender/freestyle/intern/application/AppView.cpp6
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp12
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/application/AppView.cpp b/source/blender/freestyle/intern/application/AppView.cpp
index 9de426b91ab..c331d1de9c9 100644
--- a/source/blender/freestyle/intern/application/AppView.cpp
+++ b/source/blender/freestyle/intern/application/AppView.cpp
@@ -110,7 +110,7 @@ real AppView::distanceToSceneCenter()
{
BBox<Vec3r> bbox = _ModelRootNode->bbox();
- Vec3r v(freestyle_viewpoint[0], freestyle_viewpoint[1], freestyle_viewpoint[2]);
+ Vec3r v(UNPACK3(g_freestyle.viewpoint));
v -= 0.5 * (bbox.getMin() + bbox.getMax());
return v.norm();
@@ -121,7 +121,7 @@ real AppView::znear()
BBox<Vec3r> bbox = _ModelRootNode->bbox();
Vec3r u = bbox.getMin();
Vec3r v = bbox.getMax();
- Vec3r cameraCenter(freestyle_viewpoint[0], freestyle_viewpoint[1], freestyle_viewpoint[2]);
+ Vec3r cameraCenter(UNPACK3(g_freestyle.viewpoint));
Vec3r w1(u[0], u[1], u[2]);
Vec3r w2(v[0], u[1], u[2]);
@@ -156,7 +156,7 @@ real AppView::zfar()
BBox<Vec3r> bbox = _ModelRootNode->bbox();
Vec3r u = bbox.getMin();
Vec3r v = bbox.getMax();
- Vec3r cameraCenter(freestyle_viewpoint[0], freestyle_viewpoint[1], freestyle_viewpoint[2]);
+ Vec3r cameraCenter(UNPACK3(g_freestyle.viewpoint));
Vec3r w1(u[0], u[1], u[2]);
Vec3r w2(v[0], u[1], u[2]);
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index eb6a4702cba..136fec3dd1c 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -289,14 +289,14 @@ int Controller::LoadMesh(Render *re, SceneRenderLayer *srl)
if (_EnableViewMapCache) {
NodeCamera *cam;
- if (freestyle_proj[3][3] != 0.0)
+ if (g_freestyle.proj[3][3] != 0.0)
cam = new NodeOrthographicCamera;
else
cam = new NodePerspectiveCamera;
double proj[16];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
- proj[i * 4 + j] = freestyle_proj[i][j];
+ proj[i * 4 + j] = g_freestyle.proj[i][j];
}
}
cam->setProjectionMatrix(proj);
@@ -477,7 +477,7 @@ void Controller::ComputeViewMap()
// Restore the context of view:
// we need to perform all these operations while the
// 3D context is on.
- Vec3f vp(freestyle_viewpoint[0], freestyle_viewpoint[1], freestyle_viewpoint[2]);
+ Vec3f vp(UNPACK3(g_freestyle.viewpoint));
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
@@ -487,7 +487,7 @@ void Controller::ComputeViewMap()
real mv[4][4];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
- mv[i][j] = freestyle_mv[i][j];
+ mv[i][j] = g_freestyle.mv[i][j];
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
cout << mv[i][j] << " ";
@@ -509,7 +509,7 @@ void Controller::ComputeViewMap()
real proj[4][4];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
- proj[i][j] = freestyle_proj[i][j];
+ proj[i][j] = g_freestyle.proj[i][j];
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
cout << proj[i][j] << " ";
@@ -525,7 +525,7 @@ void Controller::ComputeViewMap()
int viewport[4];
for (int i = 0; i < 4; i++)
- viewport[i] = freestyle_viewport[i];
+ viewport[i] = g_freestyle.viewport[i];
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {