Rename any instance of scene layer or render layer in code with view layer
authorDalai Felinto <dfelinto@gmail.com>
Wed, 22 Nov 2017 12:52:39 +0000 (10:52 -0200)
committerDalai Felinto <dfelinto@gmail.com>
Thu, 23 Nov 2017 09:48:23 +0000 (07:48 -0200)
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

421 files changed:
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_curves.cpp
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_session.h
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/blender/blender_texture.cpp
intern/cycles/blender/blender_texture.h
intern/cycles/blender/blender_util.h
release/scripts/freestyle/modules/parameter_editor.py
release/scripts/modules/bpy_extras/object_utils.py
release/scripts/presets/keyconfig/3dsmax.py
release/scripts/presets/keyconfig/maya.py
release/scripts/startup/bl_operators/clip.py
release/scripts/startup/bl_operators/freestyle.py
release/scripts/startup/bl_ui/__init__.py
release/scripts/startup/bl_ui/properties_data_workspace.py
release/scripts/startup/bl_ui/properties_freestyle.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_view_layer.py [moved from release/scripts/startup/bl_ui/properties_render_layer.py with 84% similarity]
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_node.py
source/blender/alembic/intern/abc_exporter.cc
source/blender/alembic/intern/abc_exporter.h
source/blender/alembic/intern/alembic_capi.cc
source/blender/blenkernel/BKE_blender_version.h
source/blender/blenkernel/BKE_camera.h
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/BKE_layer.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_pointcache.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_workspace.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/blender_copybuffer.c
source/blender/blenkernel/intern/blendfile.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/collection.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/layer.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/linestyle.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_dupli.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenkernel/intern/workspace.c
source/blender/blenloader/BLO_readfile.h
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_280.c
source/blender/blenloader/intern/versioning_defaults.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/DocumentImporter.cpp
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/collada/collada_utils.cpp
source/blender/compositor/nodes/COM_RenderLayersNode.cpp
source/blender/compositor/operations/COM_RenderLayersProg.cpp
source/blender/depsgraph/CMakeLists.txt
source/blender/depsgraph/DEG_depsgraph.h
source/blender/depsgraph/DEG_depsgraph_build.h
source/blender/depsgraph/DEG_depsgraph_debug.h
source/blender/depsgraph/DEG_depsgraph_query.h
source/blender/depsgraph/intern/builder/deg_builder_nodes.h
source/blender/depsgraph/intern/builder/deg_builder_nodes_layer_collection.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc [moved from source/blender/depsgraph/intern/builder/deg_builder_nodes_scene_layer.cc with 88% similarity]
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/depsgraph/intern/builder/deg_builder_relations_layer_collection.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc [moved from source/blender/depsgraph/intern/builder/deg_builder_relations_scene_layer.cc with 89% similarity]
source/blender/depsgraph/intern/depsgraph.cc
source/blender/depsgraph/intern/depsgraph.h
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/depsgraph/intern/depsgraph_debug.cc
source/blender/depsgraph/intern/depsgraph_eval.cc
source/blender/depsgraph/intern/depsgraph_query.cc
source/blender/depsgraph/intern/depsgraph_tag.cc
source/blender/depsgraph/intern/depsgraph_type_defines.cc
source/blender/depsgraph/intern/depsgraph_types.h
source/blender/depsgraph/intern/eval/deg_eval.cc
source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
source/blender/draw/DRW_engine.h
source/blender/draw/engines/clay/clay_engine.c
source/blender/draw/engines/eevee/eevee_bloom.c
source/blender/draw/engines/eevee/eevee_data.c
source/blender/draw/engines/eevee/eevee_depth_of_field.c
source/blender/draw/engines/eevee/eevee_effects.c
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/draw/engines/eevee/eevee_lightprobes.c
source/blender/draw/engines/eevee/eevee_lights.c
source/blender/draw/engines/eevee/eevee_materials.c
source/blender/draw/engines/eevee/eevee_motion_blur.c
source/blender/draw/engines/eevee/eevee_occlusion.c
source/blender/draw/engines/eevee/eevee_private.h
source/blender/draw/engines/eevee/eevee_screen_raytrace.c
source/blender/draw/engines/eevee/eevee_subsurface.c
source/blender/draw/engines/eevee/eevee_temporal_sampling.c
source/blender/draw/engines/eevee/eevee_volumes.c
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_armature.c
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_common.h
source/blender/draw/intern/draw_manager.c
source/blender/draw/intern/draw_view.c
source/blender/draw/modes/object_mode.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/armature/armature_relations.c
source/blender/editors/armature/armature_select.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/pose_select.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editcurve_paint.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_convert.c
source/blender/editors/gpencil/gpencil_utils.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_gpencil.h
source/blender/editors/include/ED_image.h
source/blender/editors/include/ED_info.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_particle.h
source/blender/editors/include/ED_scene.h
source/blender/editors/include/ED_screen.h
source/blender/editors/include/ED_transform_snap_object_context.h
source/blender/editors/include/ED_uvedit.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/io/io_collada.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_group.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/physics/rigidbody_constraint.c
source/blender/editors/render/render_intern.h
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_ops.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/render/render_update.c
source/blender/editors/scene/scene_edit.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/workspace_edit.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_clip/tracking_ops_orient.c
source/blender/editors/space_image/image_edit.c
source/blender/editors/space_image/image_intern.h
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_outliner/outliner_collections.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_draw_legacy.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_manipulator_camera.c
source/blender/editors/space_view3d/view3d_manipulator_ruler.c
source/blender/editors/space_view3d/view3d_ruler.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/space_view3d/view3d_walk.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/transform/transform_snap_object.c
source/blender/editors/util/ed_util.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/freestyle/CMakeLists.txt
source/blender/freestyle/FRS_freestyle.h
source/blender/freestyle/intern/application/Controller.cpp
source/blender/freestyle/intern/application/Controller.h
source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
source/blender/freestyle/intern/scene_graph/NodeViewLayer.cpp [moved from source/blender/freestyle/intern/scene_graph/NodeSceneLayer.cpp with 84% similarity]
source/blender/freestyle/intern/scene_graph/NodeViewLayer.h [moved from source/blender/freestyle/intern/scene_graph/NodeSceneLayer.h with 65% similarity]
source/blender/freestyle/intern/scene_graph/SceneHash.cpp
source/blender/freestyle/intern/scene_graph/SceneHash.h
source/blender/freestyle/intern/scene_graph/SceneVisitor.h
source/blender/gpu/GPU_draw.h
source/blender/gpu/intern/gpu_draw.c
source/blender/makesdna/DNA_fileglobal_types.h
source/blender/makesdna/DNA_layer_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_workspace_types.h
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_context.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_layer.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_workspace.c
source/blender/nodes/NOD_composite.h
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/texture/node_texture_tree.c
source/blender/python/intern/gpu_offscreen.c
source/blender/render/extern/include/RE_engine.h
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/extern/include/RE_render_ext.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/include/rendercore.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/render_result.c
source/blender/render/intern/source/rendercore.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_files_link.c
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/creator_args.c
tests/gtests/alembic/abc_export_test.cc
tests/python/CMakeLists.txt
tests/python/render_layer/CMakeLists.txt [deleted file]
tests/python/view_layer/CMakeLists.txt [new file with mode: 0644]
tests/python/view_layer/test_active_collection.py [moved from tests/python/render_layer/test_active_collection.py with 94% similarity]
tests/python/view_layer/test_collection_rename.py [moved from tests/python/render_layer/test_collection_rename.py with 97% similarity]
tests/python/view_layer/test_evaluation_render_settings_a.py [moved from tests/python/render_layer/test_evaluation_render_settings_a.py with 92% similarity]
tests/python/view_layer/test_evaluation_render_settings_b.py [moved from tests/python/render_layer/test_evaluation_render_settings_b.py with 93% similarity]
tests/python/view_layer/test_evaluation_render_settings_c.py [moved from tests/python/render_layer/test_evaluation_render_settings_c.py with 92% similarity]
tests/python/view_layer/test_evaluation_render_settings_d.py [moved from tests/python/render_layer/test_evaluation_render_settings_d.py with 92% similarity]
tests/python/view_layer/test_evaluation_render_settings_e.py [moved from tests/python/render_layer/test_evaluation_render_settings_e.py with 93% similarity]
tests/python/view_layer/test_evaluation_render_settings_f.py [moved from tests/python/render_layer/test_evaluation_render_settings_f.py with 93% similarity]
tests/python/view_layer/test_evaluation_render_settings_g.py [moved from tests/python/render_layer/test_evaluation_render_settings_g.py with 93% similarity]
tests/python/view_layer/test_evaluation_render_settings_h.py [moved from tests/python/render_layer/test_evaluation_render_settings_h.py with 93% similarity]
tests/python/view_layer/test_evaluation_render_settings_i.py [moved from tests/python/render_layer/test_evaluation_render_settings_i.py with 93% similarity]
tests/python/view_layer/test_evaluation_selectability_a.py [moved from tests/python/render_layer/test_evaluation_selectability_a.py with 88% similarity]
tests/python/view_layer/test_evaluation_selectability_b.py [moved from tests/python/render_layer/test_evaluation_selectability_b.py with 88% similarity]
tests/python/view_layer/test_evaluation_selectability_c.py [moved from tests/python/render_layer/test_evaluation_selectability_c.py with 88% similarity]
tests/python/view_layer/test_evaluation_selectability_d.py [moved from tests/python/render_layer/test_evaluation_selectability_d.py with 88% similarity]
tests/python/view_layer/test_evaluation_selectability_e.py [moved from tests/python/render_layer/test_evaluation_selectability_e.py with 88% similarity]
tests/python/view_layer/test_evaluation_selectability_f.py [moved from tests/python/render_layer/test_evaluation_selectability_f.py with 88% similarity]
tests/python/view_layer/test_evaluation_visibility_a.py [moved from tests/python/render_layer/test_evaluation_visibility_a.py with 88% similarity]
tests/python/view_layer/test_evaluation_visibility_b.py [moved from tests/python/render_layer/test_evaluation_visibility_b.py with 88% similarity]
tests/python/view_layer/test_evaluation_visibility_c.py [moved from tests/python/render_layer/test_evaluation_visibility_c.py with 88% similarity]
tests/python/view_layer/test_evaluation_visibility_d.py [moved from tests/python/render_layer/test_evaluation_visibility_d.py with 87% similarity]
tests/python/view_layer/test_evaluation_visibility_e.py [moved from tests/python/render_layer/test_evaluation_visibility_e.py with 88% similarity]
tests/python/view_layer/test_evaluation_visibility_f.py [moved from tests/python/render_layer/test_evaluation_visibility_f.py with 88% similarity]
tests/python/view_layer/test_evaluation_visibility_g.py [moved from tests/python/render_layer/test_evaluation_visibility_g.py with 91% similarity]
tests/python/view_layer/test_evaluation_visibility_h.py [moved from tests/python/render_layer/test_evaluation_visibility_h.py with 91% similarity]
tests/python/view_layer/test_evaluation_visibility_i.py [moved from tests/python/render_layer/test_evaluation_visibility_i.py with 91% similarity]
tests/python/view_layer/test_layer_linking.py [moved from tests/python/render_layer/test_layer_linking.py with 96% similarity]
tests/python/view_layer/test_layer_syncing.py [moved from tests/python/render_layer/test_layer_syncing.py with 98% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_a.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_a.py with 97% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_b.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_b.py with 97% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_c.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_c.py with 97% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_d.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_d.py with 97% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_e.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_e.py with 97% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_f.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_f.py with 98% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_g.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_g.py with 98% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_h.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_h.py with 98% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_i.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_i.py with 98% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_j.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_j.py with 98% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_k.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_k.py with 97% similarity]
tests/python/view_layer/test_move_above_below_layer_collection_l.py [moved from tests/python/render_layer/test_move_above_below_layer_collection_l.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_a.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_a.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_b.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_b.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_c.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_c.py with 97% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_d.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_d.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_e.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_e.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_f.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_f.py with 97% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_g.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_g.py with 97% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_h.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_h.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_i.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_i.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_a.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_a.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_b.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_b.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_c.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_c.py with 97% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_d.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_d.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_e.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_e.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_f.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_f.py with 97% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_g.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_g.py with 97% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_h.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_h.py with 98% similarity]
tests/python/view_layer/test_move_above_below_scene_collection_sync_i.py [moved from tests/python/render_layer/test_move_above_below_scene_collection_sync_i.py with 98% similarity]
tests/python/view_layer/test_move_into_layer_collection_a.py [moved from tests/python/render_layer/test_move_into_layer_collection_a.py with 98% similarity]
tests/python/view_layer/test_move_into_layer_collection_b.py [moved from tests/python/render_layer/test_move_into_layer_collection_b.py with 97% similarity]
tests/python/view_layer/test_move_into_layer_collection_c.py [moved from tests/python/render_layer/test_move_into_layer_collection_c.py with 97% similarity]
tests/python/view_layer/test_move_into_layer_collection_d.py [moved from tests/python/render_layer/test_move_into_layer_collection_d.py with 97% similarity]
tests/python/view_layer/test_move_into_layer_collection_e.py [moved from tests/python/render_layer/test_move_into_layer_collection_e.py with 97% similarity]
tests/python/view_layer/test_move_into_layer_collection_f.py [moved from tests/python/render_layer/test_move_into_layer_collection_f.py with 98% similarity]
tests/python/view_layer/test_move_into_layer_collection_g.py [moved from tests/python/render_layer/test_move_into_layer_collection_g.py with 98% similarity]
tests/python/view_layer/test_move_into_layer_collection_h.py [moved from tests/python/render_layer/test_move_into_layer_collection_h.py with 98% similarity]
tests/python/view_layer/test_move_into_layer_collection_i.py [moved from tests/python/render_layer/test_move_into_layer_collection_i.py with 97% similarity]
tests/python/view_layer/test_move_into_layer_collection_j.py [moved from tests/python/render_layer/test_move_into_layer_collection_j.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_a.py [moved from tests/python/render_layer/test_move_into_scene_collection_a.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_b.py [moved from tests/python/render_layer/test_move_into_scene_collection_b.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_c.py [moved from tests/python/render_layer/test_move_into_scene_collection_c.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_d.py [moved from tests/python/render_layer/test_move_into_scene_collection_d.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_e.py [moved from tests/python/render_layer/test_move_into_scene_collection_e.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_f.py [moved from tests/python/render_layer/test_move_into_scene_collection_f.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_g.py [moved from tests/python/render_layer/test_move_into_scene_collection_g.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_h.py [moved from tests/python/render_layer/test_move_into_scene_collection_h.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_i.py [moved from tests/python/render_layer/test_move_into_scene_collection_i.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_j.py [moved from tests/python/render_layer/test_move_into_scene_collection_j.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_k.py [moved from tests/python/render_layer/test_move_into_scene_collection_k.py with 96% similarity]
tests/python/view_layer/test_move_into_scene_collection_l.py [moved from tests/python/render_layer/test_move_into_scene_collection_l.py with 96% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_a.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_a.py with 96% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_b.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_b.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_c.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_c.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_d.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_d.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_e.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_e.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_f.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_f.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_g.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_g.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_h.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_h.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_i.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_i.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_j.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_j.py with 97% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_k.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_k.py with 96% similarity]
tests/python/view_layer/test_move_into_scene_collection_sync_l.py [moved from tests/python/render_layer/test_move_into_scene_collection_sync_l.py with 96% similarity]
tests/python/view_layer/test_object_add_cylinder.py [moved from tests/python/render_layer/test_object_add_cylinder.py with 93% similarity]
tests/python/view_layer/test_object_add_empty.py [moved from tests/python/render_layer/test_object_add_empty.py with 93% similarity]
tests/python/view_layer/test_object_add_no_collection_cylinder.py [moved from tests/python/render_layer/test_object_add_no_collection_cylinder.py with 92% similarity]
tests/python/view_layer/test_object_add_no_collection_empty.py [moved from tests/python/render_layer/test_object_add_no_collection_empty.py with 92% similarity]
tests/python/view_layer/test_object_add_no_collection_torus.py [moved from tests/python/render_layer/test_object_add_no_collection_torus.py with 92% similarity]
tests/python/view_layer/test_object_add_torus.py [moved from tests/python/render_layer/test_object_add_torus.py with 93% similarity]
tests/python/view_layer/test_object_copy.py [moved from tests/python/render_layer/test_object_copy.py with 90% similarity]
tests/python/view_layer/test_object_delete_a.py [moved from tests/python/render_layer/test_object_delete_a.py with 92% similarity]
tests/python/view_layer/test_object_delete_b.py [moved from tests/python/render_layer/test_object_delete_b.py with 91% similarity]
tests/python/view_layer/test_object_link_a.py [moved from tests/python/render_layer/test_object_link_a.py with 92% similarity]
tests/python/view_layer/test_object_link_b.py [moved from tests/python/render_layer/test_object_link_b.py with 77% similarity]
tests/python/view_layer/test_object_link_c.py [moved from tests/python/render_layer/test_object_link_c.py with 92% similarity]
tests/python/view_layer/test_operator_context.py [moved from tests/python/render_layer/test_operator_context.py with 74% similarity]
tests/python/view_layer/test_scene_copy_a.py [moved from tests/python/render_layer/test_scene_copy_a.py with 93% similarity]
tests/python/view_layer/test_scene_copy_b.py [moved from tests/python/render_layer/test_scene_copy_b.py with 93% similarity]
tests/python/view_layer/test_scene_copy_c.py [moved from tests/python/render_layer/test_scene_copy_c.py with 93% similarity]
tests/python/view_layer/test_scene_copy_d.py [moved from tests/python/render_layer/test_scene_copy_d.py with 93% similarity]
tests/python/view_layer/test_scene_copy_e.py [moved from tests/python/render_layer/test_scene_copy_e.py with 88% similarity]
tests/python/view_layer/test_scene_copy_f.py [moved from tests/python/render_layer/test_scene_copy_f.py with 92% similarity]
tests/python/view_layer/test_scene_delete.py [moved from tests/python/render_layer/test_scene_delete.py with 93% similarity]
tests/python/view_layer/test_scene_write_read.py [moved from tests/python/render_layer/test_scene_write_read.py with 98% similarity]
tests/python/view_layer/view_layer_common.py [moved from tests/python/render_layer/render_layer_common.py with 94% similarity]

index aeeabe001e673728ef74828021fd2845c8d887ed..3ce8852abc2868978d481022b7754d8fd647d79b 100644 (file)
@@ -1148,15 +1148,15 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
 def update_render_passes(self, context):
     scene = context.scene
     rd = scene.render
-    rl = scene.render_layers.active
-    rl.update_render_passes()
+    view_layer = scene.view_layers.active
+    view_layer.update_render_passes()
 
 class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
     @classmethod
     def register(cls):
-        bpy.types.SceneLayer.cycles = PointerProperty(
-                name="Cycles SceneRenderLayer Settings",
-                description="Cycles SceneLayer Settings",
+        bpy.types.ViewLayer.cycles = PointerProperty(
+                name="Cycles ViewLayer Settings",
+                description="Cycles ViewLayer Settings",
                 type=cls,
                 )
         cls.pass_debug_bvh_traversed_nodes = BoolProperty(
@@ -1280,7 +1280,7 @@ class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
 
     @classmethod
     def unregister(cls):
-        del bpy.types.SceneLayer.cycles
+        del bpy.types.ViewLayer.cycles
 
 
 class CyclesCurveSettings(bpy.types.PropertyGroup):
index b1e13de5e0cf1cab36dd975a39de65438162edcc..79ed01191d8fca3400986700b839c1945db2a06d 100644 (file)
@@ -400,8 +400,8 @@ class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel):
 
         subsub = sub.column()
         subsub.active = not rd.use_save_buffers
-        for rl in scene.render_layers:
-            if rl.cycles.use_denoising:
+        for view_layer in scene.view_layers:
+            if view_layer.cycles.use_denoising:
                 subsub.active = False
         subsub.prop(cscene, "use_progressive_refine")
 
@@ -430,24 +430,24 @@ class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel):
 
 class CYCLES_RENDER_PT_layer_options(CyclesButtonsPanel, Panel):
     bl_label = "Layer"
-    bl_context = "render_layer"
+    bl_context = "view_layer"
 
     def draw(self, context):
         layout = self.layout
 
         scene = context.scene
-        rl = scene.render_layers.active
+        view_layer = scene.view_layers.active
 
         col = layout.column()
-        col.prop(rl, "use_sky", "Use Environment")
-        col.prop(rl, "use_ao", "Use AO")
-        col.prop(rl, "use_solid", "Use Surfaces")
-        col.prop(rl, "use_strand", "Use Hair")
+        col.prop(view_layer, "use_sky", "Use Environment")
+        col.prop(view_layer, "use_ao", "Use AO")
+        col.prop(view_layer, "use_solid", "Use Surfaces")
+        col.prop(view_layer, "use_strand", "Use Hair")
 
 
 class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
     bl_label = "Passes"
-    bl_context = "render_layer"
+    bl_context = "view_layer"
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
@@ -457,76 +457,76 @@ class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
 
         scene = context.scene
         rd = scene.render
-        rl = scene.render_layers.active
-        crl = rl.cycles
+        view_layer = scene.view_layers.active
+        cycles_view_layer = view_layer.cycles
 
         split = layout.split()
 
         col = split.column()
-        col.prop(rl, "use_pass_combined")
-        col.prop(rl, "use_pass_z")
-        col.prop(rl, "use_pass_mist")
-        col.prop(rl, "use_pass_normal")
+        col.prop(view_layer, "use_pass_combined")
+        col.prop(view_layer, "use_pass_z")
+        col.prop(view_layer, "use_pass_mist")
+        col.prop(view_layer, "use_pass_normal")
         row = col.row()
-        row.prop(rl, "use_pass_vector")
+        row.prop(view_layer, "use_pass_vector")
         row.active = not rd.use_motion_blur
-        col.prop(rl, "use_pass_uv")
-        col.prop(rl, "use_pass_object_index")
-        col.prop(rl, "use_pass_material_index")
+        col.prop(view_layer, "use_pass_uv")
+        col.prop(view_layer, "use_pass_object_index")
+        col.prop(view_layer, "use_pass_material_index")
         col.separator()
-        col.prop(rl, "use_pass_shadow")
-        col.prop(rl, "use_pass_ambient_occlusion")
+        col.prop(view_layer, "use_pass_shadow")
+        col.prop(view_layer, "use_pass_ambient_occlusion")
         col.separator()
-        col.prop(rl, "pass_alpha_threshold")
+        col.prop(view_layer, "pass_alpha_threshold")
 
         col = split.column()
         col.label(text="Diffuse:")
         row = col.row(align=True)
-        row.prop(rl, "use_pass_diffuse_direct", text="Direct", toggle=True)
-        row.prop(rl, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
-        row.prop(rl, "use_pass_diffuse_color", text="Color", toggle=True)
+        row.prop(view_layer, "use_pass_diffuse_direct", text="Direct", toggle=True)
+        row.prop(view_layer, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
+        row.prop(view_layer, "use_pass_diffuse_color", text="Color", toggle=True)
         col.label(text="Glossy:")
         row = col.row(align=True)
-        row.prop(rl, "use_pass_glossy_direct", text="Direct", toggle=True)
-        row.prop(rl, "use_pass_glossy_indirect", text="Indirect", toggle=True)
-        row.prop(rl, "use_pass_glossy_color", text="Color", toggle=True)
+        row.prop(view_layer, "use_pass_glossy_direct", text="Direct", toggle=True)
+        row.prop(view_layer, "use_pass_glossy_indirect", text="Indirect", toggle=True)
+        row.prop(view_layer, "use_pass_glossy_color", text="Color", toggle=True)
         col.label(text="Transmission:")
         row = col.row(align=True)
-        row.prop(rl, "use_pass_transmission_direct", text="Direct", toggle=True)
-        row.prop(rl, "use_pass_transmission_indirect", text="Indirect", toggle=True)
-        row.prop(rl, "use_pass_transmission_color", text="Color", toggle=True)
+        row.prop(view_layer, "use_pass_transmission_direct", text="Direct", toggle=True)
+        row.prop(view_layer, "use_pass_transmission_indirect", text="Indirect", toggle=True)
+        row.prop(view_layer, "use_pass_transmission_color", text="Color", toggle=True)
         col.label(text="Subsurface:")
         row = col.row(align=True)
-        row.prop(rl, "use_pass_subsurface_direct", text="Direct", toggle=True)
-        row.prop(rl, "use_pass_subsurface_indirect", text="Indirect", toggle=True)
-        row.prop(rl, "use_pass_subsurface_color", text="Color", toggle=True)
+        row.prop(view_layer, "use_pass_subsurface_direct", text="Direct", toggle=True)
+        row.prop(view_layer, "use_pass_subsurface_indirect", text="Indirect", toggle=True)
+        row.prop(view_layer, "use_pass_subsurface_color", text="Color", toggle=True)
         col.label(text="Volume:")
         row = col.row(align=True)
-        row.prop(crl, "use_pass_volume_direct", text="Direct", toggle=True)
-        row.prop(crl, "use_pass_volume_indirect", text="Indirect", toggle=True)
+        row.prop(cycles_view_layer, "use_pass_volume_direct", text="Direct", toggle=True)
+        row.prop(cycles_view_layer, "use_pass_volume_indirect", text="Indirect", toggle=True)
 
         col.separator()
-        col.prop(rl, "use_pass_emit", text="Emission")
-        col.prop(rl, "use_pass_environment")
+        col.prop(view_layer, "use_pass_emit", text="Emission")
+        col.prop(view_layer, "use_pass_environment")
 
         if context.scene.cycles.feature_set == 'EXPERIMENTAL':
             col.separator()
             sub = col.column()
-            sub.active = crl.use_denoising
-            sub.prop(crl, "denoising_store_passes", text="Denoising")
+            sub.active = cycles_view_layer.use_denoising
+            sub.prop(cycles_view_layer, "denoising_store_passes", text="Denoising")
 
         col = layout.column()
-        col.prop(crl, "pass_debug_render_time")
+        col.prop(cycles_view_layer, "pass_debug_render_time")
         if _cycles.with_cycles_debug:
-            col.prop(crl, "pass_debug_bvh_traversed_nodes")
-            col.prop(crl, "pass_debug_bvh_traversed_instances")
-            col.prop(crl, "pass_debug_bvh_intersections")
-            col.prop(crl, "pass_debug_ray_bounces")
+            col.prop(cycles_view_layer, "pass_debug_bvh_traversed_nodes")
+            col.prop(cycles_view_layer, "pass_debug_bvh_traversed_instances")
+            col.prop(cycles_view_layer, "pass_debug_bvh_intersections")
+            col.prop(cycles_view_layer, "pass_debug_ray_bounces")
 
 
 class CYCLES_RENDER_PT_views(CyclesButtonsPanel, Panel):
     bl_label = "Views"
-    bl_context = "render_layer"
+    bl_context = "view_layer"
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw_header(self, context):
@@ -548,7 +548,7 @@ class CYCLES_RENDER_PT_views(CyclesButtonsPanel, Panel):
 
         if basic_stereo:
             row = layout.row()
-            row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
+            row.template_list("VIEWLAYER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
 
             row = layout.row()
             row.label(text="File Suffix:")
@@ -556,7 +556,7 @@ class CYCLES_RENDER_PT_views(CyclesButtonsPanel, Panel):
 
         else:
             row = layout.row()
-            row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
+            row.template_list("VIEWLAYER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
 
             col = row.column(align=True)
             col.operator("scene.render_view_add", icon='ZOOMIN', text="")
@@ -569,65 +569,65 @@ class CYCLES_RENDER_PT_views(CyclesButtonsPanel, Panel):
 
 class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel):
     bl_label = "Denoising"
-    bl_context = "render_layer"
+    bl_context = "view_layer"
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw_header(self, context):
         scene = context.scene
-        rl = scene.render_layers.active
-        crl = rl.cycles
+        view_layer = scene.view_layers.active
+        cycles_view_layer = view_layer.cycles
         cscene = scene.cycles
         layout = self.layout
 
-        layout.prop(crl, "use_denoising", text="")
+        layout.prop(cycles_view_layer, "use_denoising", text="")
 
     def draw(self, context):
         layout = self.layout
 
         scene = context.scene
         cscene = scene.cycles
-        rl = scene.render_layers.active
-        crl = rl.cycles
+        view_layer = scene.view_layers.active
+        cycles_view_layer = view_layer.cycles
 
-        layout.active = crl.use_denoising
+        layout.active = cycles_view_layer.use_denoising
 
         split = layout.split()
 
         col = split.column()
         sub = col.column(align=True)
-        sub.prop(crl, "denoising_radius", text="Radius")
-        sub.prop(crl, "denoising_strength", slider=True, text="Strength")
+        sub.prop(cycles_view_layer, "denoising_radius", text="Radius")
+        sub.prop(cycles_view_layer, "denoising_strength", slider=True, text="Strength")
 
         col = split.column()
         sub = col.column(align=True)
-        sub.prop(crl, "denoising_feature_strength", slider=True, text="Feature Strength")
-        sub.prop(crl, "denoising_relative_pca")
+        sub.prop(cycles_view_layer, "denoising_feature_strength", slider=True, text="Feature Strength")
+        sub.prop(cycles_view_layer, "denoising_relative_pca")
 
         layout.separator()
 
         row = layout.row()
         row.label(text="Diffuse:")
         sub = row.row(align=True)
-        sub.prop(crl, "denoising_diffuse_direct", text="Direct", toggle=True)
-        sub.prop(crl, "denoising_diffuse_indirect", text="Indirect", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_diffuse_direct", text="Direct", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_diffuse_indirect", text="Indirect", toggle=True)
 
         row = layout.row()
         row.label(text="Glossy:")
         sub = row.row(align=True)
-        sub.prop(crl, "denoising_glossy_direct", text="Direct", toggle=True)
-        sub.prop(crl, "denoising_glossy_indirect", text="Indirect", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_glossy_direct", text="Direct", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_glossy_indirect", text="Indirect", toggle=True)
 
         row = layout.row()
         row.label(text="Transmission:")
         sub = row.row(align=True)
-        sub.prop(crl, "denoising_transmission_direct", text="Direct", toggle=True)
-        sub.prop(crl, "denoising_transmission_indirect", text="Indirect", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_transmission_direct", text="Direct", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_transmission_indirect", text="Indirect", toggle=True)
 
         row = layout.row()
         row.label(text="Subsurface:")
         sub = row.row(align=True)
-        sub.prop(crl, "denoising_subsurface_direct", text="Direct", toggle=True)
-        sub.prop(crl, "denoising_subsurface_indirect", text="Indirect", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_subsurface_direct", text="Direct", toggle=True)
+        sub.prop(cycles_view_layer, "denoising_subsurface_indirect", text="Indirect", toggle=True)
 
 
 class CYCLES_PT_post_processing(CyclesButtonsPanel, Panel):
@@ -1090,8 +1090,8 @@ class CYCLES_WORLD_PT_mist(CyclesButtonsPanel, Panel):
     def poll(cls, context):
         if CyclesButtonsPanel.poll(context):
             if context.world:
-                for rl in context.scene.render_layers:
-                    if rl.use_pass_mist:
+                for view_layer in context.scene.view_layers:
+                    if view_layer.use_pass_mist:
                         return True
 
         return False
@@ -1729,9 +1729,9 @@ def get_panels():
         'MATERIAL_PT_volume_options',
         'MATERIAL_PT_volume_shading',
         'MATERIAL_PT_volume_transp',
-        'RENDERLAYER_PT_layer_options',
-        'RENDERLAYER_PT_layer_passes',
-        'RENDERLAYER_PT_views',
+        'VIEWLAYER_PT_layer_options',
+        'VIEWLAYER_PT_layer_passes',
+        'VIEWLAYER_PT_views',
         'RENDER_PT_antialiasing',
         'RENDER_PT_bake',
         'RENDER_PT_motion_blur',
index 63b07936426d8ef778c76e4bcf2eca6227b0c4e9..b2c0a09e14b4c3ef35d637e20f9d2379dc2a2e60 100644 (file)
@@ -325,7 +325,7 @@ static bool ObtainCacheParticleVcol(Mesh *mesh,
        return true;
 }
 
-static void set_resolution(BL::Object *b_ob, BL::Scene *scene, BL::SceneLayer *sl, bool render)
+static void set_resolution(BL::Object *b_ob, BL::Scene *scene, BL::ViewLayer *sl, bool render)
 {
        BL::Object::modifiers_iterator b_mod;
        for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) {
@@ -912,7 +912,7 @@ void BlenderSync::sync_curves(Mesh *mesh,
        ParticleCurveData CData;
 
        if(!preview)
-               set_resolution(&b_ob, &b_scene, &b_scene_layer, true);
+               set_resolution(&b_ob, &b_scene, &b_view_layer, true);
 
        ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, !preview);
 
@@ -1057,7 +1057,7 @@ void BlenderSync::sync_curves(Mesh *mesh,
        }
 
        if(!preview)
-               set_resolution(&b_ob, &b_scene, &b_scene_layer, false);
+               set_resolution(&b_ob, &b_scene, &b_view_layer, false);
 
        mesh->compute_bounds();
 }
index 9e9ab030146ffac2e5a82a5edeb74ef509dff3c8..4622dce286f4eaeeef1f74963492c768674542b5 100644 (file)
@@ -980,7 +980,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
        /* test if we can instance or if the object is modified */
        BL::ID b_ob_data = b_ob.data();
        BL::ID key = (BKE_object_is_modified(b_ob))? b_ob_instance: b_ob_data;
-       BL::Material material_override = render_layer.material_override;
+       BL::Material material_override = view_layer.material_override;
 
        /* find shader indices */
        vector<Shader*> used_shaders;
@@ -1005,10 +1005,10 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
 
        /* test if we need to sync */
        int requested_geometry_flags = Mesh::GEOMETRY_NONE;
-       if(render_layer.use_surfaces) {
+       if(view_layer.use_surfaces) {
                requested_geometry_flags |= Mesh::GEOMETRY_TRIANGLES;
        }
-       if(render_layer.use_hair) {
+       if(view_layer.use_hair) {
                requested_geometry_flags |= Mesh::GEOMETRY_CURVES;
        }
        Mesh *mesh;
@@ -1076,14 +1076,14 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
                BL::Mesh b_mesh = object_to_mesh(b_data,
                                                 b_ob,
                                                 b_scene,
-                                                b_scene_layer,
+                                                b_view_layer,
                                                 true,
                                                 !preview,
                                                 need_undeformed,
                                                 mesh->subdivision_type);
 
                if(b_mesh) {
-                       if(render_layer.use_surfaces && !hide_tris) {
+                       if(view_layer.use_surfaces && !hide_tris) {
                                if(mesh->subdivision_type != Mesh::SUBDIVISION_NONE)
                                        create_subd_mesh(scene, mesh, b_ob, b_mesh, used_shaders,
                                                         dicing_rate, max_subdivisions);
@@ -1093,7 +1093,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
                                create_mesh_volume_attributes(scene, b_ob, mesh, b_scene.frame_current());
                        }
 
-                       if(render_layer.use_hair && mesh->subdivision_type == Mesh::SUBDIVISION_NONE)
+                       if(view_layer.use_hair && mesh->subdivision_type == Mesh::SUBDIVISION_NONE)
                                sync_curves(mesh, b_mesh, b_ob, false);
 
                        if(can_free_caches) {
@@ -1208,7 +1208,7 @@ void BlenderSync::sync_mesh_motion(BL::Object& b_ob,
                b_mesh = object_to_mesh(b_data,
                                        b_ob,
                                        b_scene,
-                                       b_scene_layer,
+                                       b_view_layer,
                                        true,
                                        !preview,
                                        false,
index 986f0ccda68695dc4119637a01d69c98571ec55d..d92105850444626e77d1ce4802a548a422cffbd2 100644 (file)
@@ -288,8 +288,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph::duplis_iterator& b_dupli_iter,
        /* light is handled separately */
        if(object_is_light(b_ob)) {
                /* don't use lamps for excluded layers used as mask layer */
-               if(!motion && !((layer_flag & render_layer.holdout_layer) &&
-                               (layer_flag & render_layer.exclude_layer)))
+               if(!motion && !((layer_flag & view_layer.holdout_layer) &&
+                               (layer_flag & view_layer.exclude_layer)))
                {
                        sync_light(b_parent,
                                   persistent_id,
@@ -314,7 +314,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph::duplis_iterator& b_dupli_iter,
        }
 
        /* Visibility flags for both parent and child. */
-       bool use_holdout = (layer_flag & render_layer.holdout_layer) != 0;
+       bool use_holdout = (layer_flag & view_layer.holdout_layer) != 0;
        uint visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL_VISIBILITY;
 
        if(b_parent.ptr.data != b_ob.ptr.data) {
@@ -322,12 +322,12 @@ Object *BlenderSync::sync_object(BL::Depsgraph::duplis_iterator& b_dupli_iter,
        }
 
        /* Make holdout objects on excluded layer invisible for non-camera rays. */
-       if(use_holdout && (layer_flag & render_layer.exclude_layer)) {
+       if(use_holdout && (layer_flag & view_layer.exclude_layer)) {
                visibility &= ~(PATH_RAY_ALL_VISIBILITY - PATH_RAY_CAMERA);
        }
 
        /* Hide objects not on render layer from camera rays. */
-       if(!(layer_flag & render_layer.layer)) {
+       if(!(layer_flag & view_layer.layer)) {
                visibility &= ~PATH_RAY_CAMERA;
        }
 
index 9b06e11fd88112f98560ca8b3b61bc36bb1cbdc7..60e49161be208a039f9e2c9b0927ed017314f7da 100644 (file)
@@ -60,7 +60,7 @@ BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
   b_render(b_engine.render()),
   b_depsgraph(b_depsgraph),
   b_scene(b_scene),
-  b_scene_layer(b_engine.scene_layer()),
+  b_view_layer(b_engine.view_layer()),
   b_v3d(PointerRNA_NULL),
   b_rv3d(PointerRNA_NULL),
   python_thread_state(NULL)
@@ -90,7 +90,7 @@ BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
   b_render(b_scene.render()),
   b_depsgraph(b_depsgraph),
   b_scene(b_scene),
-  b_scene_layer(b_engine.scene_layer()),
+  b_view_layer(b_engine.view_layer()),
   b_v3d(b_v3d),
   b_rv3d(b_rv3d),
   width(width),
@@ -165,7 +165,7 @@ void BlenderSession::create_session()
        else {
                /* for final render we will do full data sync per render layer, only
                 * do some basic syncing here, no objects or materials for speed */
-               sync->sync_render_layers(b_v3d, NULL);
+               sync->sync_view_layers(b_v3d, NULL);
                sync->sync_integrator();
                sync->sync_camera(b_render, b_camera_override, width, height, "");
        }
@@ -222,7 +222,7 @@ void BlenderSession::reset_session(BL::BlendData& b_data_, BL::Scene& b_scene_)
        /* for final render we will do full data sync per render layer, only
         * do some basic syncing here, no objects or materials for speed */
        BL::Object b_camera_override(b_engine.camera_override());
-       sync->sync_render_layers(b_v3d, NULL);
+       sync->sync_view_layers(b_v3d, NULL);
        sync->sync_integrator();
        sync->sync_camera(b_render, b_camera_override, width, height, "");
 
@@ -383,13 +383,13 @@ void BlenderSession::render()
        BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_v3d, b_rv3d, scene->camera, width, height);
 
        /* render each layer */
-       BL::Scene::render_layers_iterator b_layer_iter;
+       BL::Scene::view_layers_iterator b_layer_iter;
        BL::RenderResult::views_iterator b_view_iter;
 
        /* We do some special meta attributes when we only have single layer. */
-       const bool is_single_layer = (b_scene.render_layers.length() == 1);
+       const bool is_single_layer = (b_scene.view_layers.length() == 1);
 
-       for(b_scene.render_layers.begin(b_layer_iter); b_layer_iter != b_scene.render_layers.end(); ++b_layer_iter) {
+       for(b_scene.view_layers.begin(b_layer_iter); b_layer_iter != b_scene.view_layers.end(); ++b_layer_iter) {
                b_rlay_name = b_layer_iter->name();
 
                /* temporary render result to find needed passes and views */
@@ -1311,7 +1311,7 @@ bool BlenderSession::builtin_image_float_pixels(const string &builtin_name,
                        BL::ShaderNodeTexPointDensity b_point_density_node(b_node);
                        int length;
                        int settings = background ? 1 : 0;  /* 1 - render settings, 0 - vewport settings. */
-                       b_point_density_node.calc_point_density(b_scene, b_scene_layer, settings, &length, &pixels);
+                       b_point_density_node.calc_point_density(b_scene, b_view_layer, settings, &length, &pixels);
                }
        }
 
index 7ae7bde1737038694e753535d8163e0917f83557..8694c9499b8fd86b5c1e3992fadb99cb94190521 100644 (file)
@@ -108,7 +108,7 @@ public:
        BL::RenderSettings b_render;
        BL::Depsgraph b_depsgraph;
        BL::Scene b_scene;
-       BL::SceneLayer b_scene_layer;
+       BL::ViewLayer b_view_layer;
        BL::SpaceView3D b_v3d;
        BL::RegionView3D b_rv3d;
        string b_rlay_name;
index 50a95777a0fad2f78d7e4da83a477f2ebddbe4c0..94c7aa3b2486b3e8da27480a16cb6e8a8710f762 100644 (file)
@@ -235,7 +235,7 @@ static ShaderNode *add_node(Scene *scene,
                             BL::RenderEngine& b_engine,
                             BL::BlendData& b_data,
                             BL::Scene& b_scene,
-                            BL::SceneLayer b_scene_layer,
+                            BL::ViewLayer b_view_layer,
                             const bool background,
                             ShaderGraph *graph,
                             BL::ShaderNodeTree& b_ntree,
@@ -832,7 +832,7 @@ static ShaderNode *add_node(Scene *scene,
 
                /* TODO(sergey): Use more proper update flag. */
                if(true) {
-                       b_point_density_node.cache_point_density(b_scene, b_scene_layer, settings);
+                       b_point_density_node.cache_point_density(b_scene, b_view_layer, settings);
                        scene->image_manager->tag_reload_image(
                                point_density->filename.string(),
                                point_density->builtin_data,
@@ -850,7 +850,7 @@ static ShaderNode *add_node(Scene *scene,
                BL::Object b_ob(b_point_density_node.object());
                if(b_ob) {
                        float3 loc, size;
-                       point_density_texture_space(b_scene, b_scene_layer,
+                       point_density_texture_space(b_scene, b_view_layer,
                                                    b_point_density_node,
                                                    settings,
                                                    loc,
@@ -978,7 +978,7 @@ static void add_nodes(Scene *scene,
                       BL::RenderEngine& b_engine,
                       BL::BlendData& b_data,
                       BL::Scene& b_scene,
-                      BL::SceneLayer& b_scene_layer,
+                      BL::ViewLayer& b_view_layer,
                       const bool background,
                       ShaderGraph *graph,
                       BL::ShaderNodeTree& b_ntree,
@@ -1053,7 +1053,7 @@ static void add_nodes(Scene *scene,
                                          b_engine,
                                          b_data,
                                          b_scene,
-                                         b_scene_layer,
+                                         b_view_layer,
                                          background,
                                          graph,
                                          b_group_ntree,
@@ -1101,7 +1101,7 @@ static void add_nodes(Scene *scene,
                                                b_engine,
                                                b_data,
                                                b_scene,
-                                               b_scene_layer,
+                                               b_view_layer,
                                                background,
                                                graph,
                                                b_ntree,
@@ -1165,7 +1165,7 @@ static void add_nodes(Scene *scene,
                       BL::RenderEngine& b_engine,
                       BL::BlendData& b_data,
                       BL::Scene& b_scene,
-                      BL::SceneLayer& b_scene_layer,
+                      BL::ViewLayer& b_view_layer,
                       const bool background,
                       ShaderGraph *graph,
                       BL::ShaderNodeTree& b_ntree)
@@ -1175,7 +1175,7 @@ static void add_nodes(Scene *scene,
                  b_engine,
                  b_data,
                  b_scene,
-                 b_scene_layer,
+                 b_view_layer,
                  background,
                  graph,
                  b_ntree,
@@ -1214,7 +1214,7 @@ void BlenderSync::sync_materials(bool update_all)
                        if(b_mat->use_nodes() && b_mat->node_tree()) {
                                BL::ShaderNodeTree b_ntree(b_mat->node_tree());
 
-                               add_nodes(scene, b_engine, b_data, b_scene, b_scene_layer, !preview, graph, b_ntree);
+                               add_nodes(scene, b_engine, b_data, b_scene, b_view_layer, !preview, graph, b_ntree);
                        }
                        else {
                                DiffuseBsdfNode *diffuse = new DiffuseBsdfNode();
@@ -1285,7 +1285,7 @@ void BlenderSync::sync_world(bool update_all)
                if(b_world && b_world.use_nodes() && b_world.node_tree()) {
                        BL::ShaderNodeTree b_ntree(b_world.node_tree());
 
-                       add_nodes(scene, b_engine, b_data, b_scene, b_scene_layer, !preview, graph, b_ntree);
+                       add_nodes(scene, b_engine, b_data, b_scene, b_view_layer, !preview, graph, b_ntree);
 
                        /* volume */
                        PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles");
@@ -1344,8 +1344,8 @@ void BlenderSync::sync_world(bool update_all)
        else
                background->transparent = b_scene.render().alpha_mode() == BL::RenderSettings::alpha_mode_TRANSPARENT;
 
-       background->use_shader = render_layer.use_background_shader;
-       background->use_ao = background->use_ao && render_layer.use_background_ao;
+       background->use_shader = view_layer.use_background_shader;
+       background->use_ao = background->use_ao && view_layer.use_background_ao;
 
        if(background->modified(prevbackground))
                background->tag_update(scene);
@@ -1378,7 +1378,7 @@ void BlenderSync::sync_lamps(bool update_all)
 
                                BL::ShaderNodeTree b_ntree(b_lamp->node_tree());
 
-                               add_nodes(scene, b_engine, b_data, b_scene, b_scene_layer, !preview, graph, b_ntree);
+                               add_nodes(scene, b_engine, b_data, b_scene, b_view_layer, !preview, graph, b_ntree);
                        }
                        else {
                                float strength = 1.0f;
index d340435aa93f84d5b389d97d815219f48b1a4b9a..66509ebeef2fb49a956ddd624ae630444c23247e 100644 (file)
@@ -53,7 +53,7 @@ BlenderSync::BlenderSync(BL::RenderEngine& b_engine,
   b_data(b_data),
   b_depsgraph(b_depsgraph),
   b_scene(b_scene),
-  b_scene_layer(b_engine.scene_layer()),
+  b_view_layer(b_engine.view_layer()),
   shader_map(&scene->shaders),
   object_map(&scene->objects),
   mesh_map(&scene->meshes),
@@ -198,7 +198,7 @@ void BlenderSync::sync_data(BL::RenderSettings& b_render,
                             void **python_thread_state,
                             const char *layer)
 {
-       sync_render_layers(b_v3d, layer);
+       sync_view_layers(b_v3d, layer);
        sync_integrator();
        sync_film();
        sync_shaders();
@@ -376,43 +376,43 @@ void BlenderSync::sync_film()
 
 /* Render Layer */
 
-void BlenderSync::sync_render_layers(BL::SpaceView3D& b_v3d, const char *layer)
+void BlenderSync::sync_view_layers(BL::SpaceView3D& b_v3d, const char *layer)
 {
        string layername;
 
        /* 3d view */
        if(b_v3d) {
-               layername = b_scene.render_layers.active().name();
+               layername = b_scene.view_layers.active().name();
                layer = layername.c_str();
        }
 
        /* render layer */
-       BL::Scene::render_layers_iterator b_rlay;
+       BL::Scene::view_layers_iterator b_rlay;
        bool first_layer = true;
        uint layer_override = get_layer(b_engine.layer_override());
-       uint scene_layers = layer_override ? layer_override : get_layer(b_scene.layers());
+       uint view_layers = layer_override ? layer_override : get_layer(b_scene.layers());
 
-       for(b_scene.render_layers.begin(b_rlay); b_rlay != b_scene.render_layers.end(); ++b_rlay) {
+       for(b_scene.view_layers.begin(b_rlay); b_rlay != b_scene.view_layers.end(); ++b_rlay) {
                if((!layer && first_layer) || (layer && b_rlay->name() == layer)) {
-                       render_layer.name = b_rlay->name();
+                       view_layer.name = b_rlay->name();
 
-                       render_layer.holdout_layer = 0;
-                       render_layer.exclude_layer = 0;
+                       view_layer.holdout_layer = 0;
+                       view_layer.exclude_layer = 0;
 
-                       render_layer.scene_layer = scene_layers & ~render_layer.exclude_layer;
-                       render_layer.scene_layer |= render_layer.exclude_layer & render_layer.holdout_layer;
+                       view_layer.view_layer = view_layers & ~view_layer.exclude_layer;
+                       view_layer.view_layer |= view_layer.exclude_layer & view_layer.holdout_layer;
 
-                       render_layer.layer = (1 << 20) - 1;
-                       render_layer.layer |= render_layer.holdout_layer;
+                       view_layer.layer = (1 << 20) - 1;
+                       view_layer.layer |= view_layer.holdout_layer;
 
-                       render_layer.material_override = PointerRNA_NULL;
-                       render_layer.use_background_shader = b_rlay->use_sky();
-                       render_layer.use_background_ao = b_rlay->use_ao();
-                       render_layer.use_surfaces = b_rlay->use_solid();
-                       render_layer.use_hair = b_rlay->use_strand();
+                       view_layer.material_override = PointerRNA_NULL;
+                       view_layer.use_background_shader = b_rlay->use_sky();
+                       view_layer.use_background_ao = b_rlay->use_ao();
+                       view_layer.use_surfaces = b_rlay->use_solid();
+                       view_layer.use_hair = b_rlay->use_strand();
 
-                       render_layer.bound_samples = false;
-                       render_layer.samples = 0;
+                       view_layer.bound_samples = false;
+                       view_layer.samples = 0;
                }
 
                first_layer = false;
@@ -526,7 +526,7 @@ int BlenderSync::get_denoising_pass(BL::RenderPass& b_pass)
 }
 
 array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
-                                            BL::SceneLayer& b_slay,
+                                            BL::ViewLayer& b_slay,
                                             const SessionParams &session_params)
 {
        array<Pass> passes;
@@ -820,8 +820,8 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine,
                                    !b_r.use_save_buffers();
 
        if(params.progressive_refine) {
-               BL::Scene::render_layers_iterator b_rlay;
-               for(b_scene.render_layers.begin(b_rlay); b_rlay != b_scene.render_layers.end(); ++b_rlay) {
+               BL::Scene::view_layers_iterator b_rlay;
+               for(b_scene.view_layers.begin(b_rlay); b_rlay != b_scene.view_layers.end(); ++b_rlay) {
                        PointerRNA crl = RNA_pointer_get(&b_rlay->ptr, "cycles");
                        if(get_boolean(crl, "use_denoising")) {
                                params.progressive_refine = false;
index d262adb13fed358fe26aaf5c0989c813fa827bbd..dd415b1ea9d77a94bb9742ce874b5e4d3c2e5c20 100644 (file)
@@ -43,7 +43,7 @@ class Mesh;
 class Object;
 class ParticleSystem;
 class Scene;
-class SceneLayer;
+class ViewLayer;
 class Shader;
 class ShaderGraph;
 class ShaderNode;
@@ -67,9 +67,9 @@ public:
                       int width, int height,
                       void **python_thread_state,
                       const char *layer = 0);
-       void sync_render_layers(BL::SpaceView3D& b_v3d, const char *layer);
+       void sync_view_layers(BL::SpaceView3D& b_v3d, const char *layer);
        array<Pass> sync_render_passes(BL::RenderLayer& b_rlay,
-                                      BL::SceneLayer& b_slay,
+                                      BL::ViewLayer& b_slay,
                                       const SessionParams &session_params);
        void sync_integrator();
        void sync_camera(BL::RenderSettings& b_render,
@@ -79,8 +79,8 @@ public:
        void sync_view(BL::SpaceView3D& b_v3d,
                       BL::RegionView3D& b_rv3d,
                       int width, int height);
-       inline int get_layer_samples() { return render_layer.samples; }
-       inline int get_layer_bound_samples() { return render_layer.bound_samples; }
+       inline int get_layer_samples() { return view_layer.samples; }
+       inline int get_layer_bound_samples() { return view_layer.bound_samples; }
 
        /* get parameters */
        static SceneParams get_scene_params(BL::Scene& b_scene,
@@ -165,7 +165,7 @@ private:
        BL::BlendData b_data;
        BL::Depsgraph b_depsgraph;
        BL::Scene b_scene;
-       BL::SceneLayer b_scene_layer;
+       BL::ViewLayer b_view_layer;
 
        id_map<void*, Shader> shader_map;
        id_map<ObjectKey, Object> object_map;
@@ -187,7 +187,7 @@ private:
 
        struct RenderLayerInfo {
                RenderLayerInfo()
-               : scene_layer(0), layer(0),
+               : view_layer(0), layer(0),
                  holdout_layer(0), exclude_layer(0),
                  material_override(PointerRNA_NULL),
                  use_background_shader(true),
@@ -198,7 +198,7 @@ private:
                {}
 
                string name;
-               uint scene_layer;
+               uint view_layer;
                uint layer; /* This can be safely removed from Cycles. */
                uint holdout_layer; /* This can be safely removed from Cycles. */
                uint exclude_layer; /* This can be safely removed from Cycles. */
@@ -209,7 +209,7 @@ private:
                bool use_hair;
                int samples; /* This can be safely removed from Cycles. */
                bool bound_samples; /* This can be safely removed from Cycles. */
-       } render_layer;
+       } view_layer;
 
        Progress &progress;
 };
index dd08be3ddc9b85fe0f09d4861c8a5f4dc262f12d..3b06fb720dee80c99590a0f4d01446359ba168bf 100644 (file)
@@ -34,7 +34,7 @@ void density_texture_space_invert(float3& loc,
 
 }  /* namespace */
 
-void point_density_texture_space(BL::Scene& b_scene, BL::SceneLayer& b_scene_layer,
+void point_density_texture_space(BL::Scene& b_scene, BL::ViewLayer& b_view_layer,
                                  BL::ShaderNodeTexPointDensity& b_point_density_node,
                                  int settings,
                                  float3& loc,
@@ -48,7 +48,7 @@ void point_density_texture_space(BL::Scene& b_scene, BL::SceneLayer& b_scene_lay
        }
        float3 min, max;
        b_point_density_node.calc_point_density_minmax(b_scene,
-                                                      b_scene_layer,
+                                                      b_view_layer,
                                                       settings,
                                                       &min[0],
                                                       &max[0]);
index c343d5dab92e04418ebab4c889e4678e23a7fdc1..3d4b8739d498df2898dff627f2a40545557f0690 100644 (file)
@@ -22,7 +22,7 @@
 
 CCL_NAMESPACE_BEGIN
 
-void point_density_texture_space(BL::Scene& b_scene, BL::SceneLayer& b_scene_layer,
+void point_density_texture_space(BL::Scene& b_scene, BL::ViewLayer& b_view_layer,
                                  BL::ShaderNodeTexPointDensity& b_point_density_node,
                                  const int settings,
                                  float3& loc,
index 314bcaf23c4051b37cb62249e8e32c8c000819f1..a813a09f38af77cfb087811dd4d30fbdbfa57580 100644 (file)
@@ -46,7 +46,7 @@ void python_thread_state_restore(void **python_thread_state);
 static inline BL::Mesh object_to_mesh(BL::BlendData& data,
                                       BL::Object& object,
                                       BL::Scene& scene,
-                                      BL::SceneLayer scene_layer,
+                                      BL::ViewLayer view_layer,
                                       bool apply_modifiers,
                                       bool render,
                                       bool calc_undeformed,
@@ -65,7 +65,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data,
                subsurf_mod.show_viewport(false);
        }
 
-       BL::Mesh me = data.meshes.new_from_object(scene, scene_layer, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed);
+       BL::Mesh me = data.meshes.new_from_object(scene, view_layer, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed);
 
        if(subdivision_type != Mesh::SUBDIVISION_NONE) {
                BL::Modifier subsurf_mod = object.modifiers[object.modifiers.length()-1];
@@ -307,7 +307,7 @@ static inline uint get_layer(const BL::Array<int, 20>& array)
 static inline uint get_layer(const BL::Array<int, 20>& array,
                              const BL::Array<int, 8>& local_array,
                              bool is_light = false,
-                             uint scene_layers = (1 << 20) - 1)
+                             uint view_layers = (1 << 20) - 1)
 {
        uint layer = 0;
 
@@ -319,7 +319,7 @@ static inline uint get_layer(const BL::Array<int, 20>& array,
                /* Consider light is visible if it was visible without layer
                 * override, which matches behavior of Blender Internal.
                 */
-               if(layer & scene_layers) {
+               if(layer & view_layers) {
                        for(uint i = 0; i < 8; i++)
                                layer |= (1 << (20+i));
                }
index e5fc83b07edc25834101df46fa470d08e70f068d..b00b30a9a21a85c7559774d8c4c8001e63b2f737 100644 (file)
@@ -1206,7 +1206,7 @@ integration_types = {
 # main function for parameter processing
 def process(layer_name, lineset_name):
     scene = getCurrentScene()
-    layer = scene.render_layers[layer_name]
+    layer = scene.view_layers[layer_name]
     lineset = layer.freestyle_settings.linesets[lineset_name]
     linestyle = lineset.linestyle
 
index 8f2e69313fc95c353ef5e08b29fd2d7087865468..eb0123f12eb0215f46220f4c1fa5b0eb37542137 100644 (file)
@@ -120,14 +120,14 @@ def object_data_add(context, obdata, operator=None, name=None):
     :rtype: :class:`bpy.types.Object`
     """
     scene = context.scene
-    layer = context.render_layer
+    layer = context.view_layer
     layer_collection = context.layer_collection
 
     for ob in layer.objects:
         ob.select_set(action='DESELECT')
 
     if not layer_collection:
-        # when there is no collection linked to this render_layer create one
+        # when there is no collection linked to this view_layer create one
         scene_collection = scene.master_collection.collections.new("")
         layer_collection = layer.collections.link(scene_collection)
     else:
index 09c6704df1fea65450015b78eccf4485a35255a4..a4288377b825714b19e11fd0778f66ed433082c9 100644 (file)
@@ -1109,7 +1109,7 @@ kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS')
 kmi.properties.exit = False
 kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS', shift=True)
 kmi.properties.exit = True
-kmi = km.keymap_items.new('node.read_renderlayers', 'R', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('node.read_viewlayers', 'R', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('node.read_fullsamplelayers', 'R', 'PRESS', shift=True)
 kmi = km.keymap_items.new('node.render_changed', 'Z', 'PRESS')
 kmi = km.keymap_items.new('node.clipboard_copy', 'C', 'PRESS', ctrl=True)
index 194b9b3c28323fa3f1b5d7b8605c9afde4cff7a2..3075e0bd0092447de564da4a5e712e20848af358 100644 (file)
@@ -1499,7 +1499,7 @@ kmi.properties.prev = False
 kmi = km.keymap_items.new('node.group_make', 'G', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('node.group_ungroup', 'G', 'PRESS', alt=True)
 kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS')
-kmi = km.keymap_items.new('node.read_renderlayers', 'R', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('node.read_viewlayers', 'R', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('node.read_fullsamplelayers', 'R', 'PRESS', shift=True)
 kmi = km.keymap_items.new('node.render_changed', 'Z', 'PRESS')
 kmi = km.keymap_items.new('node.translate_attach', 'W', 'PRESS')
index f39dc1a8b08cbe3e183e19a9610b241a33d57e90..467512a9746208713294b763f2cae4de19dbb752 100644 (file)
@@ -611,24 +611,24 @@ class CLIP_OT_setup_tracking_scene(Operator):
         CLIP_set_viewport_background(context, True, sc.clip, sc.clip_user)
 
     @staticmethod
-    def _setupRenderLayers(context):
+    def _setupViewLayers(context):
         scene = context.scene
-        rlayers = scene.render_layers
+        view_layers = scene.view_layers
 
-        if not scene.render_layers.get("Foreground"):
-            if len(rlayers) == 1:
-                fg = rlayers[0]
+        if not view_layers.get("Foreground"):
+            if len(view_layers) == 1:
+                fg = view_layers[0]
                 fg.name = 'Foreground'
             else:
-                fg = scene.render_layers.new("Foreground")
+                fg = view_layers.new("Foreground")
 
             fg.use_sky = True
             fg.layers = [True] + [False] * 19
             fg.layers_zmask = [False] * 10 + [True] + [False] * 9
             fg.use_pass_vector = True
 
-        if not scene.render_layers.get("Background"):
-            bg = scene.render_layers.new("Background")
+        if not view_layers.get("Background"):
+            bg = view_layers.new("Background")
             bg.use_pass_shadow = True
             bg.use_pass_ambient_occlusion = True
             bg.layers = [False] * 10 + [True] + [False] * 9
@@ -940,8 +940,8 @@ class CLIP_OT_setup_tracking_scene(Operator):
     def _setupObjects(self, context):
         scene = context.scene
 
-        fg = scene.render_layers.get("Foreground")
-        bg = scene.render_layers.get("Background")
+        fg = scene.view_layers.get("Foreground")
+        bg = scene.view_layers.get("Background")
 
         all_layers = self._mergeLayers(fg.layers, bg.layers)
 
@@ -985,7 +985,7 @@ class CLIP_OT_setup_tracking_scene(Operator):
         self._setupWorld(context)
         self._setupCamera(context)
         self._setupViewport(context)
-        self._setupRenderLayers(context)
+        self._setupViewLayers(context)
         self._setupNodes(context)
         self._setupObjects(context)
 
index d13b427e28dc929d3bc70994740746625fa7e837..6d862da0ba92890eeedee5c2884bd6b53380b9de 100644 (file)
@@ -47,15 +47,15 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        rl = context.scene.render_layers.active
-        return rl and rl.freestyle_settings.linesets.active
+        view_layer = context.scene.view_layers.active
+        return view_layer and view_layer.freestyle_settings.linesets.active
 
     def execute(self, context):
         import sys
 
         scene = context.scene
-        rl = scene.render_layers.active
-        lineset = rl.freestyle_settings.linesets.active
+        view_layer = scene.view_layers.active
+        lineset = view_layer.freestyle_settings.linesets.active
         linestyle = lineset.linestyle
         # Find the modifier to work on
         if self.type == 'COLOR':
@@ -207,8 +207,8 @@ class SCENE_OT_freestyle_module_open(bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        rl = context.scene.render_layers.active
-        return rl and rl.freestyle_settings.mode == 'SCRIPT'
+        view_layer = context.scene.view_layers.active
+        return view_layer and view_layer.freestyle_settings.mode == 'SCRIPT'
 
     def invoke(self, context, event):
         self.freestyle_module = context.freestyle_module
index 037fe9618ecf7d0fc1ba4c963a94a12060813fac..deeed2d1c057c0fc2c6d640ab4e6f549ac7033de 100644 (file)
@@ -60,7 +60,7 @@ _modules = [
     "properties_physics_smoke",
     "properties_physics_softbody",
     "properties_render",
-    "properties_render_layer",
+    "properties_view_layer",
     "properties_scene",
     "properties_texture",
     "properties_world",
index 42a5406d1c813ce33fc5067c4ee8a6a62e171d58..1595e6895d1d4e7b882d4d2897371b24cd61d6b1 100644 (file)
@@ -54,7 +54,7 @@ class WORKSPACE_PT_workspace(WorkSpaceButtonsPanel, Panel):
 
         layout.enabled = not workspace.use_scene_settings
 
-        layout.template_search(workspace, "render_layer", scene, "render_layers")
+        layout.template_search(workspace, "view_layer", scene, "view_layers")
 
         if view_render.has_multiple_engines:
             layout.prop(view_render, "engine", text="")
index 5d1d6d3dbac823637f2dc520f452797508bc7840..d9f28040b16d14eecd47215ce22831f7189a5990 100644 (file)
@@ -62,10 +62,10 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
 
 # Render layer properties
 
-class RenderLayerFreestyleButtonsPanel:
+class ViewLayerFreestyleButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
-    bl_context = "render_layer"
+    bl_context = "view_layer"
     # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
 
     @classmethod
@@ -75,21 +75,21 @@ class RenderLayerFreestyleButtonsPanel:
         with_freestyle = bpy.app.build_options.freestyle
 
         return (scene and with_freestyle and rd.use_freestyle and
-                scene.render_layers.active and(scene.view_render.engine in cls.COMPAT_ENGINES))
+                scene.view_layers.active and(scene.view_render.engine in cls.COMPAT_ENGINES))
 
 
-class RenderLayerFreestyleEditorButtonsPanel(RenderLayerFreestyleButtonsPanel):
+class ViewLayerFreestyleEditorButtonsPanel(ViewLayerFreestyleButtonsPanel):
     # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
 
     @classmethod
     def poll(cls, context):
         if not super().poll(context):
             return False
-        rl = context.scene.render_layers.active
-        return rl and rl.freestyle_settings.mode == 'EDITOR'
+        view_layer = context.scene.view_layers.active
+        return view_layer and view_layer.freestyle_settings.mode == 'EDITOR'
 
 
-class RENDERLAYER_UL_linesets(UIList):
+class VIEWLAYER_UL_linesets(UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
         lineset = item
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
@@ -109,7 +109,7 @@ class RENDER_MT_lineset_specials(Menu):
         layout.operator("scene.freestyle_lineset_paste", icon='PASTEDOWN')
 
 
-class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel):
+class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel):
     bl_label = "Freestyle"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -117,10 +117,10 @@ class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel):
         layout = self.layout
 
         scene = context.scene
-        rl = scene.render_layers.active
-        freestyle = rl.freestyle_settings
+        view_layer = scene.view_layers.active
+        freestyle = view_layer.freestyle_settings
 
-        layout.active = rl.use_freestyle
+        layout.active = view_layer.use_freestyle
 
         row = layout.row()
         layout.prop(freestyle, "mode", text="Control Mode")
@@ -165,7 +165,7 @@ class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel):
                 row.operator("scene.freestyle_module_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
 
 
-class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, Panel):
+class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel):
     bl_label = "Freestyle Line Set"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -187,15 +187,15 @@ class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, P
         rd = scene.render
         view_render = scene.view_render
 
-        rl = scene.render_layers.active
-        freestyle = rl.freestyle_settings
+        view_layer = scene.view_layers.active
+        freestyle = view_layer.freestyle_settings
         lineset = freestyle.linesets.active
 
-        layout.active = rl.use_freestyle
+        layout.active = view_layer.use_freestyle
 
         row = layout.row()
         rows = 4 if lineset else 2
-        row.template_list("RENDERLAYER_UL_linesets", "", freestyle, "linesets", freestyle.linesets, "active_index", rows=rows)
+        row.template_list("VIEWLAYER_UL_linesets", "", freestyle, "linesets", freestyle.linesets, "active_index", rows=rows)
 
         sub = row.column(align=True)
         sub.operator("scene.freestyle_lineset_add", icon='ZOOMIN', text="")
@@ -259,7 +259,7 @@ class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, P
                 row.prop(lineset, "group_negation", expand=True)
 
 
-class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, Panel):
+class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Panel):
     bl_label = "Freestyle Line Style"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -379,7 +379,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
                 row = box.row(align=True)
                 row.prop(modifier, "curvature_min")
                 row.prop(modifier, "curvature_max")
-                freestyle = context.scene.render_layers.active.freestyle_settings
+                freestyle = context.scene.view_layers.active.freestyle_settings
                 if not freestyle.use_smoothness:
                     message = "Enable Face Smoothness to use this modifier"
                     self.draw_modifier_box_error(col.box(), modifier, message)
@@ -434,7 +434,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
                 row = box.row(align=True)
                 row.prop(modifier, "curvature_min")
                 row.prop(modifier, "curvature_max")
-                freestyle = context.scene.render_layers.active.freestyle_settings
+                freestyle = context.scene.view_layers.active.freestyle_settings
                 if not freestyle.use_smoothness:
                     message = "Enable Face Smoothness to use this modifier"
                     self.draw_modifier_box_error(col.box(), modifier, message)
@@ -506,7 +506,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
                 row = box.row(align=True)
                 row.prop(modifier, "curvature_min")
                 row.prop(modifier, "curvature_max")
-                freestyle = context.scene.render_layers.active.freestyle_settings
+                freestyle = context.scene.view_layers.active.freestyle_settings
                 if not freestyle.use_smoothness:
                     message = "Enable Face Smoothness to use this modifier"
                     self.draw_modifier_box_error(col.box(), modifier, message)
@@ -615,10 +615,10 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
         layout = self.layout
 
         scene = context.scene
-        rl = scene.render_layers.active
-        lineset = rl.freestyle_settings.linesets.active
+        view_layer = scene.view_layers.active
+        lineset = view_layer.freestyle_settings.linesets.active
 
-        layout.active = rl.use_freestyle
+        layout.active = view_layer.use_freestyle
 
         if lineset is None:
             return
@@ -833,11 +833,11 @@ class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel):
 
 classes = (
     RENDER_PT_freestyle,
-    RENDERLAYER_UL_linesets,
+    VIEWLAYER_UL_linesets,
     RENDER_MT_lineset_specials,
-    RENDERLAYER_PT_freestyle,
-    RENDERLAYER_PT_freestyle_lineset,
-    RENDERLAYER_PT_freestyle_linestyle,
+    VIEWLAYER_PT_freestyle,
+    VIEWLAYER_PT_freestyle_lineset,
+    VIEWLAYER_PT_freestyle_linestyle,
     MATERIAL_PT_freestyle_line,
 )
 
index d25a85d5b4c811fc49a113ebfc42f9eed047dc5b..49ecb94248e90bc8eb314ca04951ce24ea42de70 100644 (file)
@@ -40,7 +40,7 @@ class OBJECT_PT_context_object(ObjectButtonsPanel, Panel):
             layout.template_ID(space, "pin_id")
         else:
             row = layout.row()
-            row.template_ID(context.render_layer.objects, "active")
+            row.template_ID(context.view_layer.objects, "active")
 
 
 class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
similarity index 84%
rename from release/scripts/startup/bl_ui/properties_render_layer.py
rename to release/scripts/startup/bl_ui/properties_view_layer.py
index 1a2ed307c6dc57925390aae22beec01503bb8c29..b1c76a79fcd63e1d11db7e8b02eccadb6d15a602 100644 (file)
@@ -21,10 +21,10 @@ import bpy
 from bpy.types import Panel, UIList
 
 
-class RenderLayerButtonsPanel:
+class ViewLayerButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
-    bl_context = "render_layer"
+    bl_context = "view_layer"
     # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
 
     @classmethod
@@ -33,7 +33,7 @@ class RenderLayerButtonsPanel:
         return scene and (scene.view_render.engine in cls.COMPAT_ENGINES)
 
 
-class RENDERLAYER_UL_renderlayers(UIList):
+class VIEWLAYER_UL_viewlayers(UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
         # assert(isinstance(item, bpy.types.SceneLayer)
         layer = item
@@ -45,7 +45,7 @@ class RENDERLAYER_UL_renderlayers(UIList):
             layout.label("", icon_value=icon)
 
 
-class RENDERLAYER_PT_layers(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_layers(ViewLayerButtonsPanel, Panel):
     bl_label = "Layer List"
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
@@ -63,16 +63,16 @@ class RENDERLAYER_PT_layers(RenderLayerButtonsPanel, Panel):
 
         row = layout.row()
         col = row.column()
-        col.template_list("RENDERLAYER_UL_renderlayers", "", scene, "render_layers", scene.render_layers, "active_index", rows=2)
+        col.template_list("VIEWLAYER_UL_viewlayers", "", scene, "view_layers", scene.view_layers, "active_index", rows=2)
 
         col = row.column()
         sub = col.column(align=True)
-        sub.operator("scene.render_layer_add", icon='ZOOMIN', text="")
-        sub.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
+        sub.operator("scene.view_layer_add", icon='ZOOMIN', text="")
+        sub.operator("scene.view_layer_remove", icon='ZOOMOUT', text="")
         col.prop(rd, "use_single_layer", icon_only=True)
 
 
-class RENDERLAYER_UL_renderviews(UIList):
+class VIEWLAYER_UL_renderviews(UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
         # assert(isinstance(item, bpy.types.SceneRenderView)
         view = item
@@ -88,7 +88,7 @@ class RENDERLAYER_UL_renderviews(UIList):
             layout.label("", icon_value=icon + (not view.use))
 
 
-class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_views(ViewLayerButtonsPanel, Panel):
     bl_label = "Views"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
     bl_options = {'DEFAULT_CLOSED'}
@@ -112,7 +112,7 @@ class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
 
         if basic_stereo:
             row = layout.row()
-            row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
+            row.template_list("VIEWLAYER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
 
             row = layout.row()
             row.label(text="File Suffix:")
@@ -120,7 +120,7 @@ class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
 
         else:
             row = layout.row()
-            row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
+            row.template_list("VIEWLAYER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
 
             col = row.column(align=True)
             col.operator("scene.render_view_add", icon='ZOOMIN', text="")
@@ -131,7 +131,7 @@ class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
             row.prop(rv, "camera_suffix", text="")
 
 
-class RENDERLAYER_PT_clay_settings(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_clay_settings(ViewLayerButtonsPanel, Panel):
     bl_label = "Render Settings"
     COMPAT_ENGINES = {'BLENDER_CLAY'}
 
@@ -144,14 +144,14 @@ class RENDERLAYER_PT_clay_settings(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_CLAY']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_CLAY']
 
         col = layout.column()
         col.template_override_property(layer_props, scene_props, "ssao_samples")
 
 
-class RENDERLAYER_PT_eevee_ambient_occlusion(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_ambient_occlusion(ViewLayerButtonsPanel, Panel):
     bl_label = "Ambient Occlusion"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -164,7 +164,7 @@ class RENDERLAYER_PT_eevee_ambient_occlusion(RenderLayerButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         self.layout.template_override_property(layer_props, scene_props, "gtao_enable", text="")
@@ -173,7 +173,7 @@ class RENDERLAYER_PT_eevee_ambient_occlusion(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -186,7 +186,7 @@ class RENDERLAYER_PT_eevee_ambient_occlusion(RenderLayerButtonsPanel, Panel):
         col.template_override_property(layer_props, scene_props, "gtao_quality")
 
 
-class RENDERLAYER_PT_eevee_motion_blur(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_motion_blur(ViewLayerButtonsPanel, Panel):
     bl_label = "Motion Blur"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -199,7 +199,7 @@ class RENDERLAYER_PT_eevee_motion_blur(RenderLayerButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         self.layout.template_override_property(layer_props, scene_props, "motion_blur_enable", text="")
@@ -208,7 +208,7 @@ class RENDERLAYER_PT_eevee_motion_blur(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -216,7 +216,7 @@ class RENDERLAYER_PT_eevee_motion_blur(RenderLayerButtonsPanel, Panel):
         col.template_override_property(layer_props, scene_props, "motion_blur_shutter")
 
 
-class RENDERLAYER_PT_eevee_depth_of_field(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_depth_of_field(ViewLayerButtonsPanel, Panel):
     bl_label = "Depth Of Field"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -229,7 +229,7 @@ class RENDERLAYER_PT_eevee_depth_of_field(RenderLayerButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         self.layout.template_override_property(layer_props, scene_props, "dof_enable", text="")
@@ -238,7 +238,7 @@ class RENDERLAYER_PT_eevee_depth_of_field(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -246,7 +246,7 @@ class RENDERLAYER_PT_eevee_depth_of_field(RenderLayerButtonsPanel, Panel):
         col.template_override_property(layer_props, scene_props, "bokeh_threshold")
 
 
-class RENDERLAYER_PT_eevee_bloom(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_bloom(ViewLayerButtonsPanel, Panel):
     bl_label = "Bloom"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -259,7 +259,7 @@ class RENDERLAYER_PT_eevee_bloom(RenderLayerButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         self.layout.template_override_property(layer_props, scene_props, "bloom_enable", text="")
@@ -268,7 +268,7 @@ class RENDERLAYER_PT_eevee_bloom(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -280,7 +280,7 @@ class RENDERLAYER_PT_eevee_bloom(RenderLayerButtonsPanel, Panel):
         col.template_override_property(layer_props, scene_props, "bloom_clamp")
 
 
-class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_volumetric(ViewLayerButtonsPanel, Panel):
     bl_label = "Volumetric"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -293,7 +293,7 @@ class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         self.layout.template_override_property(layer_props, scene_props, "volumetric_enable", text="")
@@ -302,7 +302,7 @@ class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -318,7 +318,7 @@ class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel):
         col.template_override_property(layer_props, scene_props, "volumetric_colored_transmittance")
 
 
-class RENDERLAYER_PT_eevee_subsurface_scattering(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_subsurface_scattering(ViewLayerButtonsPanel, Panel):
     bl_label = "Subsurface Scattering"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -331,7 +331,7 @@ class RENDERLAYER_PT_eevee_subsurface_scattering(RenderLayerButtonsPanel, Panel)
     def draw_header(self, context):
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         self.layout.template_override_property(layer_props, scene_props, "sss_enable", text="")
@@ -340,7 +340,7 @@ class RENDERLAYER_PT_eevee_subsurface_scattering(RenderLayerButtonsPanel, Panel)
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -348,7 +348,7 @@ class RENDERLAYER_PT_eevee_subsurface_scattering(RenderLayerButtonsPanel, Panel)
         col.template_override_property(layer_props, scene_props, "sss_jitter_threshold")
 
 
-class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_screen_space_reflections(ViewLayerButtonsPanel, Panel):
     bl_label = "Screen Space Reflections"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -361,7 +361,7 @@ class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Pan
     def draw_header(self, context):
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         self.layout.template_override_property(layer_props, scene_props, "ssr_enable", text="")
@@ -370,7 +370,7 @@ class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Pan
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -384,7 +384,7 @@ class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Pan
         col.template_override_property(layer_props, scene_props, "ssr_firefly_fac")
 
 
-class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_shadows(ViewLayerButtonsPanel, Panel):
     bl_label = "Shadows"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -398,7 +398,7 @@ class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -407,7 +407,7 @@ class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel):
         col.template_override_property(layer_props, scene_props, "shadow_high_bitdepth")
 
 
-class RENDERLAYER_PT_eevee_sampling(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_sampling(ViewLayerButtonsPanel, Panel):
     bl_label = "Sampling"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -421,14 +421,14 @@ class RENDERLAYER_PT_eevee_sampling(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
         col.template_override_property(layer_props, scene_props, "taa_samples")
 
 
-class RENDERLAYER_PT_eevee_indirect_lighting(RenderLayerButtonsPanel, Panel):
+class VIEWLAYER_PT_eevee_indirect_lighting(ViewLayerButtonsPanel, Panel):
     bl_label = "Indirect Lighting"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_EEVEE'}
@@ -442,7 +442,7 @@ class RENDERLAYER_PT_eevee_indirect_lighting(RenderLayerButtonsPanel, Panel):
         layout = self.layout
         scene = context.scene
         scene_props = scene.layer_properties['BLENDER_EEVEE']
-        layer = bpy.context.render_layer
+        layer = bpy.context.view_layer
         layer_props = layer.engine_overrides['BLENDER_EEVEE']
 
         col = layout.column()
@@ -450,21 +450,21 @@ class RENDERLAYER_PT_eevee_indirect_lighting(RenderLayerButtonsPanel, Panel):
 
 
 classes = (
-    RENDERLAYER_UL_renderlayers,
-    RENDERLAYER_PT_layers,
-    RENDERLAYER_UL_renderviews,
-    RENDERLAYER_PT_views,
-    RENDERLAYER_PT_clay_settings,
-    RENDERLAYER_PT_eevee_sampling,
-    RENDERLAYER_PT_eevee_shadows,
-    RENDERLAYER_PT_eevee_indirect_lighting,
-    RENDERLAYER_PT_eevee_subsurface_scattering,
-    RENDERLAYER_PT_eevee_screen_space_reflections,
-    RENDERLAYER_PT_eevee_ambient_occlusion,
-    RENDERLAYER_PT_eevee_volumetric,
-    RENDERLAYER_PT_eevee_motion_blur,
-    RENDERLAYER_PT_eevee_depth_of_field,
-    RENDERLAYER_PT_eevee_bloom,
+    VIEWLAYER_UL_viewlayers,
+    VIEWLAYER_PT_layers,
+    VIEWLAYER_UL_renderviews,
+    VIEWLAYER_PT_views,
+    VIEWLAYER_PT_clay_settings,
+    VIEWLAYER_PT_eevee_sampling,
+    VIEWLAYER_PT_eevee_shadows,
+    VIEWLAYER_PT_eevee_indirect_lighting,
+    VIEWLAYER_PT_eevee_subsurface_scattering,
+    VIEWLAYER_PT_eevee_screen_space_reflections,
+    VIEWLAYER_PT_eevee_ambient_occlusion,
+    VIEWLAYER_PT_eevee_volumetric,
+    VIEWLAYER_PT_eevee_motion_blur,
+    VIEWLAYER_PT_eevee_depth_of_field,
+    VIEWLAYER_PT_eevee_bloom,
 )
 
 if __name__ == "__main__":  # only for live edit.
index 24d3ed5a0bfd1bf1805c379418d77159c05258be..dfc164592b7ca60f02b31676a24537b8e608dd4d 100644 (file)
@@ -194,7 +194,7 @@ class IMAGE_MT_image(Menu):
 
         show_render = sima.show_render
 
-        layout.operator("image.read_renderlayers")
+        layout.operator("image.read_viewlayers")
 
         layout.operator("image.save_dirty", text="Save All Images")
 
index aa999e72f7d8dd09cab5f98a5ab390c3d1a2017f..8c7fcb29ad2338968d38d45621d95fb287ac4678 100644 (file)
@@ -31,7 +31,7 @@ class INFO_HT_header(Header):
         workspace = context.workspace
         screen = context.screen
         scene = context.scene
-        layer = context.render_layer
+        layer = context.view_layer
         view_render = workspace.view_render
 
         row = layout.row(align=True)
@@ -56,7 +56,7 @@ class INFO_HT_header(Header):
 
         row = layout.row()
         row.active = not workspace.use_scene_settings
-        row.template_search(workspace, "render_layer", scene, "render_layers")
+        row.template_search(workspace, "view_layer", scene, "view_layers")
 
         if view_render.has_multiple_engines:
             row.prop(view_render, "engine", text="")
@@ -86,7 +86,7 @@ class INFO_HT_header(Header):
             return
 
         row.operator("wm.splash", text="", icon='BLENDER', emboss=False)
-        row.label(text=scene.statistics(context.render_layer), translate=False)
+        row.label(text=scene.statistics(context.view_layer), translate=False)
 
 
 class INFO_MT_editor_menus(Menu):
index 612ac8e4c40fa8809700d4fde213c2f5813090bc..2f98585f5383bf18e41464bd2140810f7ae20558 100644 (file)
@@ -81,8 +81,8 @@ class NODE_HT_header(Header):
                     row.prop(snode_id, "use_nodes")
 
             if use_shading_nodes and snode.shader_type == 'LINESTYLE':
-                rl = context.scene.render_layers.active
-                lineset = rl.freestyle_settings.linesets.active
+                view_layer = context.scene.view_layers.active
+                lineset = view_layer.freestyle_settings.linesets.active
                 if lineset is not None:
                     row = layout.row()
                     row.enabled = not snode.pin
@@ -272,7 +272,7 @@ class NODE_MT_node(Menu):
 
         layout.separator()
 
-        layout.operator("node.read_renderlayers")
+        layout.operator("node.read_viewlayers")
         layout.operator("node.read_fullsamplelayers")
 
 
index 417690157619da9a932e38bd1942d6816636b197..945f82e88275ae2bfe8e0850927171df5ee5900d 100644 (file)
@@ -168,7 +168,7 @@ static bool export_object(const ExportSettings * const settings, const Base * co
 
 /* ************************************************************************** */
 
-AbcExporter::AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, SceneLayer *scene_layer,
+AbcExporter::AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer,
                          Depsgraph *depsgraph,
                          const char *filename, ExportSettings &settings)
     : m_bmain(bmain)
@@ -178,7 +178,7 @@ AbcExporter::AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene,
     , m_shape_sampling_index(0)
     , m_eval_ctx(eval_ctx)
     , m_scene(scene)
-    , m_scene_layer(scene_layer)
+    , m_view_layer(view_layer)
     , m_depsgraph(depsgraph)
     , m_writer(NULL)
 {}
@@ -364,7 +364,7 @@ void AbcExporter::operator()(Main *bmain, float &progress, bool &was_canceled)
 
 void AbcExporter::createTransformWritersHierarchy(EvaluationContext *eval_ctx)
 {
-       for (Base *base = static_cast<Base *>(m_settings.scene_layer->object_bases.first); base; base = base->next) {
+       for (Base *base = static_cast<Base *>(m_settings.view_layer->object_bases.first); base; base = base->next) {
                Object *ob = base->object;
 
                if (export_object(&m_settings, base, false)) {
@@ -495,7 +495,7 @@ AbcTransformWriter * AbcExporter::createTransformWriter(EvaluationContext *eval_
 
 void AbcExporter::createShapeWriters(EvaluationContext *eval_ctx)
 {
-       for (Base *base = static_cast<Base *>(m_settings.scene_layer->object_bases.first); base; base = base->next) {
+       for (Base *base = static_cast<Base *>(m_settings.view_layer->object_bases.first); base; base = base->next) {
                exploreObject(eval_ctx, base, NULL);
        }
 }
@@ -657,5 +657,5 @@ void AbcExporter::setCurrentFrame(Main *bmain, double t)
 {
        m_scene->r.cfra = static_cast<int>(t);
        m_scene->r.subframe = static_cast<float>(t) - m_scene->r.cfra;
-       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, m_depsgraph, bmain, m_scene, m_scene_layer);
+       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, m_depsgraph, bmain, m_scene, m_view_layer);
 }
index 7e25384ff0df3b448c7674f7facde80ea6280c3a..2a34ad2b25d9db9e954dce6bb7928cb312a08958 100644 (file)
@@ -39,14 +39,14 @@ struct Depsgraph;
 struct Main;
 struct Object;
 struct Scene;
-struct SceneLayer;
+struct ViewLayer;
 struct Base;
 
 struct ExportSettings {
        ExportSettings();
 
        Scene *scene;
-       SceneLayer *scene_layer;  // Scene layer to export; all its objects will be exported, unless selected_only=true
+       ViewLayer *view_layer;  // Scene layer to export; all its objects will be exported, unless selected_only=true
        Depsgraph *depsgraph;
        SimpleLogger logger;
 
@@ -95,7 +95,7 @@ class AbcExporter {
 
        EvaluationContext *m_eval_ctx;
        Scene *m_scene;
-       SceneLayer *m_scene_layer;
+       ViewLayer *m_view_layer;
        Depsgraph *m_depsgraph;
 
        ArchiveWriter *m_writer;
@@ -107,7 +107,7 @@ class AbcExporter {
        std::vector<AbcObjectWriter *> m_shapes;
 
 public:
-       AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, SceneLayer *scene_layer,
+       AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer,
                    Depsgraph *depsgraph,
                    const char *filename, ExportSettings &settings);
        ~AbcExporter();
index c2fbed471b8d2df10858f1a9e130a6b76f32152b..7003547ead280a018965aff3ceda202df0b2915d 100644 (file)
@@ -232,7 +232,7 @@ static void find_iobject(const IObject &object, IObject &ret,
 struct ExportJobData {
        EvaluationContext eval_ctx;
        Scene *scene;
-       SceneLayer *scene_layer;
+       ViewLayer *view_layer;
        Depsgraph *depsgraph;
        Main *bmain;
 
@@ -265,8 +265,8 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo
 
        try {
                Scene *scene = data->scene;
-               SceneLayer *scene_layer = data->scene_layer;
-               AbcExporter exporter(data->bmain, &data->eval_ctx, scene, scene_layer, data->depsgraph, data->filename, data->settings);
+               ViewLayer *view_layer = data->view_layer;
+               AbcExporter exporter(data->bmain, &data->eval_ctx, scene, view_layer, data->depsgraph, data->filename, data->settings);
 
                const int orig_frame = CFRA;
 
@@ -276,7 +276,7 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo
                if (CFRA != orig_frame) {
                        CFRA = orig_frame;
 
-                       BKE_scene_graph_update_for_newframe(data->bmain->eval_ctx, data->depsgraph, data->bmain, scene, data->scene_layer);
+                       BKE_scene_graph_update_for_newframe(data->bmain->eval_ctx, data->depsgraph, data->bmain, scene, data->view_layer);
                }
 
                data->export_ok = !data->was_canceled;
@@ -318,7 +318,7 @@ bool ABC_export(
        CTX_data_eval_ctx(C, &job->eval_ctx);
 
        job->scene = scene;
-       job->scene_layer = CTX_data_scene_layer(C);
+       job->view_layer = CTX_data_view_layer(C);
        job->depsgraph = CTX_data_depsgraph(C);
        job->bmain = CTX_data_main(C);
        job->export_ok = false;
@@ -347,7 +347,7 @@ bool ABC_export(
         * Later in the 2.8 development process this may be replaced by using
         * a specific collection for Alembic I/O, which can then be toggled
         * between "real" objects and cached Alembic files. */
-       job->settings.scene_layer = CTX_data_scene_layer(C);
+       job->settings.view_layer = CTX_data_view_layer(C);
 
        job->settings.frame_start = params->frame_start;
        job->settings.frame_end = params->frame_end;
@@ -634,7 +634,7 @@ enum {
 struct ImportJobData {
        Main *bmain;
        Scene *scene;
-       SceneLayer *scene_layer;
+       ViewLayer *view_layer;
 
        char filename[1024];
        ImportSettings settings;
@@ -837,16 +837,16 @@ static void import_endjob(void *user_data)
                /* Add object to scene. */
                Base *base;
                LayerCollection *lc;
-               SceneLayer *scene_layer = data->scene_layer;
+               ViewLayer *view_layer = data->view_layer;
 
-               BKE_scene_layer_base_deselect_all(scene_layer);
+               BKE_view_layer_base_deselect_all(view_layer);
 
-               lc = BKE_layer_collection_get_active(scene_layer);
+               lc = BKE_layer_collection_get_active(view_layer);
                if (lc == NULL) {
-                       BLI_assert(BLI_listbase_count_ex(&scene_layer->layer_collections, 1) == 0);
-                       /* when there is no collection linked to this SceneLayer, create one */
+                       BLI_assert(BLI_listbase_count_ex(&view_layer->layer_collections, 1) == 0);
+                       /* when there is no collection linked to this ViewLayer, create one */
                        SceneCollection *sc = BKE_collection_add(data->scene, NULL, NULL);
-                       lc = BKE_collection_link(scene_layer, sc);
+                       lc = BKE_collection_link(view_layer, sc);
                }
 
                for (iter = data->readers.begin(); iter != data->readers.end(); ++iter) {
@@ -855,8 +855,8 @@ static void import_endjob(void *user_data)
 
                        BKE_collection_object_add(data->scene, lc->scene_collection, ob);
 
-                       base = BKE_scene_layer_base_find(scene_layer, ob);
-                       BKE_scene_layer_base_select(scene_layer, base);
+                       base = BKE_view_layer_base_find(view_layer, ob);
+                       BKE_view_layer_base_select(view_layer, base);
 
                        DEG_id_tag_update_ex(data->bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
                }
@@ -904,7 +904,7 @@ bool ABC_import(bContext *C, const char *filepath, float scale, bool is_sequence
        ImportJobData *job = new ImportJobData();
        job->bmain = CTX_data_main(C);
        job->scene = CTX_data_scene(C);
-       job->scene_layer = CTX_data_scene_layer(C);
+       job->view_layer = CTX_data_view_layer(C);
        job->import_ok = false;
        BLI_strncpy(job->filename, filepath, 1024);
 
index ae87f1097d13cd3646b6d37b186b37e2c30e53bb..8d326c6441c68175aace16bb105c2a9b0f494fa0 100644 (file)
@@ -28,7 +28,7 @@
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         280
-#define BLENDER_SUBVERSION      1
+#define BLENDER_SUBVERSION      2
 /* Several breakages with 270, e.g. constraint deg vs rad */
 #define BLENDER_MINVERSION      270
 #define BLENDER_MINSUBVERSION   6
index 27264100f1bce8ca4795f82143f3c1cce8024928..596a1cd1cc5fddc7f8d67e27253a352677f4e2da 100644 (file)
@@ -44,7 +44,7 @@ struct Object;
 struct RegionView3D;
 struct RenderData;
 struct Scene;
-struct SceneLayer;
+struct ViewLayer;
 struct rctf;
 struct View3D;
 struct GPUFXSettings;
@@ -129,7 +129,7 @@ void BKE_camera_view_frame(
         float r_vec[4][3]);
 
 bool BKE_camera_view_frame_fit_to_scene(
-        struct Scene *scene, struct SceneLayer *sl, struct Object *camera_ob,
+        struct Scene *scene, struct ViewLayer *sl, struct Object *camera_ob,
         float r_co[3], float *r_scale);
 bool BKE_camera_view_frame_fit_to_coords(
         const struct Scene *scene,
index 7b071dc01a560d056a530f4f8d3ecc92c6909c61..0bce2a6317ce19d37b90e456185eb5b2f314996f 100644 (file)
@@ -50,7 +50,7 @@ struct PointerRNA;
 struct ReportList;
 struct Scene;
 struct SceneCollection;
-struct SceneLayer;
+struct ViewLayer;
 struct ScrArea;
 struct SpaceLink;
 struct View3D;
@@ -252,7 +252,7 @@ struct Main *CTX_data_main(const bContext *C);
 struct Scene *CTX_data_scene(const bContext *C);
 struct LayerCollection *CTX_data_layer_collection(const bContext *C);
 struct SceneCollection *CTX_data_scene_collection(const bContext *C);
-struct SceneLayer *CTX_data_scene_layer(const bContext *C);
+struct ViewLayer *CTX_data_view_layer(const bContext *C);
 struct ViewRender *CTX_data_view_render(const bContext *C);
 struct RenderEngineType *CTX_data_engine(const bContext *C);
 struct ToolSettings *CTX_data_tool_settings(const bContext *C);
index cee10d2bd562c6c8701ff94e7fe00d9192034c1f..21c900a7f0dfb62523195003c3ce7ad278387da3 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 struct Scene;
-struct SceneLayer;
+struct ViewLayer;
 struct EvaluationContext;
 
 /* Actual surface point        */
index 3b1bb5175a21a176cab222829c34f4049d7de58f..4cc7dc6283f71dfbcef0ad4b92c3c6bdbe3bb0ee 100644 (file)
@@ -51,38 +51,38 @@ struct Object;
 struct RenderEngine;
 struct Scene;
 struct SceneCollection;
-struct SceneLayer;
+struct ViewLayer;
 struct WorkSpace;
 
 void BKE_layer_exit(void);
 
-struct SceneLayer *BKE_scene_layer_from_scene_get(const struct Scene *scene);
-struct SceneLayer *BKE_scene_layer_from_workspace_get(const struct Scene *scene, const struct WorkSpace *workspace);
-struct SceneLayer *BKE_scene_layer_add(struct Scene *scene, const char *name);
+struct ViewLayer *BKE_view_layer_from_scene_get(const struct Scene *scene);
+struct ViewLayer *BKE_view_layer_from_workspace_get(const struct Scene *scene, const struct WorkSpace *workspace);
+struct ViewLayer *BKE_view_layer_add(struct Scene *scene, const char *name);
 
 /* DEPRECATED */
-struct SceneLayer *BKE_scene_layer_context_active_PLACEHOLDER(const struct Scene *scene);
+struct ViewLayer *BKE_view_layer_context_active_PLACEHOLDER(const struct Scene *scene);
 
-void BKE_scene_layer_free(struct SceneLayer *sl);
+void BKE_view_layer_free(struct ViewLayer *sl);
 
-void BKE_scene_layer_selected_objects_tag(struct SceneLayer *sl, const int tag);
+void BKE_view_layer_selected_objects_tag(struct ViewLayer *sl, const int tag);
 
-struct Object *BKE_scene_layer_camera_find(struct SceneLayer *sl);
-struct SceneLayer *BKE_scene_layer_find_from_collection(const struct Scene *scene, struct LayerCollection *lc);
-struct Base *BKE_scene_layer_base_find(struct SceneLayer *sl, struct Object *ob);
-struct Base *BKE_scene_layer_base_find_by_name(struct SceneLayer *sl, struct Object *ob);
-void BKE_scene_layer_base_deselect_all(struct SceneLayer *sl);
-void BKE_scene_layer_base_select(struct SceneLayer *sl, struct Base *selbase);
+struct Object *BKE_view_layer_camera_find(struct ViewLayer *sl);
+struct ViewLayer *BKE_view_layer_find_from_collection(const struct Scene *scene, struct LayerCollection *lc);
+struct Base *BKE_view_layer_base_find(struct ViewLayer *sl, struct Object *ob);
+struct Base *BKE_view_layer_base_find_by_name(struct ViewLayer *sl, struct Object *ob);
+void BKE_view_layer_base_deselect_all(struct ViewLayer *sl);
+void BKE_view_layer_base_select(struct ViewLayer *sl, struct Base *selbase);
 
-void BKE_layer_collection_free(struct SceneLayer *sl, struct LayerCollection *lc);
+void BKE_layer_collection_free(struct ViewLayer *sl, struct LayerCollection *lc);
 
-struct LayerCollection *BKE_layer_collection_get_active(struct SceneLayer *sl);
-struct LayerCollection *BKE_layer_collection_get_active_ensure(struct Scene *scene, struct SceneLayer *sl);
+struct LayerCollection *BKE_layer_collection_get_active(struct ViewLayer *sl);
+struct LayerCollection *BKE_layer_collection_get_active_ensure(struct Scene *scene, struct ViewLayer *sl);
 
-int BKE_layer_collection_count(struct SceneLayer *sl);
+int BKE_layer_collection_count(struct ViewLayer *sl);
 
-struct LayerCollection *BKE_layer_collection_from_index(struct SceneLayer *sl, const int index);
-int BKE_layer_collection_findindex(struct SceneLayer *sl, const struct LayerCollection *lc);
+struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *sl, const int index);
+int BKE_layer_collection_findindex(struct ViewLayer *sl, const struct LayerCollection *lc);
 
 bool BKE_layer_collection_move_above(const struct Scene *scene, struct LayerCollection *lc_dst, struct LayerCollection *lc_src);
 bool BKE_layer_collection_move_below(const struct Scene *scene, struct LayerCollection *lc_dst, struct LayerCollection *lc_src);
@@ -90,14 +90,14 @@ bool BKE_layer_collection_move_into(const struct Scene *scene, struct LayerColle
 
 void BKE_layer_collection_resync(const struct Scene *scene, const struct SceneCollection *sc);
 
-struct LayerCollection *BKE_collection_link(struct SceneLayer *sl, struct SceneCollection *sc);
+struct LayerCollection *BKE_collection_link(struct ViewLayer *sl, struct SceneCollection *sc);
 
-void BKE_collection_unlink(struct SceneLayer *sl, struct LayerCollection *lc);
+void BKE_collection_unlink(struct ViewLayer *sl, struct LayerCollection *lc);
 
-void BKE_collection_enable(struct SceneLayer *sl, struct LayerCollection *lc);
-void BKE_collection_disable(struct SceneLayer *sl, struct LayerCollection *lc);
+void BKE_collection_enable(struct ViewLayer *sl, struct LayerCollection *lc);
+void BKE_collection_disable(struct ViewLayer *sl, struct LayerCollection *lc);
 
-bool BKE_scene_layer_has_collection(struct SceneLayer *sl, const struct SceneCollection *sc);
+bool BKE_view_layer_has_collection(struct ViewLayer *sl, const struct SceneCollection *sc);
 bool BKE_scene_has_object(struct Scene *scene, struct Object *ob);
 
 /* syncing */
@@ -108,8 +108,8 @@ void BKE_layer_sync_object_unlink(const struct Scene *scene, struct SceneCollect
 
 /* override */
 
-void BKE_override_scene_layer_datablock_add(struct SceneLayer *scene_layer, int id_type, const char *data_path, const struct ID *id);
-void BKE_override_scene_layer_int_add(struct SceneLayer *scene_layer, int id_type, const char *data_path, const int value);
+void BKE_override_view_layer_datablock_add(struct ViewLayer *view_layer, int id_type, const char *data_path, const struct ID *id);
+void BKE_override_view_layer_int_add(struct ViewLayer *view_layer, int id_type, const char *data_path, const int value);
 
 void BKE_override_layer_collection_boolean_add(struct LayerCollection *layer_collection, int id_type, const char *data_path, const bool value);
 
@@ -125,14 +125,14 @@ void BKE_layer_collection_engine_settings_create(struct IDProperty *root);
 void BKE_layer_collection_engine_settings_validate_scene(struct Scene *scene);
 void BKE_layer_collection_engine_settings_validate_collection(struct LayerCollection *lc);
 
-struct IDProperty *BKE_scene_layer_engine_evaluated_get(struct SceneLayer *sl, const int type, const char *engine_name);
-struct IDProperty *BKE_scene_layer_engine_layer_get(struct SceneLayer *sl, const int type, const char *engine_name);
-struct IDProperty *BKE_scene_layer_engine_scene_get(struct Scene *scene, const int type, const char *engine_name);
-void BKE_scene_layer_engine_settings_callback_register(struct Main *bmain, const char *engine_name, EngineSettingsCB func);
-void BKE_scene_layer_engine_settings_callback_free(void);
-void BKE_scene_layer_engine_settings_validate_scene(struct Scene *scene);
-void BKE_scene_layer_engine_settings_validate_layer(struct SceneLayer *sl);
-void BKE_scene_layer_engine_settings_create(struct IDProperty *root);
+struct IDProperty *BKE_view_layer_engine_evaluated_get(struct ViewLayer *sl, const int type, const char *engine_name);
+struct IDProperty *BKE_view_layer_engine_layer_get(struct ViewLayer *sl, const int type, const char *engine_name);
+struct IDProperty *BKE_view_layer_engine_scene_get(struct Scene *scene, const int type, const char *engine_name);
+void BKE_view_layer_engine_settings_callback_register(struct Main *bmain, const char *engine_name, EngineSettingsCB func);
+void BKE_view_layer_engine_settings_callback_free(void);
+void BKE_view_layer_engine_settings_validate_scene(struct Scene *scene);
+void BKE_view_layer_engine_settings_validate_layer(struct ViewLayer *view_layer);
+void BKE_view_layer_engine_settings_create(struct IDProperty *root);
 
 void BKE_collection_engine_property_add_float(struct IDProperty *props, const char *name, float value);
 void BKE_collection_engine_property_add_float_array(
@@ -153,12 +153,12 @@ void BKE_collection_engine_property_value_set_bool(struct IDProperty *props, con
 
 void BKE_layer_eval_layer_collection_pre(const struct EvaluationContext *eval_ctx,
                                          struct Scene *scene,
-                                         struct SceneLayer *scene_layer);
+                                         struct ViewLayer *view_layer);
 void BKE_layer_eval_layer_collection(const struct EvaluationContext *eval_ctx,
                                      struct LayerCollection *layer_collection,
                                      struct LayerCollection *parent_layer_collection);
 void BKE_layer_eval_layer_collection_post(const struct EvaluationContext *eval_ctx,
-                                          struct SceneLayer *scene_layer);
+                                          struct ViewLayer *view_layer);
 
 /* iterators */
 
@@ -259,7 +259,7 @@ typedef struct ObjectsRenderableIteratorData {
        struct Scene *scene;
 
        struct {
-               struct SceneLayer *scene_layer;
+               struct ViewLayer *view_layer;
                struct Base *base;
                struct Scene *set;
        } iter;
index 76a36bdf3ff5e35d546ce726855e0898570a0d8f..451823aedf5c41afacd04b353cab1e2f0062a656 100644 (file)
@@ -39,7 +39,7 @@ struct DagNode;
 struct EvaluationContext;
 struct Object;
 struct Scene;
-struct SceneLayer;
+struct ViewLayer;
 struct ListBase;
 struct bArmature;
 struct Main;
index 83bcad0d7991f3b7fd8321a40784de18bc2a1503..39535ffd4031c5372041b7159b49a7727e1d0e34 100644 (file)
@@ -988,7 +988,7 @@ void ntreeCompositTagRender(struct Scene *sce);
 int ntreeCompositTagAnimated(struct bNodeTree *ntree);
 void ntreeCompositTagGenerators(struct bNodeTree *ntree);
 void ntreeCompositUpdateRLayers(struct bNodeTree *ntree);
-void ntreeCompositRegisterPass(struct bNodeTree *ntree, struct Scene *scene, struct SceneLayer *scene_layer, const char *name, int type);
+void ntreeCompositRegisterPass(struct bNodeTree *ntree, struct Scene *scene, struct ViewLayer *view_layer, const char *name, int type);
 void ntreeCompositClearTags(struct bNodeTree *ntree);
 
 struct bNodeSocket *ntreeCompositOutputFileAddSocket(struct bNodeTree *ntree, struct bNode *node,
index 14409c77e6d474d9f4196d663fa0f14b98781445..f346be296a1425b13f8b9292eea09d885af4ecf8 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 
 struct EvaluationContext;
 struct Scene;
-struct SceneLayer;
+struct ViewLayer;
 struct Object;
 struct BoundBox;
 struct View3D;
@@ -89,11 +89,11 @@ struct Object *BKE_object_add_only_object(
         int type, const char *name)
         ATTR_NONNULL(1) ATTR_RETURNS_NONNULL;
 struct Object *BKE_object_add(
-        struct Main *bmain, struct Scene *scene, struct SceneLayer *scene_layer,
+        struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer,
         int type, const char *name)
         ATTR_NONNULL(1, 2, 3) ATTR_RETURNS_NONNULL;
 struct Object *BKE_object_add_from(
-        struct Main *bmain, struct Scene *scene, struct SceneLayer *scene_layer,
+        struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer,
         int type, const char *name, struct Object *ob_src)
         ATTR_NONNULL(1, 2, 3, 6) ATTR_RETURNS_NONNULL;
 void *BKE_object_obdata_add_from_type(
@@ -105,9 +105,9 @@ void BKE_object_lod_add(struct Object *ob);
 void BKE_object_lod_sort(struct Object *ob);
 bool BKE_object_lod_remove(struct Object *ob, int level);
 void BKE_object_lod_update(struct Object *ob, const float camera_position[3]);
-bool BKE_object_lod_is_usable(struct Object *ob, struct SceneLayer *sl);
-struct Object *BKE_object_lod_meshob_get(struct Object *ob, struct SceneLayer *sl);
-struct Object *BKE_object_lod_matob_get(struct Object *ob, struct SceneLayer *sl);
+bool BKE_object_lod_is_usable(struct Object *ob, struct ViewLayer *sl);
+struct Object *BKE_object_lod_meshob_get(struct Object *ob, struct ViewLayer *sl);
+struct Object *BKE_object_lod_matob_get(struct Object *ob, struct ViewLayer *sl);
 
 void BKE_object_copy_data(struct Main *bmain, struct Object *ob_dst, const struct Object *ob_src, const int flag);
 struct Object *BKE_object_copy(struct Main *bmain, const struct Object *ob);
@@ -157,7 +157,7 @@ bool BKE_object_minmax_dupli(struct Scene *scene, struct Object *ob, float r_min
 void BKE_object_foreach_display_point(struct Object *ob, float obmat[4][4],
                                       void (*func_cb)(const float[3], void *), void *user_data);
 void BKE_scene_foreach_display_point(struct Scene *scene,
-                                     struct SceneLayer *sl,
+                                     struct ViewLayer *sl,
                                      void (*func_cb)(const float[3], void *), void *user_data);
 
 bool BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
@@ -261,7 +261,7 @@ typedef enum eObjectSet {
        OB_SET_ALL       /* All Objects      */
 } eObjectSet;
 
-struct LinkNode *BKE_object_relational_superset(struct SceneLayer *scene_layer, eObjectSet objectSet, eObRelationTypes includeFilter);
+struct LinkNode *BKE_object_relational_superset(struct ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter);
 struct LinkNode *BKE_object_groups(struct Object *ob);
 void             BKE_object_groups_clear(struct Object *object);
 
index 3d8f7b7674bb6ae73cdd350961a25be7aece916d..9e1f0e22e8af6079a556d08cf7e096e2361f1465 100644 (file)
@@ -52,7 +52,7 @@ struct PaletteColor;
 struct PBVH;
 struct ReportList;
 struct Scene;
-struct SceneLayer;
+struct ViewLayer;
 struct Sculpt;
 struct StrokeCache;
 struct Tex;
@@ -91,8 +91,8 @@ typedef enum eOverlayControlFlags {
                                                     PAINT_OVERLAY_OVERRIDE_PRIMARY | \
                                                     PAINT_OVERLAY_OVERRIDE_CURSOR)
 
-void BKE_paint_invalidate_overlay_tex(struct Scene *scene, struct SceneLayer *sl, const struct Tex *tex);
-void BKE_paint_invalidate_cursor_overlay(struct Scene *scene, struct SceneLayer *sl, struct CurveMapping *curve);
+void BKE_paint_invalidate_overlay_tex(struct Scene *scene, struct ViewLayer *sl, const struct Tex *tex);
+void BKE_paint_invalidate_cursor_overlay(struct Scene *scene, struct ViewLayer *sl, struct CurveMapping *curve);
 void BKE_paint_invalidate_overlay_all(void);
 eOverlayControlFlags BKE_paint_get_overlay_flags(void);
 void BKE_paint_reset_overlay_invalid(eOverlayControlFlags flag);
@@ -126,7 +126,7 @@ void BKE_paint_cavity_curve_preset(struct Paint *p, int preset);
 
 short BKE_paint_object_mode_from_paint_mode(ePaintMode mode);
 struct Paint *BKE_paint_get_active_from_paintmode(struct Scene *sce, ePaintMode mode);
-struct Paint *BKE_paint_get_active(struct Scene *sce, struct SceneLayer *sl);
+struct Paint *BKE_paint_get_active(struct Scene *sce, struct ViewLayer *sl);
 struct Paint *BKE_paint_get_active_from_context(const struct bContext *C);
 ePaintMode BKE_paintmode_get_active_from_context(const struct bContext *C);
 struct Brush *BKE_paint_brush(struct Paint *paint);
index 406a6b0e982289e0dca73383a0ec4d46b8006c3d..1776872f4555fb092a1218c583baa9509157d4e2 100644 (file)
@@ -63,7 +63,7 @@ struct BVHTreeRay;
 struct BVHTreeRayHit; 
 struct EdgeHash;
 struct EvaluationContext;
-struct SceneLayer;
+struct ViewLayer;
 
 #define PARTICLE_COLLISION_MAX_COLLISIONS 10
 
@@ -297,7 +297,7 @@ void psys_set_current_num(Object *ob, int index);
 
 struct LatticeDeformData *psys_create_lattice_deform_data(struct ParticleSimulationData *sim);
 
-bool psys_in_edit_mode(struct SceneLayer *scene_layer, struct ParticleSystem *psys);
+bool psys_in_edit_mode(struct ViewLayer *view_layer, struct ParticleSystem *psys);
 bool psys_check_enabled(struct Object *ob, struct ParticleSystem *psys, const bool use_render_params);
 bool psys_check_edited(struct ParticleSystem *psys);
 
index ab2c3e863ef5105c63e8defc63e7203287048a70..9a5a9e9e56a6f35cd3c45d0e9a6bc65272749b20 100644 (file)
@@ -90,7 +90,7 @@ struct ParticleKey;
 struct ParticleSystem;
 struct PointCache;
 struct Scene;
-struct SceneLayer;
+struct ViewLayer;
 struct SmokeModifierData;
 struct SoftBody;
 struct RigidBodyWorld;
@@ -187,7 +187,7 @@ typedef struct PTCacheID {
 typedef struct PTCacheBaker {
        struct Main *main;
        struct Scene *scene;
-       struct SceneLayer *scene_layer;
+       struct ViewLayer *view_layer;
        struct Depsgraph *depsgraph;
        int bake;
        int render;
@@ -322,7 +322,7 @@ struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, const st
 /********************** Baking *********************/
 
 /* Bakes cache with cache_step sized jumps in time, not accurate but very fast. */
-void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene, struct SceneLayer *scene_layer);
+void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer);
 
 /* Bake cache or simulate to current frame with settings defined in the baker. */
 void BKE_ptcache_bake(struct PTCacheBaker *baker);
index 2b8278547a40a9184c461d80f30a372b10874c19..bb435df136d19c5f43e69aff6811ea93452a0803 100644 (file)
@@ -45,7 +45,7 @@ struct Object;
 struct RenderData;
 struct Scene;
 struct SceneCollection;
-struct SceneLayer;
+struct ViewLayer;
 struct UnitSettings;
 struct ViewRender;
 struct WorkSpace;
@@ -60,12 +60,12 @@ typedef enum eSceneCopyMethod {
 
 /* Use as the contents of a 'for' loop: for (SETLOOPER(...)) { ... */
 #define SETLOOPER(_sce_basis, _sce_iter, _base)                               \
-       _sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, BKE_scene_layer_from_scene_get(_sce_basis), NULL); \
+       _sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, BKE_view_layer_from_scene_get(_sce_basis), NULL); \
        _base;                                                                    \
        _base = _setlooper_base_step(&_sce_iter, NULL, _base)
 
-#define SETLOOPER_SCENE_LAYER(_sce_basis, _scene_layer, _sce_iter, _base)     \
-       _sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, _scene_layer, NULL);   \
+#define SETLOOPER_VIEW_LAYER(_sce_basis, _view_layer, _sce_iter, _base)     \
+       _sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, _view_layer, NULL);   \
        _base;                                                                    \
        _base = _setlooper_base_step(&_sce_iter, NULL, _base)
 
@@ -74,7 +74,7 @@ typedef enum eSceneCopyMethod {
        _base;                                                                    \
        _base = _setlooper_base_step(&_sce_iter, NULL, _base)
 
-struct Base *_setlooper_base_step(struct Scene **sce_iter, struct SceneLayer *scene_layer, struct Base *base);
+struct Base *_setlooper_base_step(struct Scene **sce_iter, struct ViewLayer *view_layer, struct Base *base);
 
 void free_avicodecdata(struct AviCodecData *acd);
 
@@ -103,7 +103,7 @@ int BKE_scene_base_iter_next(
         const struct EvaluationContext *eval_ctx, struct SceneBaseIter *iter,
         struct Scene **scene, int val, struct Base **base, struct Object **ob);
 
-void BKE_scene_base_flag_to_objects(struct SceneLayer *scene_layer);
+void BKE_scene_base_flag_to_objects(struct ViewLayer *view_layer);
 void BKE_scene_base_flag_from_objects(struct Scene *scene);
 void BKE_scene_object_base_flag_sync_from_base(struct Base *base);
 void BKE_scene_object_base_flag_sync_from_object(struct Base *base);
@@ -140,13 +140,13 @@ void BKE_scene_graph_update_tagged(struct EvaluationContext *eval_ctx,
                                    struct Depsgraph *depsgraph,
                                    struct Main *bmain,
                                    struct Scene *scene,
-                                   struct SceneLayer *scene_layer);
+                                   struct ViewLayer *view_layer);
 
 void BKE_scene_graph_update_for_newframe(struct EvaluationContext *eval_ctx,
                                          struct Depsgraph *depsgraph,
                                          struct Main *bmain,
                                          struct Scene *scene,
-                                         struct SceneLayer *scene_layer);
+                                         struct ViewLayer *view_layer);
 
 struct SceneRenderView *BKE_scene_add_render_view(struct Scene *sce, const char *name);
 bool BKE_scene_remove_render_view(struct Scene *scene, struct SceneRenderView *srv);
@@ -215,7 +215,7 @@ void BKE_scene_allocate_depsgraph_hash(struct Scene *scene);
 void BKE_scene_ensure_depsgraph_hash(struct Scene *scene);
 void BKE_scene_free_depsgraph_hash(struct Scene *scene);
 
-struct Depsgraph *BKE_scene_get_depsgraph(struct Scene *scene, struct SceneLayer *scene_layer, bool allocate);
+struct Depsgraph *BKE_scene_get_depsgraph(struct Scene *scene, struct ViewLayer *view_layer, bool allocate);
 
 #ifdef __cplusplus
 }
index dfb6b47a4e497621bff256b217040ba3f5792604..191f669e24c7d5c8c0f801399dc1aa8fe8b75380 100644 (file)
@@ -423,7 +423,7 @@ struct Sequence *BKE_sequencer_add_movie_strip(struct bContext *C, ListBase *seq
 /* view3d draw callback, run when not in background view */
 typedef struct ImBuf *(*SequencerDrawView)(
         const struct EvaluationContext *eval_ctx, struct Scene *,
-        struct SceneLayer *sl, struct Object *, int, int,
+        struct ViewLayer *sl, struct Object *, int, int,
         unsigned int, int, bool, bool, bool,
         int, int, bool, const char *,
         struct GPUFX *, struct GPUOffScreen *, char[256]);
index b48fa678531d4581aaa0a3f1f6ead691f6bc1363..c53517234426e91e5e4783ad0a968da1825a89fb 100644 (file)
@@ -103,8 +103,8 @@ enum eObjectMode BKE_workspace_object_mode_get(const struct WorkSpace *workspace
 void            BKE_workspace_object_mode_set(struct WorkSpace *workspace, const enum eObjectMode mode) SETTER_ATTRS;
 #endif
 struct ListBase *BKE_workspace_transform_orientations_get(struct WorkSpace *workspace) GETTER_ATTRS;
-struct SceneLayer *BKE_workspace_render_layer_get(const struct WorkSpace *workspace) GETTER_ATTRS;
-void               BKE_workspace_render_layer_set(struct WorkSpace *workspace, struct SceneLayer *layer) SETTER_ATTRS;
+struct ViewLayer *BKE_workspace_view_layer_get(const struct WorkSpace *workspace) GETTER_ATTRS;
+void               BKE_workspace_view_layer_set(struct WorkSpace *workspace, struct ViewLayer *layer) SETTER_ATTRS;
 struct ListBase *BKE_workspace_layouts_get(struct WorkSpace *workspace) GETTER_ATTRS;
 
 const char *BKE_workspace_layout_name_get(const struct WorkSpaceLayout *layout) GETTER_ATTRS;
index f5da88f57f3f356c293115f581deeb768654ea76..60d62b0b39d9e6d8de8d0fd58b87f58566392161 100644 (file)
@@ -2707,7 +2707,7 @@ static void editbmesh_build_data(
 static CustomDataMask object_get_datamask(const Scene *scene, Object *ob, bool *r_need_mapping)
 {
        /* TODO(sergey): Avoid this linear list lookup. */
-       SceneLayer *sl = BKE_scene_layer_context_active_PLACEHOLDER(scene);
+       ViewLayer *sl = BKE_view_layer_context_active_PLACEHOLDER(scene);
        Object *actob = sl->basact ? sl->basact->object : NULL;
        CustomDataMask mask = ob->customdata_mask;
 
index 7a0bf54f1f2d9b6e589d1ec06a12b72518fb3729..62df97c6afa0552686dabd6d80ae513bf28d5e2b 100644 (file)
@@ -279,7 +279,7 @@ void animviz_get_object_motionpaths(Object *ob, ListBase *targets)
 /* update scene for current frame */
 static void motionpaths_calc_update_scene(Main *bmain,
                                           Scene *scene,
-                                          SceneLayer *scene_layer,
+                                          ViewLayer *view_layer,
                                           struct Depsgraph *depsgraph)
 {
        /* Do all updates
@@ -292,7 +292,7 @@ static void motionpaths_calc_update_scene(Main *bmain,
         *
         * TODO(sergey): Use evaluation context dedicated to motion paths.
         */
-       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, scene_layer);
+       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, view_layer);
 }
 
 /* ........ */
@@ -369,7 +369,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
        /* calculate path over requested range */
        for (CFRA = sfra; CFRA <= efra; CFRA++) {
                /* update relevant data for new frame */
-               motionpaths_calc_update_scene(bmain, scene, eval_ctx->scene_layer, eval_ctx->depsgraph);
+               motionpaths_calc_update_scene(bmain, scene, eval_ctx->view_layer, eval_ctx->depsgraph);
                
                /* perform baking for targets */
                motionpaths_calc_bake_targets(scene, targets);
@@ -377,7 +377,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
        
        /* reset original environment */
        CFRA = cfra;
-       motionpaths_calc_update_scene(bmain, scene, eval_ctx->scene_layer, eval_ctx->depsgraph);
+       motionpaths_calc_update_scene(bmain, scene, eval_ctx->view_layer, eval_ctx->depsgraph);
        
        /* clear recalc flags from targets */
        for (mpt = targets->first; mpt; mpt = mpt->next) {
index f249765e016f2f14efb8b03e4e6e785eb1c41b0c..b0c571bf1590ca9e45d580ae238f093618a71e9b 100644 (file)
@@ -120,7 +120,7 @@ bool BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, Re
 {
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
-       SceneLayer *scene_layer = CTX_data_scene_layer(C);
+       ViewLayer *view_layer = CTX_data_view_layer(C);
        Main *mainl = NULL;
        Library *lib;
        BlendHandle *bh;
@@ -132,7 +132,7 @@ bool BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, Re
                return false;
        }
 
-       BKE_scene_layer_base_deselect_all(scene_layer);
+       BKE_view_layer_base_deselect_all(view_layer);
 
        /* tag everything, all untagged data can be made local
         * its also generally useful to know what is new
@@ -145,7 +145,7 @@ bool BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, Re
 
        BLO_library_link_copypaste(mainl, bh);
 
-       BLO_library_link_end(mainl, &bh, flag, scene, scene_layer);
+       BLO_library_link_end(mainl, &bh, flag, scene, view_layer);
 
        /* mark all library linked objects to be updated */
        BKE_main_lib_objects_recalc_all(bmain);
index f6dfb7f922c36ff448912b0b730b9f7ae825f3be..8d61b6723c680a729a0b7bc3c5364a5e783dc069 100644 (file)
@@ -168,7 +168,7 @@ static void setup_app_data(
                 */
                wmWindow *win;
                bScreen *curscreen = NULL;
-               SceneLayer *cur_render_layer;
+               ViewLayer *cur_view_layer;
                bool track_undo_scene;
 
                /* comes from readfile.c */
@@ -181,7 +181,7 @@ static void setup_app_data(
                curscreen = CTX_wm_screen(C);
                /* but use Scene pointer from new file */
                curscene = bfd->curscene;
-               cur_render_layer = bfd->cur_render_layer;
+               cur_view_layer = bfd->cur_view_layer;
 
                track_undo_scene = (mode == LOAD_UNDO && curscreen && curscene && bfd->main->wm.first);
 
@@ -192,9 +192,9 @@ static void setup_app_data(
                if (curscene == NULL) {
                        curscene = BKE_scene_add(bfd->main, "Empty");
                }
-               if (cur_render_layer == NULL) {
+               if (cur_view_layer == NULL) {
                        /* fallback to scene layer */
-                       cur_render_layer = BKE_scene_layer_from_scene_get(curscene);
+                       cur_view_layer = BKE_view_layer_from_scene_get(curscene);
                }
 
                if (track_undo_scene) {
@@ -207,7 +207,7 @@ static void setup_app_data(
                }
 
                /* BKE_blender_globals_clear will free G.main, here we can still restore pointers */
-               blo_lib_link_restore(bfd->main, CTX_wm_manager(C), curscene, cur_render_layer);
+               blo_lib_link_restore(bfd->main, CTX_wm_manager(C), curscene, cur_view_layer);
                if (win) {
                        curscene = win->scene;
                }
index d9280a84678cb5c2f0cc06e01315e09f8f4cecdc..e222c189ddb939ff7c31f2124b92968983c109f5 100644 (file)
@@ -666,7 +666,7 @@ static bool camera_frame_fit_calc_from_data(
 /* don't move the camera, just yield the fit location */
 /* r_scale only valid/useful for ortho cameras */
 bool BKE_camera_view_frame_fit_to_scene(
-        Scene *scene, SceneLayer *sl, Object *camera_ob, float r_co[3], float *r_scale)
+        Scene *scene, ViewLayer *sl, Object *camera_ob, float r_co[3], float *r_scale)
 {
        CameraParams params;
        CameraViewFrameData data_cb;
index 2a1157cf6b46dbb1d7feea6cac8c9fc0a30a6862..25305b1d25a7e5572826e3e1fa73af32d4765413 100644 (file)
@@ -117,12 +117,12 @@ static bool collection_remlink(SceneCollection *sc_parent, SceneCollection *sc_g
 /**
  * Recursively remove any instance of this SceneCollection
  */
-static void layer_collection_remove(SceneLayer *sl, ListBase *lb, const SceneCollection *sc)
+static void layer_collection_remove(ViewLayer *view_layer, ListBase *lb, const SceneCollection *sc)
 {
        LayerCollection *lc = lb->first;
        while (lc) {
                if (lc->scene_collection == sc) {
-                       BKE_layer_collection_free(sl, lc);
+                       BKE_layer_collection_free(view_layer, lc);
                        BLI_remlink(lb, lc);
 
                        LayerCollection *lc_next = lc->next;
@@ -132,13 +132,13 @@ static void layer_collection_remove(SceneLayer *sl, ListBase *lb, const SceneCol
                        /* only the "top-level" layer collections may have the
                         * same SceneCollection in a sibling tree.
                         */
-                       if (lb != &sl->layer_collections) {
+                       if (lb != &view_layer->layer_collections) {
                                return;
                        }
                }
 
                else {
-                       layer_collection_remove(sl, &lc->layer_collections, sc);
+                       layer_collection_remove(view_layer, &lc->layer_collections, sc);
                        lc = lc->next;
                }
        }
@@ -165,9 +165,9 @@ bool BKE_collection_remove(Scene *scene, SceneCollection *sc)
        collection_free(sc, true);
 
        /* check all layers that use this collection and clear them */
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
-               layer_collection_remove(sl, &sl->layer_collections, sc);
-               sl->active_collection = 0;
+       for (ViewLayer *view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
+               layer_collection_remove(view_layer, &view_layer->layer_collections, sc);
+               view_layer->active_collection = 0;
        }
 
        MEM_freeN(sc);
@@ -258,13 +258,13 @@ void BKE_collection_object_add_from(Scene *scene, Object *ob_src, Object *ob_dst
        }
        FOREACH_SCENE_COLLECTION_END
 
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
-               Base *base_src = BKE_scene_layer_base_find(sl, ob_src);
+       for (ViewLayer *view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
+               Base *base_src = BKE_view_layer_base_find(view_layer, ob_src);
                if (base_src != NULL) {
                        if (base_src->collection_properties == NULL) {
                                continue;
                        }
-                       Base *base_dst = BKE_scene_layer_base_find(sl, ob_dst);
+                       Base *base_dst = BKE_view_layer_base_find(view_layer, ob_dst);
                        IDP_MergeGroup(base_dst->collection_properties, base_src->collection_properties, true);
                }
        }
index 0bd79a506731dca0b7191e4b2096b966b5756376..216c1f3adc44479d1e1aea5ac0f260008e5a63c1 100644 (file)
@@ -921,15 +921,15 @@ Scene *CTX_data_scene(const bContext *C)
                return C->data.scene;
 }
 
-SceneLayer *CTX_data_scene_layer(const bContext *C)
+ViewLayer *CTX_data_view_layer(const bContext *C)
 {
-       SceneLayer *sl;
+       ViewLayer *sl;
 
-       if (ctx_data_pointer_verify(C, "render_layer", (void *)&sl)) {
+       if (ctx_data_pointer_verify(C, "view_layer", (void *)&sl)) {
                return sl;
        }
        else {
-               return BKE_scene_layer_from_workspace_get(CTX_data_scene(C), CTX_wm_workspace(C));
+               return BKE_view_layer_from_workspace_get(CTX_data_scene(C), CTX_wm_workspace(C));
        }
 }
 
@@ -957,16 +957,16 @@ RenderEngineType *CTX_data_engine(const bContext *C)
  * This is tricky. Sometimes the user overrides the render_layer
  * but not the scene_collection. In this case what to do?
  *
- * If the scene_collection is linked to the SceneLayer we use it.
- * Otherwise we fallback to the active one of the SceneLayer.
+ * If the scene_collection is linked to the ViewLayer we use it.
+ * Otherwise we fallback to the active one of the ViewLayer.
  */
 LayerCollection *CTX_data_layer_collection(const bContext *C)
 {
-       SceneLayer *sl = CTX_data_scene_layer(C);
+       ViewLayer *sl = CTX_data_view_layer(C);
        LayerCollection *lc;
 
        if (ctx_data_pointer_verify(C, "layer_collection", (void *)&lc)) {
-               if (BKE_scene_layer_has_collection(sl, lc->scene_collection)) {
+               if (BKE_view_layer_has_collection(sl, lc->scene_collection)) {
                        return lc;
                }
        }
@@ -979,7 +979,7 @@ SceneCollection *CTX_data_scene_collection(const bContext *C)
 {
        SceneCollection *sc;
        if (ctx_data_pointer_verify(C, "scene_collection", (void *)&sc)) {
-               if (BKE_scene_layer_has_collection(CTX_data_scene_layer(C), sc)) {
+               if (BKE_view_layer_has_collection(CTX_data_view_layer(C), sc)) {
                        return sc;
                }
        }
@@ -1259,8 +1259,8 @@ int CTX_data_editable_gpencil_strokes(const bContext *C, ListBase *list)
 Depsgraph *CTX_data_depsgraph(const bContext *C)
 {
        Scene *scene = CTX_data_scene(C);
-       SceneLayer *scene_layer = CTX_data_scene_layer(C);
-       return BKE_scene_get_depsgraph(scene, scene_layer, true);
+       ViewLayer *view_layer = CTX_data_view_layer(C);
+       return BKE_scene_get_depsgraph(scene, view_layer, true);
 }
 
 void CTX_data_eval_ctx(const bContext *C, EvaluationContext *eval_ctx)
@@ -1268,9 +1268,9 @@ void CTX_data_eval_ctx(const bContext *C, EvaluationContext *eval_ctx)
        BLI_assert(C != NULL);
 
        Scene *scene = CTX_data_scene(C);
-       SceneLayer *scene_layer = CTX_data_scene_layer(C);
+       ViewLayer *view_layer = CTX_data_view_layer(C);
        RenderEngineType *engine = CTX_data_engine(C);
        DEG_evaluation_context_init_from_scene(eval_ctx,
-                                              scene, scene_layer, engine,
+                                              scene, view_layer, engine,
                                               DAG_EVAL_VIEWPORT);
 }
index 728167efa04cd637664381208c2165f6cbddfdb0..394075c179240e875699fdfe959035a173a45e0b 100644 (file)
@@ -488,7 +488,7 @@ static void scene_setSubframe(Scene *scene, float subframe)
        scene->r.subframe = subframe;
 }
 
-static int surface_getBrushFlags(DynamicPaintSurface *surface, const SceneLayer *sl)
+static int surface_getBrushFlags(DynamicPaintSurface *surface, const ViewLayer *sl)
 {
        Base *base = NULL;
        GroupObject *go = NULL;
@@ -5639,7 +5639,7 @@ static void dynamic_paint_generate_bake_data_cb(void *userdata, const int index)
        }
 }
 
-static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const SceneLayer *sl, Object *ob)
+static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const ViewLayer *sl, Object *ob)
 {
        PaintSurfaceData *sData = surface->data;
        PaintBakeData *bData = sData->bData;
@@ -5783,7 +5783,7 @@ static int dynamicPaint_doStep(const struct EvaluationContext *eval_ctx, Scene *
                GroupObject *go = NULL;
                Object *brushObj = NULL;
                ModifierData *md = NULL;
-               SceneLayer *sl = eval_ctx->scene_layer;
+               ViewLayer *sl = eval_ctx->view_layer;
 
                /* backup current scene frame */
                int scene_frame = scene->r.cfra;
@@ -5941,7 +5941,7 @@ int dynamicPaint_calculateFrame(
                dynamicPaint_applySurfaceDisplace(surface, surface->canvas->dm);
 
        /* update bake data */
-       dynamicPaint_generateBakeData(surface, eval_ctx->scene_layer, cObject);
+       dynamicPaint_generateBakeData(surface, eval_ctx->view_layer, cObject);
 
        /* don't do substeps for first frame */
        if (surface->substeps && (frame != surface->start_frame)) {
index ce3e7dbf931d50c3785bedf983ef1f9b399ed37a..76132b027160c5276e80dc4bdeedc7088fbff1b3 100644 (file)
@@ -213,17 +213,17 @@ ListBase *pdInitEffectors(
         const struct EvaluationContext *eval_ctx, Scene *scene, Object *ob_src, ParticleSystem *psys_src,
         EffectorWeights *weights, bool for_simulation)
 {
-       SceneLayer *sl;
+       ViewLayer *sl;
        Base *base;
        unsigned int layer= ob_src->lay;
        ListBase *effectors = NULL;
 
        /* eval_ctx is NULL during deg build */
        if (eval_ctx) {
-               sl = eval_ctx->scene_layer;
+               sl = eval_ctx->view_layer;
        }
        else {
-               sl = BKE_scene_layer_context_active_PLACEHOLDER(scene);
+               sl = BKE_view_layer_context_active_PLACEHOLDER(scene);
        }
        
        if (weights->group) {
index 39938f819ef3f0ab682068f565f558d848c8f0b1..5e07ad02a0755f9abea376e054629760cb2530db 100644 (file)
@@ -57,9 +57,9 @@
 
 /* prototype */
 struct EngineSettingsCB_Type;
-static void layer_collection_free(SceneLayer *sl, LayerCollection *lc);
-static void layer_collection_objects_populate(SceneLayer *sl, LayerCollection *lc, ListBase *objects);
-static LayerCollection *layer_collection_add(SceneLayer *sl, LayerCollection *parent, SceneCollection *sc);
+static void layer_collection_free(ViewLayer *sl, LayerCollection *lc);
+static void layer_collection_objects_populate(ViewLayer *sl, LayerCollection *lc, ListBase *objects);
+static LayerCollection *layer_collection_add(ViewLayer *sl, LayerCollection *parent, SceneCollection *sc);
 static LayerCollection *find_layer_collection_by_scene_collection(LayerCollection *lc, const SceneCollection *sc);
 static IDProperty *collection_engine_settings_create(struct EngineSettingsCB_Type *ces_type, const bool populate);
 static IDProperty *collection_engine_get(IDProperty *root, const int type, const char *engine_name);
@@ -70,60 +70,60 @@ static void object_bases_iterator_next(BLI_Iterator *iter, const int flag);
 /* RenderLayer */
 
 /**
- * Returns the SceneLayer to be used for rendering
- * Most of the time BKE_scene_layer_from_workspace_get should be used instead
+ * Returns the ViewLayer to be used for rendering
+ * Most of the time BKE_view_layer_from_workspace_get should be used instead
  */
-SceneLayer *BKE_scene_layer_from_scene_get(const Scene *scene)
+ViewLayer *BKE_view_layer_from_scene_get(const Scene *scene)
 {
-       SceneLayer *sl = BLI_findlink(&scene->render_layers, scene->active_layer);
+       ViewLayer *sl = BLI_findlink(&scene->view_layers, scene->active_view_layer);
        BLI_assert(sl);
        return sl;
 }
 
 /**
- * Returns the SceneLayer to be used for drawing, outliner, and other context related areas.
+ * Returns the ViewLayer to be used for drawing, outliner, and other context related areas.
  */
-SceneLayer *BKE_scene_layer_from_workspace_get(const struct Scene *scene, const struct WorkSpace *workspace)
+ViewLayer *BKE_view_layer_from_workspace_get(const struct Scene *scene, const struct WorkSpace *workspace)
 {
        if (BKE_workspace_use_scene_settings_get(workspace)) {
-               return BKE_scene_layer_from_scene_get(scene);
+               return BKE_view_layer_from_scene_get(scene);
        }
        else {
-               return BKE_workspace_render_layer_get(workspace);
+               return BKE_workspace_view_layer_get(workspace);
        }
 }
 
 /**
  * This is a placeholder to know which areas of the code need to be addressed for the Workspace changes.
- * Never use this, you should either use BKE_scene_layer_workspace_active or get SceneLayer explicitly.
+ * Never use this, you should either use BKE_view_layer_workspace_active or get ViewLayer explicitly.
  */
-SceneLayer *BKE_scene_layer_context_active_PLACEHOLDER(const Scene *scene)
+ViewLayer *BKE_view_layer_context_active_PLACEHOLDER(const Scene *scene)
 {
-       return BKE_scene_layer_from_scene_get(scene);
+       return BKE_view_layer_from_scene_get(scene);
 }
 
 /**
  * Add a new renderlayer
  * by default, a renderlayer has the master collection
  */
-SceneLayer *BKE_scene_layer_add(Scene *scene, const char *name)
+ViewLayer *BKE_view_layer_add(Scene *scene, const char *name)
 {
        if (!name) {
                name = DATA_("Render Layer");
        }
 
        IDPropertyTemplate val = {0};
-       SceneLayer *sl = MEM_callocN(sizeof(SceneLayer), "Scene Layer");
-       sl->flag = SCENE_LAYER_RENDER | SCENE_LAYER_FREESTYLE;
+       ViewLayer *sl = MEM_callocN(sizeof(ViewLayer), "Scene Layer");
+       sl->flag = VIEW_LAYER_RENDER | VIEW_LAYER_FREESTYLE;
 
        sl->properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
        layer_engine_settings_init(sl->properties, false);
 
-       BLI_addtail(&scene->render_layers, sl);
+       BLI_addtail(&scene->view_layers, sl);
 
        /* unique name */
        BLI_strncpy_utf8(sl->name, name, sizeof(sl->name));
-       BLI_uniquename(&scene->render_layers, sl, DATA_("SceneLayer"), '.', offsetof(SceneLayer, name), sizeof(sl->name));
+       BLI_uniquename(&scene->view_layers, sl, DATA_("ViewLayer"), '.', offsetof(ViewLayer, name), sizeof(sl->name));
 
        SceneCollection *sc = BKE_collection_master(scene);
        layer_collection_add(sl, NULL, sc);
@@ -138,9 +138,9 @@ SceneLayer *BKE_scene_layer_add(Scene *scene, const char *name)
 }
 
 /**
- * Free (or release) any data used by this SceneLayer.
+ * Free (or release) any data used by this ViewLayer.
  */
-void BKE_scene_layer_free(SceneLayer *sl)
+void BKE_view_layer_free(ViewLayer *sl)
 {
        sl->basact = NULL;
 
@@ -167,7 +167,7 @@ void BKE_scene_layer_free(SceneLayer *sl)
                MEM_freeN(sl->properties_evaluated);
        }
 
-       for (SceneLayerEngineData *sled = sl->drawdata.first; sled; sled = sled->next) {
+       for (ViewLayerEngineData *sled = sl->drawdata.first; sled; sled = sled->next) {
                if (sled->storage) {
                        if (sled->free) {
                                sled->free(sled->storage);
@@ -192,7 +192,7 @@ void BKE_scene_layer_free(SceneLayer *sl)
 /**
  * Tag all the selected objects of a renderlayer
  */
-void BKE_scene_layer_selected_objects_tag(SceneLayer *sl, const int tag)
+void BKE_view_layer_selected_objects_tag(ViewLayer *sl, const int tag)
 {
        for (Base *base = sl->object_bases.first; base; base = base->next) {
                if ((base->flag & BASE_SELECTED) != 0) {
@@ -220,13 +220,13 @@ static bool find_scene_collection_in_scene_collections(ListBase *lb, const Layer
 /**
  * Fallback for when a Scene has no camera to use
  *
- * \param scene_layer: in general you want to use the same SceneLayer that is used
+ * \param view_layer: in general you want to use the same ViewLayer that is used
  * for depsgraph. If rendering you pass the scene active layer, when viewing in the viewport
- * you want to get SceneLayer from context.
+ * you want to get ViewLayer from context.
  */
-Object *BKE_scene_layer_camera_find(SceneLayer *scene_layer)
+Object *BKE_view_layer_camera_find(ViewLayer *view_layer)
 {
-       for (Base *base = scene_layer->object_bases.first; base; base = base->next) {
+       for (Base *base = view_layer->object_bases.first; base; base = base->next) {
                if (base->object->type == OB_CAMERA) {
                        return base->object;
                }
@@ -236,11 +236,11 @@ Object *BKE_scene_layer_camera_find(SceneLayer *scene_layer)
 }
 
 /**
- * Find the SceneLayer a LayerCollection belongs to
+ * Find the ViewLayer a LayerCollection belongs to
  */
-SceneLayer *BKE_scene_layer_find_from_collection(const Scene *scene, LayerCollection *lc)
+ViewLayer *BKE_view_layer_find_from_collection(const Scene *scene, LayerCollection *lc)
 {
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                if (find_scene_collection_in_scene_collections(&sl->layer_collections, lc)) {
                        return sl;
                }
@@ -250,12 +250,12 @@ SceneLayer *BKE_scene_layer_find_from_collection(const Scene *scene, LayerCollec
 
 /* Base */
 
-Base *BKE_scene_layer_base_find(SceneLayer *sl, Object *ob)
+Base *BKE_view_layer_base_find(ViewLayer *sl, Object *ob)
 {
        return BLI_findptr(&sl->object_bases, ob, offsetof(Base, object));
 }
 
-void BKE_scene_layer_base_deselect_all(SceneLayer *sl)
+void BKE_view_layer_base_deselect_all(ViewLayer *sl)
 {
        Base *base;
 
@@ -264,7 +264,7 @@ void BKE_scene_layer_base_deselect_all(SceneLayer *sl)
        }
 }
 
-void BKE_scene_layer_base_select(struct SceneLayer *sl, Base *selbase)
+void BKE_view_layer_base_select(struct ViewLayer *sl, Base *selbase)
 {
        sl->basact = selbase;
        if ((selbase->flag & BASE_SELECTABLED) != 0) {
@@ -272,7 +272,7 @@ void BKE_scene_layer_base_select(struct SceneLayer *sl, Base *selbase)
        }
 }
 
-static void scene_layer_object_base_unref(SceneLayer *sl, Base *base)
+static void view_layer_object_base_unref(ViewLayer *sl, Base *base)
 {
        base->refcount--;
 
@@ -296,10 +296,10 @@ static void scene_layer_object_base_unref(SceneLayer *sl, Base *base)
  * Return the base if existent, or create it if necessary
  * Always bump the refcount
  */
-static Base *object_base_add(SceneLayer *sl, Object *ob)
+static Base *object_base_add(ViewLayer *sl, Object *ob)
 {
        Base *base;
-       base = BKE_scene_layer_base_find(sl, ob);
+       base = BKE_view_layer_base_find(sl, ob);
 
        if (base == NULL) {
                base = MEM_callocN(sizeof(Base), "Object Base");
@@ -318,11 +318,11 @@ static Base *object_base_add(SceneLayer *sl, Object *ob)
 
 /* LayerCollection */
 
-static void layer_collection_objects_unpopulate(SceneLayer *sl, LayerCollection *lc)
+static void layer_collection_objects_unpopulate(ViewLayer *sl, LayerCollection *lc)
 {
        if (sl) {
                for (LinkData *link = lc->object_bases.first; link; link = link->next) {
-                       scene_layer_object_base_unref(sl, link->data);
+                       view_layer_object_base_unref(sl, link->data);
                }
        }
 
@@ -330,10 +330,10 @@ static void layer_collection_objects_unpopulate(SceneLayer *sl, LayerCollection
 }
 
 /**
- * When freeing the entire SceneLayer at once we don't bother with unref
- * otherwise SceneLayer is passed to keep the syncing of the LayerCollection tree
+ * When freeing the entire ViewLayer at once we don't bother with unref
+ * otherwise ViewLayer is passed to keep the syncing of the LayerCollection tree
  */
-static void layer_collection_free(SceneLayer *sl, LayerCollection *lc)
+static void layer_collection_free(ViewLayer *sl, LayerCollection *lc)
 {
        layer_collection_objects_unpopulate(sl, lc);
        BLI_freelistN(&lc->overrides);
@@ -356,10 +356,10 @@ static void layer_collection_free(SceneLayer *sl, LayerCollection *lc)
 }
 
 /**
- * Free (or release) LayerCollection from SceneLayer
+ * Free (or release) LayerCollection from ViewLayer
  * (does not free the LayerCollection itself).
  */
-void BKE_layer_collection_free(SceneLayer *sl, LayerCollection *lc)
+void BKE_layer_collection_free(ViewLayer *sl, LayerCollection *lc)
 {
        layer_collection_free(sl, lc);
 }
@@ -389,7 +389,7 @@ static LayerCollection *collection_from_index(ListBase *lb, const int number, in
 /**
  * Get the collection for a given index
  */
-LayerCollection *BKE_layer_collection_from_index(SceneLayer *sl, const int index)
+LayerCollection *BKE_layer_collection_from_index(ViewLayer *sl, const int index)
 {
        int i = 0;
        return collection_from_index(&sl->layer_collections, index, &i);
@@ -398,7 +398,7 @@ LayerCollection *BKE_layer_collection_from_index(SceneLayer *sl, const int index
 /**
  * Get the active collection
  */
-LayerCollection *BKE_layer_collection_get_active(SceneLayer *sl)
+LayerCollection *BKE_layer_collection_get_active(ViewLayer *sl)
 {
        int i = 0;
        return collection_from_index(&sl->layer_collections, sl->active_collection, &i);
@@ -409,13 +409,13 @@ LayerCollection *BKE_layer_collection_get_active(SceneLayer *sl)
  * Return layer collection to add new object(s).
  * Create one if none exists.
  */
-LayerCollection *BKE_layer_collection_get_active_ensure(Scene *scene, SceneLayer *sl)
+LayerCollection *BKE_layer_collection_get_active_ensure(Scene *scene, ViewLayer *sl)
 {
        LayerCollection *lc = BKE_layer_collection_get_active(sl);
 
        if (lc == NULL) {
                BLI_assert(BLI_listbase_is_empty(&sl->layer_collections));
-               /* When there is no collection linked to this SceneLayer, create one. */
+               /* When there is no collection linked to this ViewLayer, create one. */
                SceneCollection *sc = BKE_collection_add(scene, NULL, NULL);
                lc = BKE_collection_link(sl, sc);
                /* New collection has to be the active one. */
@@ -441,7 +441,7 @@ static int collection_count(ListBase *lb)
  * Get the total number of collections
  * (including all the nested collections)
  */
-int BKE_layer_collection_count(SceneLayer *sl)
+int BKE_layer_collection_count(ViewLayer *sl)
 {
        return collection_count(&sl->layer_collections);
 }
@@ -469,7 +469,7 @@ static int index_from_collection(ListBase *lb, const LayerCollection *lc, int *i
 /**
  * Return -1 if not found
  */
-int BKE_layer_collection_findindex(SceneLayer *sl, const LayerCollection *lc)
+int BKE_layer_collection_findindex(ViewLayer *sl, const LayerCollection *lc)
 {
        int i = 0;
        return index_from_collection(&sl->layer_collections, lc, &i);
@@ -520,13 +520,13 @@ static ListBase *scene_collection_listbase_find(ListBase *lb, SceneCollection *s
 
 /**
  * Nest a LayerCollection into another one
- * Both collections must be from the same SceneLayer, return true if succeded.
+ * Both collections must be from the same ViewLayer, return true if succeded.
  *
  * The LayerCollection will effectively be moved into the
  * new (nested) position. So all the settings, overrides, ... go with it, and
- * if the collection was directly linked to the SceneLayer it's then unlinked.
+ * if the collection was directly linked to the ViewLayer it's then unlinked.
  *
- * For the other SceneLayers we simply resync the tree, without changing directly
+ * For the other ViewLayers we simply resync the tree, without changing directly
  * linked collections (even if they link to the same SceneCollection)
  *
  * \param lc_src LayerCollection to nest into \a lc_dst
@@ -534,7 +534,7 @@ static ListBase *scene_collection_listbase_find(ListBase *lb, SceneCollection *s
  */
 
 static void layer_collection_swap(
-        SceneLayer *sl, ListBase *lb_a, ListBase *lb_b,
+        ViewLayer *sl, ListBase *lb_a, ListBase *lb_b,
         LayerCollection *lc_a, LayerCollection *lc_b)
 {
        if (lb_a == NULL) {
@@ -553,14 +553,14 @@ static void layer_collection_swap(
 
 /**
  * Move \a lc_src into \a lc_dst. Both have to be stored in \a sl.
- * If \a lc_src is directly linked to the SceneLayer it's unlinked
+ * If \a lc_src is directly linked to the ViewLayer it's unlinked
  */
 bool BKE_layer_collection_move_into(const Scene *scene, LayerCollection *lc_dst, LayerCollection *lc_src)
 {
-       SceneLayer *sl = BKE_scene_layer_find_from_collection(scene, lc_src);
+       ViewLayer *sl = BKE_view_layer_find_from_collection(scene, lc_src);
        bool is_directly_linked = false;
 
-       if ((!sl) || (sl != BKE_scene_layer_find_from_collection(scene, lc_dst))) {
+       if ((!sl) || (sl != BKE_view_layer_find_from_collection(scene, lc_dst))) {
                return false;
        }
 
@@ -620,15 +620,15 @@ bool BKE_layer_collection_move_into(const Scene *scene, LayerCollection *lc_dst,
 
 /**
  * Move \a lc_src above \a lc_dst. Both have to be stored in \a sl.
- * If \a lc_src is directly linked to the SceneLayer it's unlinked
+ * If \a lc_src is directly linked to the ViewLayer it's unlinked
  */
 bool BKE_layer_collection_move_above(const Scene *scene, LayerCollection *lc_dst, LayerCollection *lc_src)
 {
-       SceneLayer *sl = BKE_scene_layer_find_from_collection(scene, lc_src);
+       ViewLayer *sl = BKE_view_layer_find_from_collection(scene, lc_src);
        const bool is_directly_linked_src = BLI_findindex(&sl->layer_collections, lc_src) != -1;
        const bool is_directly_linked_dst = BLI_findindex(&sl->layer_collections, lc_dst) != -1;
 
-       if ((!sl) || (sl != BKE_scene_layer_find_from_collection(scene, lc_dst))) {
+       if ((!sl) || (sl != BKE_view_layer_find_from_collection(scene, lc_dst))) {
                return false;
        }
 
@@ -651,7 +651,7 @@ bool BKE_layer_collection_move_above(const Scene *scene, LayerCollection *lc_dst
        /* We don't allow to move above/below a directly linked collection
         * unless the source collection is also directly linked */
        else if (is_directly_linked_dst) {
-               /* Both directly linked to the SceneLayer, just need to swap */
+               /* Both directly linked to the ViewLayer, just need to swap */
                if (is_directly_linked_src) {
                        BLI_remlink(&sl->layer_collections, lc_src);
                        BLI_insertlinkbefore(&sl->layer_collections, lc_dst, lc_src);
@@ -695,15 +695,15 @@ bool BKE_layer_collection_move_above(const Scene *scene, LayerCollection *lc_dst
 
 /**
  * Move \a lc_src below \a lc_dst. Both have to be stored in \a sl.
- * If \a lc_src is directly linked to the SceneLayer it's unlinked
+ * If \a lc_src is directly linked to the ViewLayer it's unlinked
  */
 bool BKE_layer_collection_move_below(const Scene *scene, LayerCollection *lc_dst, LayerCollection *lc_src)
 {
-       SceneLayer *sl = BKE_scene_layer_find_from_collection(scene, lc_src);
+       ViewLayer *sl = BKE_view_layer_find_from_collection(scene, lc_src);
        const bool is_directly_linked_src = BLI_findindex(&sl->layer_collections, lc_src) != -1;
        const bool is_directly_linked_dst = BLI_findindex(&sl->layer_collections, lc_dst) != -1;
 
-       if ((!sl) || (sl != BKE_scene_layer_find_from_collection(scene, lc_dst))) {
+       if ((!sl) || (sl != BKE_view_layer_find_from_collection(scene, lc_dst))) {
                return false;
        }
 
@@ -726,7 +726,7 @@ bool BKE_layer_collection_move_below(const Scene *scene, LayerCollection *lc_dst
        /* We don't allow to move above/below a directly linked collection
         * unless the source collection is also directly linked */
        else if (is_directly_linked_dst) {
-               /* Both directly linked to the SceneLayer, just need to swap */
+               /* Both directly linked to the ViewLayer, just need to swap */
                if (is_directly_linked_src) {
                        BLI_remlink(&sl->layer_collections, lc_src);
                        BLI_insertlinkafter(&sl->layer_collections, lc_dst, lc_src);
@@ -768,7 +768,7 @@ bool BKE_layer_collection_move_below(const Scene *scene, LayerCollection *lc_dst
        return true;
 }
 
-static bool layer_collection_resync(SceneLayer *sl, LayerCollection *lc, const SceneCollection *sc)
+static bool layer_collection_resync(ViewLayer *sl, LayerCollection *lc, const SceneCollection *sc)
 {
        if (lc->scene_collection == sc) {
                ListBase collections = {NULL};
@@ -811,7 +811,7 @@ static bool layer_collection_resync(SceneLayer *sl, LayerCollection *lc, const S
  */
 void BKE_layer_collection_resync(const Scene *scene, const SceneCollection *sc)
 {
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                for (LayerCollection *lc = sl->layer_collections.first; lc; lc = lc->next) {
                        layer_collection_resync(sl, lc, sc);
                }
@@ -824,7 +824,7 @@ void BKE_layer_collection_resync(const Scene *scene, const SceneCollection *sc)
  * Link a collection to a renderlayer
  * The collection needs to be created separately
  */
-LayerCollection *BKE_collection_link(SceneLayer *sl, SceneCollection *sc)
+LayerCollection *BKE_collection_link(ViewLayer *sl, SceneCollection *sc)
 {
        LayerCollection *lc = layer_collection_add(sl, NULL, sc);
        sl->active_collection = BKE_layer_collection_findindex(sl, lc);
@@ -835,7 +835,7 @@ LayerCollection *BKE_collection_link(SceneLayer *sl, SceneCollection *sc)
  * Unlink a collection base from a renderlayer
  * The corresponding collection is not removed from the master collection
  */
-void BKE_collection_unlink(SceneLayer *sl, LayerCollection *lc)
+void BKE_collection_unlink(ViewLayer *sl, LayerCollection *lc)
 {
        BKE_layer_collection_free(sl, lc);
        BLI_remlink(&sl->layer_collections, lc);
@@ -846,7 +846,7 @@ void BKE_collection_unlink(SceneLayer *sl, LayerCollection *lc)
 /**
  * Recursively enable nested collections
  */
-static void layer_collection_enable(SceneLayer *sl, LayerCollection *lc)
+static void layer_collection_enable(ViewLayer *sl, LayerCollection *lc)
 {
        layer_collection_objects_populate(sl, lc, &lc->scene_collection->objects);
 
@@ -857,10 +857,10 @@ static void layer_collection_enable(SceneLayer *sl, LayerCollection *lc)
 
 /**
  * Enable collection
- * Add its objects bases to SceneLayer
+ * Add its objects bases to ViewLayer
  * Depsgraph needs to be rebuilt afterwards
  */
-void BKE_collection_enable(SceneLayer *sl, LayerCollection *lc)
+void BKE_collection_enable(ViewLayer *sl, LayerCollection *lc)
 {
        if ((lc->flag & COLLECTION_DISABLED) == 0) {
                return;
@@ -873,7 +873,7 @@ void BKE_collection_enable(SceneLayer *sl, LayerCollection *lc)
 /**
  * Recursively disable nested collections
  */
-static void layer_collection_disable(SceneLayer *sl, LayerCollection *lc)
+static void layer_collection_disable(ViewLayer *sl, LayerCollection *lc)
 {
        layer_collection_objects_unpopulate(sl, lc);
 
@@ -884,10 +884,10 @@ static void layer_collection_disable(SceneLayer *sl, LayerCollection *lc)
 
 /**
  * Disable collection
- * Remove all its object bases from SceneLayer
+ * Remove all its object bases from ViewLayer
  * Depsgraph needs to be rebuilt afterwards
  */
-void BKE_collection_disable(SceneLayer *sl, LayerCollection *lc)
+void BKE_collection_disable(ViewLayer *sl, LayerCollection *lc)
 {
        if ((lc->flag & COLLECTION_DISABLED) != 0) {
                return;
@@ -897,7 +897,7 @@ void BKE_collection_disable(SceneLayer *sl, LayerCollection *lc)
        layer_collection_disable(sl, lc);
 }
 
-static void layer_collection_object_add(SceneLayer *sl, LayerCollection *lc, Object *ob)
+static void layer_collection_object_add(ViewLayer *sl, LayerCollection *lc, Object *ob)
 {
        Base *base = object_base_add(sl, ob);
 
@@ -922,26 +922,26 @@ static void layer_collection_object_add(SceneLayer *sl, LayerCollection *lc, Obj
        BLI_addtail(&lc->object_bases, BLI_genericNodeN(base));
 }
 
-static void layer_collection_object_remove(SceneLayer *sl, LayerCollection *lc, Object *ob)
+static void layer_collection_object_remove(ViewLayer *sl, LayerCollection *lc, Object *ob)
 {
        Base *base;
-       base = BKE_scene_layer_base_find(sl, ob);
+       base = BKE_view_layer_base_find(sl, ob);
 
        LinkData *link = BLI_findptr(&lc->object_bases, base, offsetof(LinkData, data));
        BLI_remlink(&lc->object_bases, link);
        MEM_freeN(link);
 
-       scene_layer_object_base_unref(sl, base);
+       view_layer_object_base_unref(sl, base);
 }
 
-static void layer_collection_objects_populate(SceneLayer *sl, LayerCollection *lc, ListBase *objects)
+static void layer_collection_objects_populate(ViewLayer *sl, LayerCollection *lc, ListBase *objects)
 {
        for (LinkData *link = objects->first; link; link = link->next) {
                layer_collection_object_add(sl, lc, link->data);
        }
 }
 
-static void layer_collection_populate(SceneLayer *sl, LayerCollection *lc, SceneCollection *sc)
+static void layer_collection_populate(ViewLayer *sl, LayerCollection *lc, SceneCollection *sc)
 {
        layer_collection_objects_populate(sl, lc, &sc->objects);
        layer_collection_objects_populate(sl, lc, &sc->filter_objects);
@@ -951,7 +951,7 @@ static void layer_collection_populate(SceneLayer *sl, LayerCollection *lc, Scene
        }
 }
 
-static LayerCollection *layer_collection_add(SceneLayer *sl, LayerCollection *parent, SceneCollection *sc)
+static LayerCollection *layer_collection_add(ViewLayer *sl, LayerCollection *parent, SceneCollection *sc)
 {
        IDPropertyTemplate val = {0};
        LayerCollection *lc = MEM_callocN(sizeof(LayerCollection), "Collection Base");
@@ -979,7 +979,7 @@ static LayerCollection *layer_collection_add(SceneLayer *sl, LayerCollection *pa
 /**
  * See if render layer has the scene collection linked directly, or indirectly (nested)
  */
-bool BKE_scene_layer_has_collection(SceneLayer *sl, const SceneCollection *sc)
+bool BKE_view_layer_has_collection(ViewLayer *sl, const SceneCollection *sc)
 {
        for (LayerCollection *lc = sl->layer_collections.first; lc; lc = lc->next) {
                if (find_layer_collection_by_scene_collection(lc, sc) != NULL) {
@@ -994,8 +994,8 @@ bool BKE_scene_layer_has_collection(SceneLayer *sl, const SceneCollection *sc)
  */
 bool BKE_scene_has_object(Scene *scene, Object *ob)
 {
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
-               Base *base = BKE_scene_layer_base_find(sl, ob);
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
+               Base *base = BKE_view_layer_base_find(sl, ob);
                if (base) {
                        return true;
                }
@@ -1023,11 +1023,11 @@ static LayerCollection *find_layer_collection_by_scene_collection(LayerCollectio
 }
 
 /**
- * Add a new LayerCollection for all the SceneLayers that have sc_parent
+ * Add a new LayerCollection for all the ViewLayers that have sc_parent
  */
 void BKE_layer_sync_new_scene_collection(Scene *scene, const SceneCollection *sc_parent, SceneCollection *sc)
 {
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                for (LayerCollection *lc = sl->layer_collections.first; lc; lc = lc->next) {
                        LayerCollection *lc_parent = find_layer_collection_by_scene_collection(lc, sc_parent);
                        if (lc_parent) {
@@ -1042,7 +1042,7 @@ void BKE_layer_sync_new_scene_collection(Scene *scene, const SceneCollection *sc
  */
 void BKE_layer_sync_object_link(const Scene *scene, SceneCollection *sc, Object *ob)
 {
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                for (LayerCollection *lc = sl->layer_collections.first; lc; lc = lc->next) {
                        LayerCollection *found = find_layer_collection_by_scene_collection(lc, sc);
                        if (found) {
@@ -1058,7 +1058,7 @@ void BKE_layer_sync_object_link(const Scene *scene, SceneCollection *sc, Object
  */
 void BKE_layer_sync_object_unlink(const Scene *scene, SceneCollection *sc, Object *ob)
 {
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                for (LayerCollection *lc = sl->layer_collections.first; lc; lc = lc->next) {
                        LayerCollection *found = find_layer_collection_by_scene_collection(lc, sc);
                        if (found) {
@@ -1074,18 +1074,18 @@ void BKE_layer_sync_object_unlink(const Scene *scene, SceneCollection *sc, Objec
 /**
  * Add a new datablock override
  */
-void BKE_override_scene_layer_datablock_add(SceneLayer *scene_layer, int id_type, const char *data_path, const ID *id)
+void BKE_override_view_layer_datablock_add(ViewLayer *view_layer, int id_type, const char *data_path, const ID *id)
 {
-       UNUSED_VARS(scene_layer, id_type, data_path, id);
+       UNUSED_VARS(view_layer, id_type, data_path, id);
        TODO_LAYER_OVERRIDE;
 }
 
 /**
  * Add a new int override
  */
-void BKE_override_scene_layer_int_add(SceneLayer *scene_layer, int id_type, const char *data_path, const int value)
+void BKE_override_view_layer_int_add(ViewLayer *view_layer, int id_type, const char *data_path, const int value)
 {
-       UNUSED_VARS(scene_layer, id_type, data_path, value);
+       UNUSED_VARS(view_layer, id_type, data_path, value);
        TODO_LAYER_OVERRIDE;
 }
 
@@ -1102,7 +1102,7 @@ void BKE_override_layer_collection_boolean_add(struct LayerCollection *layer_col
 /* Engine Settings */
 
 ListBase R_layer_collection_engines_settings_callbacks = {NULL, NULL};
-ListBase R_scene_layer_engines_settings_callbacks = {NULL, NULL};
+ListBase R_view_layer_engines_settings_callbacks = {NULL, NULL};
 
 typedef struct EngineSettingsCB_Type {
        struct EngineSettingsCB_Type *next, *prev;
@@ -1128,7 +1128,7 @@ static void create_layer_collection_engine_settings_scene(Scene *scene, EngineSe
        create_engine_settings_scene(scene->collection_properties, es_type);
 }
 
-static void create_scene_layer_engine_settings_scene(Scene *scene, EngineSettingsCB_Type *es_type)
+static void create_view_layer_engine_settings_scene(Scene *scene, EngineSettingsCB_Type *es_type)
 {
        create_engine_settings_scene(scene->layer_properties, es_type);
 }
@@ -1152,22 +1152,22 @@ static void create_layer_collection_engines_settings_scene(Scene *scene, EngineS
        /* Populate the scene with the new settings. */
        create_layer_collection_engine_settings_scene(scene, es_type);
 
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                for (LayerCollection *lc = sl->layer_collections.first; lc; lc = lc->next) {
                        create_layer_collection_engine_settings_collection(lc, es_type);
                }
        }
 }
 
-static void create_scene_layer_engines_settings_scene(Scene *scene, EngineSettingsCB_Type *es_type)
+static void create_view_layer_engines_settings_scene(Scene *scene, EngineSettingsCB_Type *es_type)
 {
        /* Populate the scene with the new settings. */
-       create_scene_layer_engine_settings_scene(scene, es_type);
+       create_view_layer_engine_settings_scene(scene, es_type);
 }
 
-static void create_scene_layer_engines_settings_layer(SceneLayer *sl, EngineSettingsCB_Type *es_type)
+static void create_view_layer_engines_settings_layer(ViewLayer *sl, EngineSettingsCB_Type *es_type)
 {
-       if (BKE_scene_layer_engine_layer_get(sl, COLLECTION_MODE_NONE, es_type->name)) {
+       if (BKE_view_layer_engine_layer_get(sl, COLLECTION_MODE_NONE, es_type->name)) {
                return;
        }
 
@@ -1209,19 +1209,19 @@ void BKE_layer_collection_engine_settings_callback_register(
        }
 }
 
-void BKE_scene_layer_engine_settings_callback_register(
+void BKE_view_layer_engine_settings_callback_register(
         Main *bmain, const char *engine_name, EngineSettingsCB func)
 {
        EngineSettingsCB_Type *es_type =
-               engine_settings_callback_register(engine_name, func, &R_scene_layer_engines_settings_callbacks);
+               engine_settings_callback_register(engine_name, func, &R_view_layer_engines_settings_callbacks);
 
        if (bmain) {
                /* Populate all of the collections of the scene with those settings. */
                for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
-                       create_scene_layer_engines_settings_scene(scene, es_type);
+                       create_view_layer_engines_settings_scene(scene, es_type);
 
-                       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
-                               create_scene_layer_engines_settings_layer(sl, es_type);
+                       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
+                               create_view_layer_engines_settings_layer(sl, es_type);
                        }
                }
        }
@@ -1232,9 +1232,9 @@ void BKE_layer_collection_engine_settings_callback_free(void)
        BLI_freelistN(&R_layer_collection_engines_settings_callbacks);
 }
 
-void BKE_scene_layer_engine_settings_callback_free(void)
+void BKE_view_layer_engine_settings_callback_free(void)
 {
-       BLI_freelistN(&R_scene_layer_engines_settings_callbacks);
+       BLI_freelistN(&R_view_layer_engines_settings_callbacks);
 }
 
 /**
@@ -1331,10 +1331,10 @@ static void layer_collection_create_render_settings(IDProperty *root, const bool
        }
 }
 
-static void scene_layer_create_render_settings(IDProperty *root, const bool populate)
+static void view_layer_create_render_settings(IDProperty *root, const bool populate)
 {
        EngineSettingsCB_Type *es_type;
-       for (es_type = R_scene_layer_engines_settings_callbacks.first; es_type; es_type = es_type->next) {
+       for (es_type = R_view_layer_engines_settings_callbacks.first; es_type; es_type = es_type->next) {
                IDProperty *props = collection_engine_settings_create(es_type, populate);
                IDP_AddToGroup(root, props);
        }
@@ -1432,7 +1432,7 @@ IDProperty *BKE_layer_collection_engine_scene_get(Scene *scene, const int type,
 /**
  * Return scene layer engine settings for specified engine in the scene
  */
-IDProperty *BKE_scene_layer_engine_scene_get(Scene *scene, const int type, const char *engine_name)
+IDProperty *BKE_view_layer_engine_scene_get(Scene *scene, const int type, const char *engine_name)
 {
        return collection_engine_get(scene->layer_properties, type, engine_name);
 }
@@ -1440,7 +1440,7 @@ IDProperty *BKE_scene_layer_engine_scene_get(Scene *scene, const int type, const
 /**
  * Return scene layer engine settings for specified engine
  */
-IDProperty *BKE_scene_layer_engine_layer_get(SceneLayer *sl, const int type, const char *engine_name)
+IDProperty *BKE_view_layer_engine_layer_get(ViewLayer *sl, const int type, const char *engine_name)
 {
        return collection_engine_get(sl->properties, type, engine_name);
 }
@@ -1448,7 +1448,7 @@ IDProperty *BKE_scene_layer_engine_layer_get(SceneLayer *sl, const int type, con
 /**
  * Return scene layer evaluated engine settings for specified engine
  */
-IDProperty *BKE_scene_layer_engine_evaluated_get(SceneLayer *sl, const int type, const char *engine_name)
+IDProperty *BKE_view_layer_engine_evaluated_get(ViewLayer *sl, const int type, const char *engine_name)
 {
        return collection_engine_get(sl->properties_evaluated, type, engine_name);
 }
@@ -1553,7 +1553,7 @@ static void collection_engine_settings_init(IDProperty *root, const bool populat
 static void layer_engine_settings_init(IDProperty *root, const bool populate)
 {
        /* render engines */
-       scene_layer_create_render_settings(root, populate);
+       view_layer_create_render_settings(root, populate);
 
        /* mode engines */
        layer_create_mode_settings(root, populate);
@@ -1572,7 +1572,7 @@ void BKE_layer_collection_engine_settings_create(IDProperty *root)
  * Initialize the render setings
  * It's used mainly for scenes
  */
-void BKE_scene_layer_engine_settings_create(IDProperty *root)
+void BKE_view_layer_engine_settings_create(IDProperty *root)
 {
        layer_engine_settings_init(root, true);
 }
@@ -1586,11 +1586,11 @@ static struct {
                IDProperty *collection_properties;
                IDProperty *render_settings;
        } scene;
-       IDProperty *scene_layer;
+       IDProperty *view_layer;
        IDProperty *layer_collection;
 } root_reference = {
        .scene = {NULL, NULL},
-       .scene_layer = NULL,
+       .view_layer = NULL,
        .layer_collection = NULL,
 };
 
@@ -1618,9 +1618,9 @@ static void engine_settings_validate_init(void)
                layer_engine_settings_init(root_reference.scene.render_settings, true);
        }
 
-       if (root_reference.scene_layer == NULL) {
-               root_reference.scene_layer = IDP_New(IDP_GROUP, &val, ROOT_PROP);
-               layer_engine_settings_init(root_reference.scene_layer, false);
+       if (root_reference.view_layer == NULL) {
+               root_reference.view_layer = IDP_New(IDP_GROUP, &val, ROOT_PROP);
+               layer_engine_settings_init(root_reference.view_layer, false);
        }
 }
 
@@ -1632,7 +1632,7 @@ static void layer_collection_engine_settings_validate_free(void)
        IDProperty *idprops[] = {
            root_reference.scene.render_settings,
            root_reference.scene.collection_properties,
-           root_reference.scene_layer,
+           root_reference.view_layer,
            root_reference.layer_collection,
            NULL,
        };
@@ -1683,7 +1683,7 @@ void BKE_layer_collection_engine_settings_validate_collection(LayerCollection *l
 /**
  * Make sure Scene has all required collection settings.
  */
-void BKE_scene_layer_engine_settings_validate_scene(Scene *scene)
+void BKE_view_layer_engine_settings_validate_scene(Scene *scene)
 {
        if (root_reference.scene.render_settings == NULL) {
                engine_settings_validate_init();
@@ -1692,7 +1692,7 @@ void BKE_scene_layer_engine_settings_validate_scene(Scene *scene)
        if (scene->layer_properties == NULL) {
                IDPropertyTemplate val = {0};
                scene->layer_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
-               BKE_scene_layer_engine_settings_create(scene->layer_properties);
+               BKE_view_layer_engine_settings_create(scene->layer_properties);
        }
        else {
                IDP_MergeGroup(scene->layer_properties, root_reference.scene.render_settings, false);
@@ -1702,13 +1702,13 @@ void BKE_scene_layer_engine_settings_validate_scene(Scene *scene)
 /**
  * Make sure Scene has all required collection settings.
  */
-void BKE_scene_layer_engine_settings_validate_layer(SceneLayer *sl)
+void BKE_view_layer_engine_settings_validate_layer(ViewLayer *sl)
 {
-       if (root_reference.scene_layer == NULL) {
+       if (root_reference.view_layer == NULL) {
                engine_settings_validate_init();
        }
 
-       IDP_MergeGroup(sl->properties, root_reference.scene_layer, false);
+       IDP_MergeGroup(sl->properties, root_reference.view_layer, false);
 }
 
 /* ---------------------------------------------------------------------- */
@@ -1716,7 +1716,7 @@ void BKE_scene_layer_engine_settings_validate_layer(SceneLayer *sl)
 
 static void object_bases_iterator_begin(BLI_Iterator *iter, void *data_in, const int flag)
 {
-       SceneLayer *sl = data_in;
+       ViewLayer *sl = data_in;
        Base *base = sl->object_bases.first;
 
        /* when there are no objects */
@@ -1834,17 +1834,17 @@ void BKE_renderable_objects_iterator_begin(BLI_Iterator *iter, void *data_in)
        ObjectsRenderableIteratorData *data = data_in;
 
        for (Scene *scene = data->scene; scene; scene = scene->set) {
-               for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+               for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                        for (Base *base = sl->object_bases.first; base; base = base->next) {
                                 base->object->id.flag |=  LIB_TAG_DOIT;
                        }
                }
        }
 
-       SceneLayer *scene_layer = data->scene->render_layers.first;
-       data->iter.scene_layer = scene_layer;
+       ViewLayer *view_layer = data->scene->view_layers.first;
+       data->iter.view_layer = view_layer;
 
-       Base base = {(Base *)scene_layer->object_bases.first, NULL};
+       Base base = {(Base *)view_layer->object_bases.first, NULL};
        data->iter.base = &base;
 
        data->iter.set = NULL;
@@ -1873,11 +1873,11 @@ void BKE_renderable_objects_iterator_next(BLI_Iterator *iter)
 
        /* Time to go to the next scene layer. */
        if (data->iter.set == NULL) {
-               while ((data->iter.scene_layer = data->iter.scene_layer->next)) {
-                       SceneLayer *scene_layer = data->iter.scene_layer;
-                       if (scene_layer->flag & SCENE_LAYER_RENDER) {
+               while ((data->iter.view_layer = data->iter.view_layer->next)) {
+                       ViewLayer *view_layer = data->iter.view_layer;
+                       if (view_layer->flag & VIEW_LAYER_RENDER) {
 
-                               Base base_iter = {(Base *)scene_layer->object_bases.first, NULL};
+                               Base base_iter = {(Base *)view_layer->object_bases.first, NULL};
                                data->iter.base = &base_iter;
 
                                BKE_renderable_objects_iterator_next(iter);
@@ -1894,9 +1894,9 @@ void BKE_renderable_objects_iterator_next(BLI_Iterator *iter)
 
        /* Look for an object in the next set. */
        while ((data->iter.set = data->iter.set->set)) {
-               SceneLayer *scene_layer = BKE_scene_layer_from_scene_get(data->iter.set);
+               ViewLayer *view_layer = BKE_view_layer_from_scene_get(data->iter.set);
 
-               Base base_iter = {(Base *)scene_layer->object_bases.first, NULL};
+               Base base_iter = {(Base *)view_layer->object_bases.first, NULL};
                data->iter.base = &base_iter;
 
                BKE_renderable_objects_iterator_next(iter);
@@ -1934,20 +1934,20 @@ static void idproperty_reset(IDProperty **props, IDProperty *props_ref)
 }
 
 void BKE_layer_eval_layer_collection_pre(const struct EvaluationContext *UNUSED(eval_ctx),
-                                         Scene *scene, SceneLayer *scene_layer)
+                                         Scene *scene, ViewLayer *view_layer)
 {
-       DEBUG_PRINT("%s on %s (%p)\n", __func__, scene_layer->name, scene_layer);
-       for (Base *base = scene_layer->object_bases.first; base != NULL; base = base->next) {
+       DEBUG_PRINT("%s on %s (%p)\n", __func__, view_layer->name, view_layer);
+       for (Base *base = view_layer->object_bases.first; base != NULL; base = base->next) {
                base->flag &= ~(BASE_VISIBLED | BASE_SELECTABLED);
                idproperty_reset(&base->collection_properties, scene->collection_properties);
        }
 
        /* Sync properties from scene to scene layer. */
-       idproperty_reset(&scene_layer->properties_evaluated, scene->layer_properties);
-       IDP_MergeGroup(scene_layer->properties_evaluated, scene_layer->properties, true);
+       idproperty_reset(&view_layer->properties_evaluated, scene->layer_properties);
+       IDP_MergeGroup(view_layer->properties_evaluated, view_layer->properties, true);
 
        /* TODO(sergey): Is it always required? */
-       scene_layer->flag |= SCENE_LAYER_ENGINE_DIRTY;
+       view_layer->flag |= VIEW_LAYER_ENGINE_DIRTY;
 }
 
 void BKE_layer_eval_layer_collection(const struct EvaluationContext *UNUSED(eval_ctx),
@@ -1998,11 +1998,11 @@ void BKE_layer_eval_layer_collection(const struct EvaluationContext *UNUSED(eval
 }
 
 void BKE_layer_eval_layer_collection_post(const struct EvaluationContext *UNUSED(eval_ctx),
-                                          SceneLayer *scene_layer)
+                                          ViewLayer *view_layer)
 {
-       DEBUG_PRINT("%s on %s (%p)\n", __func__, scene_layer->name, scene_layer);
+       DEBUG_PRINT("%s on %s (%p)\n", __func__, view_layer->name, view_layer);
        /* if base is not selectabled, clear select */
-       for (Base *base = scene_layer->object_bases.first; base; base = base->next) {
+       for (Base *base = view_layer->object_bases.first; base; base = base->next) {
                if ((base->flag & BASE_SELECTABLED) == 0) {
                        base->flag &= ~BASE_SELECTED;
                }
index d83cd2392fd7098bca3f9317365133aa9190c85d..93bc4be795459903c1b9ba56ed3a5eb0343d481a 100644 (file)
@@ -451,19 +451,19 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
                                }
                                FOREACH_SCENE_COLLECTION_END
 
-                               SceneLayer *scene_layer;
-                               for (scene_layer = scene->render_layers.first; scene_layer; scene_layer = scene_layer->next) {
-                                       for (Base *base = scene_layer->object_bases.first; base; base = base->next) {
+                               ViewLayer *view_layer;
+                               for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
+                                       for (Base *base = view_layer->object_bases.first; base; base = base->next) {
                                                CALLBACK_INVOKE(base->object, IDWALK_NOP);
                                        }
 
-                                       for (FreestyleModuleConfig  *fmc = scene_layer->freestyle_config.modules.first; fmc; fmc = fmc->next) {
+                                       for (FreestyleModuleConfig  *fmc = view_layer->freestyle_config.modules.first; fmc; fmc = fmc->next) {
                                                if (fmc->script) {
                                                        CALLBACK_INVOKE(fmc->script, IDWALK_CB_NOP);
                                                }
                                        }
 
-                                       for (FreestyleLineSet *fls = scene_layer->freestyle_config.linesets.first; fls; fls = fls->next) {
+                                       for (FreestyleLineSet *fls = view_layer->freestyle_config.linesets.first; fls; fls = fls->next) {
                                                if (fls->group) {
                                                        CALLBACK_INVOKE(fls->group, IDWALK_CB_USER);
                                                }
index c82c002ebb14379058bd164526c5d118f35198d7..3a69eb2b86b22d562edbbdf986278c41e6af4aec 100644 (file)
@@ -215,7 +215,7 @@ void BKE_linestyle_make_local(struct Main *bmain, FreestyleLineStyle *linestyle,
 
 FreestyleLineStyle *BKE_linestyle_active_from_scene(Scene *scene)
 {
-       SceneLayer *active_render_layer = BLI_findlink(&scene->render_layers, scene->active_layer);
+       ViewLayer *active_render_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
        if (active_render_layer) {
                FreestyleConfig *config = &active_render_layer->freestyle_config;
                FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config);
index d5cddf34eb5f7b4464db747ccfbc0195fbd12387..1a93746b5152ffb931390d39570fc799b85f50df 100644 (file)
@@ -372,7 +372,7 @@ Object *BKE_mball_basis_find(Scene *scene, Object *basis)
 
        BLI_split_name_num(basisname, &basisnr, basis->id.name + 2, '.');
 
-       for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) {
+       for (ViewLayer *sl = scene->view_layers.first; sl; sl = sl->next) {
                for (Base *base = sl->object_bases.first; base; base = base->next) {
                        Object *ob = base->object;
                        if ((ob->type == OB_MBALL) && !(base->flag & OB_FROMDUPLI)) {
index 972596b0cb140def0276a91022b561a9c9da51be..95394f6be63a79ce5e968c0180d32e6acfd1c67b 100644 (file)
@@ -715,13 +715,13 @@ Object *BKE_object_add_only_object(Main *bmain, int type, const char *name)
 }
 
 
-static Object *object_add_common(Main *bmain, SceneLayer *scene_layer, int type, const char *name)
+static Object *object_add_common(Main *bmain, ViewLayer *view_layer, int type, const char *name)
 {
        Object *ob;
 
        ob = BKE_object_add_only_object(bmain, type, name);
        ob->data = BKE_object_obdata_add_from_type(bmain, type, name);
-       BKE_scene_layer_base_deselect_all(scene_layer);
+       BKE_view_layer_base_deselect_all(view_layer);
 
        DEG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
        return ob;
@@ -731,24 +731,24 @@ static Object *object_add_common(Main *bmain, SceneLayer *scene_layer, int type,
  * General add: to scene, with layer from area and default name
  *
  * Object is added to the active SceneCollection.
- * If there is no linked collection to the active SceneLayer we create a new one.
+ * If there is no linked collection to the active ViewLayer we create a new one.
  */
 /* creates minimum required data, but without vertices etc. */
 Object *BKE_object_add(
-        Main *bmain, Scene *scene, SceneLayer *scene_layer,
+        Main *bmain, Scene *scene, ViewLayer *view_layer,
         int type, const char *name)
 {
        Object *ob;
        Base *base;
        LayerCollection *layer_collection;
 
-       ob = object_add_common(bmain, scene_layer, type, name);
+       ob = object_add_common(bmain, view_layer, type, name);
 
-       layer_collection = BKE_layer_collection_get_active_ensure(scene, scene_layer);
+       layer_collection = BKE_layer_collection_get_active_ensure(scene, view_layer);
        BKE_collection_object_add(scene, layer_collection->scene_collection, ob);
 
-       base = BKE_scene_layer_base_find(scene_layer, ob);
-       BKE_scene_layer_base_select(scene_layer, base);
+       base = BKE_view_layer_base_find(view_layer, ob);
+       BKE_view_layer_base_select(view_layer, base);
 
        return ob;
 }
@@ -759,17 +759,17 @@ Object *BKE_object_add(
  * /param ob_src object to use to determine the collections of the new object.
  */
 Object *BKE_object_add_from(
-        Main *bmain, Scene *scene, SceneLayer *scene_layer,
+        Main *bmain, Scene *scene, ViewLayer *view_layer,
         int type, const char *name, Object *ob_src)
 {
        Object *ob;
        Base *base;
 
-       ob = object_add_common(bmain, scene_layer, type, name);
+       ob = object_add_common(bmain, view_layer, type, name);
        BKE_collection_object_add_from(scene, ob_src, ob);
 
-       base = BKE_scene_layer_base_find(scene_layer, ob);
-       BKE_scene_layer_base_select(scene_layer, base);
+       base = BKE_view_layer_base_find(view_layer, ob);
+       BKE_view_layer_base_select(view_layer, base);
 
        return ob;
 }
@@ -864,7 +864,7 @@ static LodLevel *lod_level_select(Object *ob, const float camera_position[3])
        return current;
 }
 
-bool BKE_object_lod_is_usable(Object *ob, SceneLayer *sl)
+bool BKE_object_lod_is_usable(Object *ob, ViewLayer *sl)
 {
        bool active = (sl) ? ob == OBACT(sl) : false;
        return (ob->mode == OB_MODE_OBJECT || !active);
@@ -880,7 +880,7 @@ void BKE_object_lod_update(Object *ob, const float camera_position[3])
        }
 }
 
-static Object *lod_ob_get(Object *ob, SceneLayer *sl, int flag)
+static Object *lod_ob_get(Object *ob, ViewLayer *sl, int flag)
 {
        LodLevel *current = ob->currentlod;</