48 BL::BlendData &b_data,
52 bool use_developer_ui,
56 void reset(BL::BlendData &b_data, BL::Scene &b_scene);
61 void sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d);
62 void sync_data(BL::RenderSettings &b_render,
63 BL::Depsgraph &b_depsgraph,
64 BL::SpaceView3D &b_v3d,
65 BL::Object &b_override,
68 void **python_thread_state,
76 BL::Object &b_override,
79 const char *viewname);
80 void sync_view(BL::SpaceView3D &b_v3d, BL::RegionView3D &b_rv3d,
int width,
int height);
83 return view_layer.samples;
87 return view_layer.bound_samples;
95 const bool background,
96 const bool use_developer_ui);
98 BL::Preferences &b_userpref,
103 BL::SpaceView3D &b_v3d, BL::RegionView3D &b_rv3d,
Camera *cam,
int width,
int height);
106 BL::ViewLayer &b_view_layer,
112 void sync_lights(BL::Depsgraph &b_depsgraph,
bool update_all);
113 void sync_materials(BL::Depsgraph &b_depsgraph,
bool update_all);
114 void sync_objects(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d,
float motion_time = 0.0f);
115 void sync_motion(BL::RenderSettings &b_render,
116 BL::Depsgraph &b_depsgraph,
117 BL::SpaceView3D &b_v3d,
118 BL::Object &b_override,
121 void **python_thread_state);
122 void sync_film(BL::ViewLayer &b_view_layer, BL::SpaceView3D &b_v3d);
127 void sync_world(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d,
bool update_all);
128 void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d,
bool update_all);
129 void sync_nodes(
Shader *shader, BL::ShaderNodeTree &b_ntree);
131 bool scene_attr_needs_recalc(
Shader *shader, BL::Depsgraph &b_depsgraph);
132 void resolve_view_layer_attributes(
Shader *shader,
134 BL::Depsgraph &b_depsgraph);
137 Object *sync_object(BL::Depsgraph &b_depsgraph,
138 BL::ViewLayer &b_view_layer,
139 BL::DepsgraphObjectInstance &b_instance,
141 bool use_particle_hair,
146 void sync_object_motion_init(BL::Object &b_parent, BL::Object &b_ob,
Object *
object);
148 void sync_procedural(BL::Object &b_ob,
149 BL::MeshSequenceCacheModifier &b_mesh_cache,
150 bool has_subdivision);
152 bool sync_object_attributes(BL::DepsgraphObjectInstance &b_instance,
Object *
object);
158 void sync_mesh(BL::Depsgraph b_depsgraph,
BObjectInfo &b_ob_info,
Mesh *mesh);
159 void sync_mesh_motion(BL::Depsgraph b_depsgraph,
165 void sync_hair(BL::Depsgraph b_depsgraph,
BObjectInfo &b_ob_info,
Hair *hair);
166 void sync_hair_motion(BL::Depsgraph b_depsgraph,
170 void sync_hair(
Hair *hair,
BObjectInfo &b_ob_info,
bool motion,
int motion_step = 0);
171 void sync_particle_hair(
172 Hair *hair, BL::Mesh &b_mesh,
BObjectInfo &b_ob_info,
bool motion,
int motion_step = 0);
173 bool object_has_particle_hair(BL::Object b_ob);
180 void sync_camera_motion(
181 BL::RenderSettings &b_render, BL::Object &b_ob,
int width,
int height,
float motion_time);
184 Geometry *sync_geometry(BL::Depsgraph &b_depsgraph,
187 bool use_particle_hair,
190 void sync_geometry_motion(BL::Depsgraph &b_depsgraph,
194 bool use_particle_hair,
198 void sync_light(BL::Object &b_parent,
204 void sync_background_light(BL::SpaceView3D &b_v3d,
bool use_portal);
207 bool sync_dupli_particle(BL::Object &b_ob,
208 BL::DepsgraphObjectInstance &b_instance,
216 bool BKE_object_is_modified(BL::Object &b_ob);
218 bool object_can_have_geometry(BL::Object &b_ob);
219 bool object_is_light(BL::Object &b_ob);
220 bool object_is_camera(BL::Object &b_ob);
223 BL::RenderEngine b_engine;
224 BL::BlendData b_data;
227 enum ShaderFlags { SHADER_WITH_LAYER_ATTRS };
235 set<Geometry *> geometry_synced;
236 set<Geometry *> geometry_motion_synced;
237 set<Geometry *> geometry_motion_attribute_synced;
239 map<void *, set<BL::ID>> instance_geometries_by_object;
240 set<float> motion_times;
248 bool use_developer_ui;
251 int max_subdivisions;
253 struct RenderLayerInfo {
257 use_background_shader(
true),
261 use_motion_blur(
true),
268 BL::Material material_override;
269 BL::World world_override;
270 bool use_background_shader;
274 bool use_motion_blur;
284 bool has_updates_ =
true;