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>2021-04-16 08:04:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-16 08:04:37 +0300
commit43b08d05786f83797d04e5d0f777ae9b888807f9 (patch)
tree71367932597d02756dc9318fe98acb7547d34961 /source/blender/makesrna/RNA_types.h
parentdc8a43c8755a5e880ff40765f878bf002a38096a (diff)
RNA: add STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID flag
This flag is needed so PointerRNA structs that aren't part of the current context can access enum values without inspecting the context. This is needed for keymap access, so the keymap UI and keymap export doesn't depend on the current context.
Diffstat (limited to 'source/blender/makesrna/RNA_types.h')
-rw-r--r--source/blender/makesrna/RNA_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 78192f937e6..6cd3678017e 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -636,6 +636,12 @@ typedef enum StructFlag {
STRUCT_PUBLIC_NAMESPACE = (1 << 9),
/** All subtypes are added too. */
STRUCT_PUBLIC_NAMESPACE_INHERIT = (1 << 10),
+ /**
+ * When the #PointerRNA.owner_id is NULL, this signifies the property should be accessed
+ * without any context (the key-map UI and import/export for example).
+ * So accessing the property should not read from the current context to derive values/limits.
+ */
+ STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID = (1 << 11),
} StructFlag;
typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function);