[Bf-blender-cvs] [4493d0d085b] blender2.8: Object RNA: expose base_flag settings:
Dalai Felinto
noreply at git.blender.org
Fri Nov 24 14:44:24 CET 2017
Commit: 4493d0d085b0ba37e069d1129004d54e98f31231
Author: Dalai Felinto
Date: Fri Nov 24 11:24:37 2017 -0200
Branches: blender2.8
https://developer.blender.org/rB4493d0d085b0ba37e069d1129004d54e98f31231
Object RNA: expose base_flag settings:
object.is_from_set
object.is_from_duplicator
We need them for the unittests, and users can benefit from it as well.
Note, this only makes sense when reading objects from depsgraph:
`bpy.context.depsgraph.objects`
===================================================================
M source/blender/makesrna/intern/rna_object.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 5effcc39ee2..37957f55f5c 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -3019,6 +3019,17 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Level of Detail Levels", "A collection of detail levels to automatically switch between");
RNA_def_property_update(prop, NC_OBJECT | ND_LOD, NULL);
+ /* Base Settings */
+ prop = RNA_def_property(srna, "is_from_duplicator", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "base_flag", BASE_FROMDUPLI);
+ RNA_def_property_ui_text(prop, "Base from Duplicator", "Object comes from a duplicator");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop = RNA_def_property(srna, "is_from_set", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "base_flag", BASE_FROM_SET);
+ RNA_def_property_ui_text(prop, "Base from Set", "Object comes from a background set");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
RNA_api_object(srna);
}
More information about the Bf-blender-cvs
mailing list