From 4669dfe2cc2441e55bbd432c690047c4828d1c39 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 12 Mar 2020 18:04:33 +0100 Subject: Expose 'is embedded data' ID flag to RNA. Relevant currently for root node trees and master collections. --- source/blender/makesrna/intern/rna_ID.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- cgit v1.2.3