[Bf-blender-cvs] [4669dfe2cc2] master: Expose 'is embedded data' ID flag to RNA.

Bastien Montagne noreply at git.blender.org
Thu Mar 12 18:08:17 CET 2020


Commit: 4669dfe2cc2441e55bbd432c690047c4828d1c39
Author: Bastien Montagne
Date:   Thu Mar 12 18:04:33 2020 +0100
Branches: master
https://developer.blender.org/rB4669dfe2cc2441e55bbd432c690047c4828d1c39

Expose 'is embedded data' ID flag to RNA.

Relevant currently for root node trees and master collections.

===================================================================

M	source/blender/makesrna/intern/rna_ID.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 5c824dc6e93..bd5c7e755d6 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -1468,6 +1468,15 @@ 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, "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);
+  RNA_def_property_ui_text(
+      prop,
+      "Embedded Data",
+      "This data-block is not an independant one, but is actually a sub-data of another ID "
+      "(typical example: root node trees or master collections)");
+
   prop = RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "tag", LIB_TAG_DOIT);
   RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);



More information about the Bf-blender-cvs mailing list