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_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d088a7c23e6..4aebcbb0aaf 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -566,6 +566,11 @@ PropertyRNA *RNA_struct_name_property(const StructRNA *type)
return type->nameproperty;
}
+const EnumPropertyItem *RNA_struct_property_tag_defines(const StructRNA *type)
+{
+ return type->prop_tag_defines;
+}
+
PropertyRNA *RNA_struct_iterator_property(StructRNA *type)
{
return type->iteratorproperty;
@@ -947,6 +952,17 @@ int RNA_property_flag(PropertyRNA *prop)
return rna_ensure_property(prop)->flag;
}
+/**
+ * Get the tags set for \a prop as int bitfield.
+ * \note Doesn't perform any validity check on the set bits. #RNA_def_property_tags does this
+ * in debug builds (to avoid performance issues in non-debug builds), which should be
+ * the only way to set tags. Hence, at this point we assume the tag bitfield to be valid.
+ */
+int RNA_property_tags(PropertyRNA *prop)
+{
+ return rna_ensure_property(prop)->tags;
+}
+
bool RNA_property_builtin(PropertyRNA *prop)
{
return (rna_ensure_property(prop)->flag_internal & PROP_INTERN_BUILTIN) != 0;
@@ -1613,6 +1629,18 @@ int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
return -1;
}
+unsigned int RNA_enum_items_count(const EnumPropertyItem *item)
+{
+ unsigned int i = 0;
+
+ while (item->identifier) {
+ item++;
+ i++;
+ }
+
+ return i;
+}
+
bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value,
const char **identifier)
{