diff options
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder.cc')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc index e7111bd5202..3365cdda53d 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder.cc @@ -80,7 +80,7 @@ void visibility_animated_check_cb(ID * /*id*/, FCurve *fcu, void *user_data) } } -bool is_object_visibility_animated(Depsgraph *graph, Object *object) +bool is_object_visibility_animated(const Depsgraph *graph, Object *object) { AnimData* anim_data = BKE_animdata_from_id(&object->id); if (anim_data == NULL) { @@ -95,24 +95,29 @@ bool is_object_visibility_animated(Depsgraph *graph, Object *object) } // namespace -DepsgraphBuilder::DepsgraphBuilder(Main *bmain, Depsgraph *graph) - : bmain_(bmain), - graph_(graph) { -} - -bool DepsgraphBuilder::need_pull_base_into_graph(struct Base *base) +bool deg_check_base_available_for_build(const Depsgraph *graph, Base *base) { - const int base_flag = (graph_->mode == DAG_EVAL_VIEWPORT) ? + const int base_flag = (graph->mode == DAG_EVAL_VIEWPORT) ? BASE_ENABLED_VIEWPORT : BASE_ENABLED_RENDER; if (base->flag & base_flag) { return true; } - if (is_object_visibility_animated(graph_, base->object)) { + if (is_object_visibility_animated(graph, base->object)) { return true; } return false; } +DepsgraphBuilder::DepsgraphBuilder(Main *bmain, Depsgraph *graph) + : bmain_(bmain), + graph_(graph) { +} + +bool DepsgraphBuilder::need_pull_base_into_graph(struct Base *base) +{ + return deg_check_base_available_for_build(graph_, base); +} + /******************************************************************************* * Builder finalizer. */ |