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>2010-12-07 07:12:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-07 07:12:15 +0300
commitd624d1cbddf9ee51108e7eb89a6cfd7044fd57c0 (patch)
treed93701004cd4a3bdfabe8bd5f40b5e90eead91d1 /source/blender/makesrna/RNA_types.h
parent48614fbc2af024d613845b03d632e544f8127261 (diff)
pass along the context to extension functions, this was already being done in all cases except for the render engine.
this allows python to NULL its internal context while scripts are not running.
Diffstat (limited to 'source/blender/makesrna/RNA_types.h')
-rw-r--r--source/blender/makesrna/RNA_types.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 11105ad1451..b3077f01baf 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -311,9 +311,9 @@ typedef enum StructFlag {
} StructFlag;
typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function);
-typedef int (*StructCallbackFunc)(struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list);
+typedef int (*StructCallbackFunc)(struct bContext *C, struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list);
typedef void (*StructFreeFunc)(void *data);
-typedef struct StructRNA *(*StructRegisterFunc)(const struct bContext *C, struct ReportList *reports, void *data,
+typedef struct StructRNA *(*StructRegisterFunc)(struct bContext *C, struct ReportList *reports, void *data,
const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free);
typedef void (*StructUnregisterFunc)(const struct bContext *C, struct StructRNA *type);
@@ -333,9 +333,9 @@ typedef struct BlenderRNA BlenderRNA;
typedef struct ExtensionRNA {
void *data;
StructRNA *srna;
-
- int (*call)(PointerRNA *, FunctionRNA *, ParameterList *);
- void (*free)(void *data);
+ StructCallbackFunc call;
+ StructFreeFunc free;
+
} ExtensionRNA;
/* fake struct definitions, needed otherwise collections end up owning the C