diff options
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_query.h | 3 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query.cc | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index e0166a13d69..7eb5f1ccec1 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -55,6 +55,9 @@ struct Scene *DEG_get_input_scene(const Depsgraph *graph); /* Get view layer that depsgraph was built for. */ struct ViewLayer *DEG_get_input_view_layer(const Depsgraph *graph); +/* Get bmain that depsgraph was built for. */ +struct Main *DEG_get_bmain(const Depsgraph *graph); + /* Get evaluation mode that depsgraph was built for. */ eEvaluationMode DEG_get_mode(const Depsgraph *graph); diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index 0b6014c18f1..fc9ed9a6ab9 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -61,6 +61,12 @@ struct ViewLayer *DEG_get_input_view_layer(const Depsgraph *graph) return deg_graph->view_layer; } +struct Main *DEG_get_bmain(const Depsgraph *graph) +{ + const deg::Depsgraph *deg_graph = reinterpret_cast<const deg::Depsgraph *>(graph); + return deg_graph->bmain; +} + eEvaluationMode DEG_get_mode(const Depsgraph *graph) { const deg::Depsgraph *deg_graph = reinterpret_cast<const deg::Depsgraph *>(graph); |