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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index fce81e6967e..d93f3308b2a 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -88,12 +88,14 @@ typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr);
typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value);
typedef int (*PropEnumGetFunc)(struct PointerRNA *ptr);
typedef void (*PropEnumSetFunc)(struct PointerRNA *ptr, int value);
-typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr,
- struct PropertyRNA *prop, bool *r_free);
+typedef const EnumPropertyItem *(*PropEnumItemFunc)(
+ struct bContext *C, struct PointerRNA *ptr,
+ struct PropertyRNA *prop, bool *r_free);
typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr);
typedef StructRNA *(*PropPointerTypeFunc)(struct PointerRNA *ptr);
typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value);
typedef int (*PropPointerPollFunc)(struct PointerRNA *ptr, const PointerRNA value);
+typedef int (*PropPointerPollFuncPy)(struct PointerRNA *ptr, const PointerRNA value, const PropertyRNA *prop);
typedef void (*PropCollectionBeginFunc)(struct CollectionPropertyIterator *iter, struct PointerRNA *ptr);
typedef void (*PropCollectionNextFunc)(struct CollectionPropertyIterator *iter);
typedef void (*PropCollectionEndFunc)(struct CollectionPropertyIterator *iter);
@@ -166,6 +168,8 @@ struct PropertyRNA {
short flag_parameter;
/* Internal ("private") flags. */
short flag_internal;
+ /* The subset of StructRNA.prop_tag_defines values that applies to this property. */
+ short tags;
/* user readable name */
const char *name;
@@ -315,7 +319,7 @@ typedef struct EnumPropertyRNA {
PropEnumSetFuncEx set_ex;
void *py_data; /* store py callback here */
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int totitem;
int defaultvalue;
@@ -363,6 +367,9 @@ struct StructRNA {
/* various options */
int flag;
+ /* Each StructRNA type can define own tags which properties can set
+ * (PropertyRNA.tags) for changed behavior based on struct-type. */
+ const EnumPropertyItem *prop_tag_defines;
/* user readable name */
const char *name;
@@ -412,6 +419,11 @@ struct StructRNA {
struct BlenderRNA {
ListBase structs;
+ /* A map of structs: {StructRNA.identifier -> StructRNA}
+ * These are ensured to have unique names (with STRUCT_PUBLIC_NAMESPACE enabled). */
+ struct GHash *structs_map;
+ /* Needed because types with an empty identifier aren't included in 'structs_map'. */
+ unsigned int structs_len;
};
#define CONTAINER_RNA_ID(cont) (*(const char **)(((ContainerRNA *)(cont))+1))