diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-22 15:52:39 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 12:48:23 +0300 |
commit | 3abe8b3292cf7a50a9200b95401993384df24d9a (patch) | |
tree | 6c7a853710f1a4264dd1bb4d7b9bf14f44b75f33 /source/blender/depsgraph/intern/depsgraph_query.cc | |
parent | fb7d23bdb2a5c0ed00067045e4acdf6593258b52 (diff) |
Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.
* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started
Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.
Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.
Reviewers: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D2927
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_query.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index ee75b9b348b..9740e93ffec 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -91,16 +91,16 @@ Scene *DEG_get_evaluated_scene(Depsgraph *graph) return reinterpret_cast<Scene *>(deg_graph->get_cow_id(&scene_orig->id)); } -SceneLayer *DEG_get_evaluated_scene_layer(Depsgraph *graph) +ViewLayer *DEG_get_evaluated_view_layer(Depsgraph *graph) { DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph); Scene *scene_cow = DEG_get_evaluated_scene(graph); - SceneLayer *scene_layer_orig = deg_graph->scene_layer; - SceneLayer *scene_layer_cow = - (SceneLayer *)BLI_findstring(&scene_cow->render_layers, - scene_layer_orig->name, - offsetof(SceneLayer, name)); - return scene_layer_cow; + ViewLayer *view_layer_orig = deg_graph->view_layer; + ViewLayer *view_layer_cow = + (ViewLayer *)BLI_findstring(&scene_cow->view_layers, + view_layer_orig->name, + offsetof(ViewLayer, name)); + return view_layer_cow; } Object *DEG_get_evaluated_object(Depsgraph *depsgraph, Object *object) @@ -132,18 +132,18 @@ ID *DEG_get_evaluated_id(struct Depsgraph *depsgraph, ID *id) * and instead we should have a tag to the objects that were not directly part of the depsgraph). * * That means that the object is not in a collection but it's part of depsgraph, or the object is simply - * not in the current SceneLayer - Depsgraph at the moment includes all the SceneLayer in the Scene. + * not in the current ViewLayer - Depsgraph at the moment includes all the ViewLayer in the Scene. */ static bool deg_flush_base_flags_and_settings( DEGObjectsIteratorData *data, Object *ob_dst, Object *ob_src, const bool is_dupli) { Base *base; Depsgraph *graph = data->graph; - SceneLayer *scene_layer = data->eval_ctx.scene_layer; + ViewLayer *view_layer = data->eval_ctx.view_layer; int flag = is_dupli ? BASE_FROMDUPLI : 0; - /* First attempt, see if object is in the current SceneLayer. */ - base = (Base *)BLI_findptr(&scene_layer->object_bases, ob_src, offsetof(Base, object)); + /* First attempt, see if object is in the current ViewLayer. */ + base = (Base *)BLI_findptr(&view_layer->object_bases, ob_src, offsetof(Base, object)); /* Next attempt, see if object is in one of the sets. */ if (base == NULL) { @@ -151,8 +151,8 @@ static bool deg_flush_base_flags_and_settings( scene_iter = scene; while ((scene_iter = (scene_iter)->set)) { - SceneLayer *scene_layer_set = BKE_scene_layer_from_scene_get(scene_iter); - base = (Base *)BLI_findptr(&scene_layer_set->object_bases, ob_src, offsetof(Base, object)); + ViewLayer *view_layer_set = BKE_view_layer_from_scene_get(scene_iter); + base = (Base *)BLI_findptr(&view_layer_set->object_bases, ob_src, offsetof(Base, object)); if (base != NULL) { flag |= BASE_FROM_SET; flag &= ~(BASE_SELECTED | BASE_SELECTABLED); @@ -272,7 +272,7 @@ void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data /* TODO(sergey): What evaluation type we want here? */ DEG_evaluation_context_init(&data->eval_ctx, DAG_EVAL_RENDER); - data->eval_ctx.scene_layer = DEG_get_evaluated_scene_layer(depsgraph); + data->eval_ctx.view_layer = DEG_get_evaluated_view_layer(depsgraph); iter->data = data; data->dupli_parent = NULL; |