[Bf-blender-cvs] [f2a2adc9101] blender2.8: RNA: bpy.context.depsgraph
Dalai Felinto
noreply at git.blender.org
Thu Apr 20 17:21:45 CEST 2017
Commit: f2a2adc91014d20de45337ad2ca5f9307e9d4887
Author: Dalai Felinto
Date: Thu Apr 20 17:20:56 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBf2a2adc91014d20de45337ad2ca5f9307e9d4887
RNA: bpy.context.depsgraph
===================================================================
M source/blender/makesrna/intern/rna_context.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index 27e88f592ab..360bd5691cd 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -101,6 +101,12 @@ static PointerRNA rna_Context_main_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_BlendData, CTX_data_main(C));
}
+static PointerRNA rna_Context_depsgraph_get(PointerRNA *ptr)
+{
+ bContext *C = (bContext *)ptr->data;
+ return rna_pointer_inherit_refine(ptr, &RNA_Depsgraph, CTX_data_depsgraph(C));
+}
+
static PointerRNA rna_Context_scene_get(PointerRNA *ptr)
{
bContext *C = (bContext *)ptr->data;
@@ -218,6 +224,11 @@ void RNA_def_context(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "BlendData");
RNA_def_property_pointer_funcs(prop, "rna_Context_main_get", NULL, NULL, NULL);
+ prop = RNA_def_property(srna, "depsgraph", PROP_POINTER, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_struct_type(prop, "Depsgraph");
+ RNA_def_property_pointer_funcs(prop, "rna_Context_depsgraph_get", NULL, NULL, NULL);
+
prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Scene");
More information about the Bf-blender-cvs
mailing list