diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-04-20 18:20:56 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-20 18:20:56 +0300 |
commit | f2a2adc91014d20de45337ad2ca5f9307e9d4887 (patch) | |
tree | af2846b789a35c94d605008324a2194348c1c588 /source/blender | |
parent | 74023d46ced40f152f97727137f891f60a5b0846 (diff) |
RNA: bpy.context.depsgraph
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_context.c | 11 |
1 files changed, 11 insertions, 0 deletions
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"); |