Freestyle: Fix for a crash during access to Scene properties from within Python.
This commit is contained in:
@@ -60,6 +60,7 @@ extern "C" {
|
|||||||
|
|
||||||
#include "FRS_freestyle.h"
|
#include "FRS_freestyle.h"
|
||||||
#include "RNA_access.h"
|
#include "RNA_access.h"
|
||||||
|
#include "DNA_scene_types.h"
|
||||||
#include "bpy_rna.h" /* pyrna_struct_CreatePyObject() */
|
#include "bpy_rna.h" /* pyrna_struct_CreatePyObject() */
|
||||||
|
|
||||||
static char Freestyle_getCurrentScene___doc__[] =
|
static char Freestyle_getCurrentScene___doc__[] =
|
||||||
@@ -77,7 +78,7 @@ static PyObject *Freestyle_getCurrentScene(PyObject *self)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
PointerRNA ptr_scene;
|
PointerRNA ptr_scene;
|
||||||
RNA_pointer_create(NULL, &RNA_Scene, freestyle_scene, &ptr_scene);
|
RNA_pointer_create(&freestyle_scene->id, &RNA_Scene, freestyle_scene, &ptr_scene);
|
||||||
return pyrna_struct_CreatePyObject(&ptr_scene);
|
return pyrna_struct_CreatePyObject(&ptr_scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user