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:
authorJulian Eisel <eiseljulian@gmail.com>2017-11-23 15:58:05 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-11-23 15:58:05 +0300
commit60cbdb01527e08f9036eb3d577da1c44a9ce30c7 (patch)
tree555662f7568a87840d5cd5e57ff2d4f90f884977 /source/blender/windowmanager/WM_types.h
parent23d148ecaf923a490c3dd4a22d6dd96ea7cb9654 (diff)
Support tagging operator properties as 'advanced'
This will later be used to show advanced operator properties separate from basic (as in non-advanced) ones in the UI. Tagging a single operator property in C should be done via `WM_operatortype_prop_tag()`. It does additional checks for type safety that `RNA_def_property_tags()` doesn't do. To avoid having to tag each advanced property individually, multiple ones can be tagged by wrapping them into `WM_operatortype_props_advanced_bein()` and `WM_operatortype_props_advanced_end()` calls. It's also possible to only call `_begin()`, all properties added after this will get tagged then. In most cases this last approach should be sufficient. Example of Python usage: `my_float = bpy.props.FloatProperty(name="Some Float", tags={'ADVANCED'})`
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index f48a2cef1e6..1717a94678b 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -164,6 +164,12 @@ enum {
WM_OP_EXEC_SCREEN
};
+/* property tags for RNA_OperatorProperties */
+typedef enum eOperatorPropTags {
+ OP_PROP_TAG_ADVANCED = (1 << 0),
+} eOperatorPropTags;
+#define OP_PROP_TAG_ADVANCED ((eOperatorPropTags)OP_PROP_TAG_ADVANCED)
+
/* ************** wmKeyMap ************************ */
/* modifier */