diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-11-23 15:58:05 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-11-23 15:58:05 +0300 |
commit | 60cbdb01527e08f9036eb3d577da1c44a9ce30c7 (patch) | |
tree | 555662f7568a87840d5cd5e57ff2d4f90f884977 /source/blender/makesrna/RNA_enum_types.h | |
parent | 23d148ecaf923a490c3dd4a22d6dd96ea7cb9654 (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/makesrna/RNA_enum_types.h')
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index c8995e7a2ad..155c82bbbc3 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -108,6 +108,7 @@ extern const EnumPropertyItem rna_enum_motionpath_bake_location_items[]; extern const EnumPropertyItem rna_enum_event_value_items[]; extern const EnumPropertyItem rna_enum_event_type_items[]; extern const EnumPropertyItem rna_enum_operator_return_items[]; +extern const EnumPropertyItem rna_enum_operator_property_tags[]; extern const EnumPropertyItem rna_enum_brush_sculpt_tool_items[]; extern const EnumPropertyItem rna_enum_brush_vertex_tool_items[]; |