From a269287f36cfb99621fc8a5172c050f4a1046ba1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 23 Nov 2015 15:31:11 +1100 Subject: Cleanup: use single struct for freestyle globals Was shadowing local vars. --- source/blender/freestyle/intern/python/BPy_Freestyle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle/intern/python') 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); } -- cgit v1.2.3