diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 18:51:49 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 19:58:01 +0300 |
commit | b79b8478ee3bb1b115c5d6b8bdb0cc74d5169955 (patch) | |
tree | d67b529dc95488186255631660d3251cfb5da5da /intern/cycles/blender | |
parent | 2f9df08aa8eaad1127f1b44aed518e1beaf91df7 (diff) |
Cleanup: Rename ViewLayer *sl > ViewLayer *view_layer
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 60 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.h | 4 |
3 files changed, 34 insertions, 34 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index b2c0a09e14b..1499390f1d5 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -325,14 +325,14 @@ static bool ObtainCacheParticleVcol(Mesh *mesh, return true; } -static void set_resolution(BL::Object *b_ob, BL::Scene *scene, BL::ViewLayer *sl, bool render) +static void set_resolution(BL::Object *b_ob, BL::Scene *scene, BL::ViewLayer *view_layer, bool render) { BL::Object::modifiers_iterator b_mod; for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) { if((b_mod->type() == b_mod->type_PARTICLE_SYSTEM) && ((b_mod->show_viewport()) || (b_mod->show_render()))) { BL::ParticleSystemModifier psmd((const PointerRNA)b_mod->ptr); BL::ParticleSystem b_psys((const PointerRNA)psmd.particle_system().ptr); - b_psys.set_resolution(*scene, *sl, *b_ob, (render)? 2: 1); + b_psys.set_resolution(*scene, *view_layer, *b_ob, (render)? 2: 1); } } } diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 66509ebeef2..f3312e2909f 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -387,14 +387,14 @@ void BlenderSync::sync_view_layers(BL::SpaceView3D& b_v3d, const char *layer) } /* render layer */ - BL::Scene::view_layers_iterator b_rlay; + BL::Scene::view_layers_iterator b_view_layer; bool first_layer = true; uint layer_override = get_layer(b_engine.layer_override()); uint view_layers = layer_override ? layer_override : get_layer(b_scene.layers()); - 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)) { - view_layer.name = b_rlay->name(); + for(b_scene.view_layers.begin(b_view_layer); b_view_layer != b_scene.view_layers.end(); ++b_view_layer) { + if((!layer && first_layer) || (layer && b_view_layer->name() == layer)) { + view_layer.name = b_view_layer->name(); view_layer.holdout_layer = 0; view_layer.exclude_layer = 0; @@ -406,10 +406,10 @@ void BlenderSync::sync_view_layers(BL::SpaceView3D& b_v3d, const char *layer) view_layer.layer |= view_layer.holdout_layer; 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(); + view_layer.use_background_shader = b_view_layer->use_sky(); + view_layer.use_background_ao = b_view_layer->use_ao(); + view_layer.use_surfaces = b_view_layer->use_solid(); + view_layer.use_hair = b_view_layer->use_strand(); view_layer.bound_samples = false; view_layer.samples = 0; @@ -526,7 +526,7 @@ int BlenderSync::get_denoising_pass(BL::RenderPass& b_pass) } array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay, - BL::ViewLayer& b_slay, + BL::ViewLayer& b_view_layer, const SessionParams &session_params) { array<Pass> passes; @@ -549,49 +549,49 @@ array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay, Pass::add(pass_type, passes); } - PointerRNA crp = RNA_pointer_get(&b_slay.ptr, "cycles"); + PointerRNA crp = RNA_pointer_get(&b_view_layer.ptr, "cycles"); if(get_boolean(crp, "denoising_store_passes") && get_boolean(crp, "use_denoising")) { - b_engine.add_pass("Denoising Normal", 3, "XYZ", b_slay.name().c_str()); - b_engine.add_pass("Denoising Normal Variance", 3, "XYZ", b_slay.name().c_str()); - b_engine.add_pass("Denoising Albedo", 3, "RGB", b_slay.name().c_str()); - b_engine.add_pass("Denoising Albedo Variance", 3, "RGB", b_slay.name().c_str()); - b_engine.add_pass("Denoising Depth", 1, "Z", b_slay.name().c_str()); - b_engine.add_pass("Denoising Depth Variance", 1, "Z", b_slay.name().c_str()); - b_engine.add_pass("Denoising Shadow A", 3, "XYV", b_slay.name().c_str()); - b_engine.add_pass("Denoising Shadow B", 3, "XYV", b_slay.name().c_str()); - b_engine.add_pass("Denoising Image", 3, "RGB", b_slay.name().c_str()); - b_engine.add_pass("Denoising Image Variance", 3, "RGB", b_slay.name().c_str()); + b_engine.add_pass("Denoising Normal", 3, "XYZ", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Normal Variance", 3, "XYZ", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Albedo", 3, "RGB", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Albedo Variance", 3, "RGB", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Depth", 1, "Z", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Depth Variance", 1, "Z", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Shadow A", 3, "XYV", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Shadow B", 3, "XYV", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Image", 3, "RGB", b_view_layer.name().c_str()); + b_engine.add_pass("Denoising Image Variance", 3, "RGB", b_view_layer.name().c_str()); } #ifdef __KERNEL_DEBUG__ if(get_boolean(crp, "pass_debug_bvh_traversed_nodes")) { - b_engine.add_pass("Debug BVH Traversed Nodes", 1, "X", b_slay.name().c_str()); + b_engine.add_pass("Debug BVH Traversed Nodes", 1, "X", b_view_layer.name().c_str()); Pass::add(PASS_BVH_TRAVERSED_NODES, passes); } if(get_boolean(crp, "pass_debug_bvh_traversed_instances")) { - b_engine.add_pass("Debug BVH Traversed Instances", 1, "X", b_slay.name().c_str()); + b_engine.add_pass("Debug BVH Traversed Instances", 1, "X", b_view_layer.name().c_str()); Pass::add(PASS_BVH_TRAVERSED_INSTANCES, passes); } if(get_boolean(crp, "pass_debug_bvh_intersections")) { - b_engine.add_pass("Debug BVH Intersections", 1, "X", b_slay.name().c_str()); + b_engine.add_pass("Debug BVH Intersections", 1, "X", b_view_layer.name().c_str()); Pass::add(PASS_BVH_INTERSECTIONS, passes); } if(get_boolean(crp, "pass_debug_ray_bounces")) { - b_engine.add_pass("Debug Ray Bounces", 1, "X", b_slay.name().c_str()); + b_engine.add_pass("Debug Ray Bounces", 1, "X", b_view_layer.name().c_str()); Pass::add(PASS_RAY_BOUNCES, passes); } #endif if(get_boolean(crp, "pass_debug_render_time")) { - b_engine.add_pass("Debug Render Time", 1, "X", b_slay.name().c_str()); + b_engine.add_pass("Debug Render Time", 1, "X", b_view_layer.name().c_str()); Pass::add(PASS_RENDER_TIME, passes); } if(get_boolean(crp, "use_pass_volume_direct")) { - b_engine.add_pass("VolumeDir", 3, "RGB", b_slay.name().c_str()); + b_engine.add_pass("VolumeDir", 3, "RGB", b_view_layer.name().c_str()); Pass::add(PASS_VOLUME_DIRECT, passes); } if(get_boolean(crp, "use_pass_volume_indirect")) { - b_engine.add_pass("VolumeInd", 3, "RGB", b_slay.name().c_str()); + b_engine.add_pass("VolumeInd", 3, "RGB", b_view_layer.name().c_str()); Pass::add(PASS_VOLUME_INDIRECT, passes); } @@ -820,9 +820,9 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, !b_r.use_save_buffers(); if(params.progressive_refine) { - 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"); + BL::Scene::view_layers_iterator b_view_layer; + for(b_scene.view_layers.begin(b_view_layer); b_view_layer != b_scene.view_layers.end(); ++b_view_layer) { + PointerRNA crl = RNA_pointer_get(&b_view_layer->ptr, "cycles"); if(get_boolean(crl, "use_denoising")) { params.progressive_refine = false; } diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h index dd415b1ea9d..c4dd17714be 100644 --- a/intern/cycles/blender/blender_sync.h +++ b/intern/cycles/blender/blender_sync.h @@ -68,8 +68,8 @@ public: void **python_thread_state, const char *layer = 0); void sync_view_layers(BL::SpaceView3D& b_v3d, const char *layer); - array<Pass> sync_render_passes(BL::RenderLayer& b_rlay, - BL::ViewLayer& b_slay, + array<Pass> sync_render_passes(BL::RenderLayer& b_render_layer, + BL::ViewLayer& b_view_layer, const SessionParams &session_params); void sync_integrator(); void sync_camera(BL::RenderSettings& b_render, |