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:
authorBastien Montagne <bastien@blender.org>2022-05-02 17:06:42 +0300
committerBastien Montagne <bastien@blender.org>2022-05-02 17:06:42 +0300
commitb1e0be0d2553742fcceda9cfe29ebb70f26b06a1 (patch)
tree856a9779617db35723994317e6c86f9e31470f6f /source/blender/makesrna
parentab5d52a6db559b78ffaca71c7963e48371c786ff (diff)
parent5188c14718c56e4d088d3c5bb3ce3ed9ed8b7bdc (diff)
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index e2ce1f23a33..b65e08311fe 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -586,6 +586,18 @@ void rna_ID_fake_user_set(PointerRNA *ptr, bool value)
}
}
+void rna_ID_extra_user_set(PointerRNA *ptr, bool value)
+{
+ ID *id = (ID *)ptr->data;
+
+ if (value) {
+ id_us_ensure_real(id);
+ }
+ else {
+ id_us_clear_real(id);
+ }
+}
+
IDProperty **rna_PropertyGroup_idprops(PointerRNA *ptr)
{
return (IDProperty **)&ptr->data;
@@ -1959,6 +1971,14 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_property_ui_icon(prop, ICON_FAKE_USER_OFF, true);
RNA_def_property_boolean_funcs(prop, NULL, "rna_ID_fake_user_set");
+ prop = RNA_def_property(srna, "use_extra_user", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "tag", LIB_TAG_EXTRAUSER);
+ RNA_def_property_ui_text(
+ prop,
+ "Extra User",
+ "Indicates wether an extra user is set or not (mainly for internal/debug usages)");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_ID_extra_user_set");
+
prop = RNA_def_property(srna, "is_embedded_data", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_EMBEDDED_DATA);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);