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/python/BPy_Freestyle.cpp
parent6a393fc9980cd57f6cd183dbe43088d8d816a556 (diff)
Cleanup: use single struct for freestyle globals
Was shadowing local vars.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Freestyle.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index d22632040f4..f8aef2a08ae 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -74,12 +74,13 @@ static char Freestyle_getCurrentScene___doc__[] =
static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/)
{
- if (!freestyle_scene) {
+ Scene *scene = g_freestyle.scene;
+ if (!scene) {
PyErr_SetString(PyExc_TypeError, "current scene not available");
return NULL;
}
PointerRNA ptr_scene;
- RNA_pointer_create(&freestyle_scene->id, &RNA_Scene, freestyle_scene, &ptr_scene);
+ RNA_pointer_create(&scene->id, &RNA_Scene, scene, &ptr_scene);
return pyrna_struct_CreatePyObject(&ptr_scene);
}