Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_object.cpp
| Show First 20 Lines • Show All 535 Lines • ▼ Show 20 Lines | void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph, | ||||
| BlenderObjectCulling culling(scene, b_scene); | BlenderObjectCulling culling(scene, b_scene); | ||||
| /* object loop */ | /* object loop */ | ||||
| bool cancel = false; | bool cancel = false; | ||||
| bool use_portal = false; | bool use_portal = false; | ||||
| const bool show_lights = BlenderViewportParameters(b_v3d).use_scene_lights; | const bool show_lights = BlenderViewportParameters(b_v3d).use_scene_lights; | ||||
| BL::ViewLayer b_view_layer = b_depsgraph.view_layer_eval(); | BL::ViewLayer b_view_layer = b_depsgraph.view_layer_eval(); | ||||
| const bool has_local_view = b_v3d && b_v3d.local_view(); | |||||
| BL::Depsgraph::object_instances_iterator b_instance_iter; | BL::Depsgraph::object_instances_iterator b_instance_iter; | ||||
| for (b_depsgraph.object_instances.begin(b_instance_iter); | for (b_depsgraph.object_instances.begin(b_instance_iter); | ||||
| b_instance_iter != b_depsgraph.object_instances.end() && !cancel; | b_instance_iter != b_depsgraph.object_instances.end() && !cancel; | ||||
| ++b_instance_iter) { | ++b_instance_iter) { | ||||
| BL::DepsgraphObjectInstance b_instance = *b_instance_iter; | BL::DepsgraphObjectInstance b_instance = *b_instance_iter; | ||||
| BL::Object b_ob = b_instance.object(); | BL::Object b_ob = b_instance.object(); | ||||
| /* load per-object culling data */ | /* load per-object culling data */ | ||||
| culling.init_object(scene, b_ob); | culling.init_object(scene, b_ob); | ||||
| /* test if object needs to be hidden */ | /* test if object needs to be hidden */ | ||||
| const bool show_self = b_instance.show_self(); | const bool show_self = b_instance.show_self(); | ||||
| const bool show_local_view = !has_local_view || b_ob.local_view_get(b_v3d, b_view_layer); | |||||
| const bool show_particles = b_instance.show_particles(); | const bool show_particles = b_instance.show_particles(); | ||||
| if (show_self || show_particles) { | if (show_local_view && (show_self || show_particles)) { | ||||
| /* object itself */ | /* object itself */ | ||||
| sync_object(b_depsgraph, | sync_object(b_depsgraph, | ||||
| b_view_layer, | b_view_layer, | ||||
| b_instance, | b_instance, | ||||
| motion_time, | motion_time, | ||||
| show_self, | show_self, | ||||
| show_particles, | show_particles, | ||||
| show_lights, | show_lights, | ||||
| ▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines | |||||