49 bool use_developer_ui,
65 blender::Depsgraph &b_depsgraph,
81 const char *viewname);
82 void sync_view(
const blender::Depsgraph *b_depsgraph,
89 return view_layer.samples;
93 return view_layer.bound_samples;
103 const bool background,
104 const bool use_developer_ui);
123 void sync_lights(blender::Depsgraph &b_depsgraph,
bool update_all,
bool update_time);
124 void sync_materials(blender::Depsgraph &b_depsgraph,
bool update_all,
bool update_time);
125 void sync_objects(blender::Depsgraph &b_depsgraph,
128 const float motion_time = 0.0f);
130 blender::Depsgraph &b_depsgraph,
143 void sync_world(blender::Depsgraph &b_depsgraph,
148 void sync_shaders(blender::Depsgraph &b_depsgraph,
155 bool scene_attr_needs_recalc(
Shader *shader, blender::Depsgraph &b_depsgraph);
156 void resolve_view_layer_attributes(
Shader *shader,
158 blender::Depsgraph &b_depsgraph);
164 const float motion_time,
165 bool use_particle_hair,
172 blender::MeshSequenceCacheModifier &b_mesh_cache,
173 bool has_subdivision);
184 void sync_mesh_motion(
BObjectInfo &b_ob_info,
Mesh *mesh,
int motion_step);
188 void sync_hair_motion(
BObjectInfo &b_ob_info,
Hair *hair,
int motion_step);
189 void sync_hair(
Hair *hair,
BObjectInfo &b_ob_info,
bool motion,
const int motion_step = 0);
190 void sync_particle_hair(
Hair *hair,
194 const int motion_step = 0);
199 void sync_pointcloud_motion(
PointCloud *pointcloud,
201 const int motion_step = 0);
208 const float motion_time);
213 bool use_particle_hair,
218 const float motion_time,
219 bool use_particle_hair,
253 enum ShaderFlags { SHADER_WITH_LAYER_ATTRS };
255 id_map<const void *, Shader, ShaderFlags> shader_map;
259 id_map<ObjectKey, Object> object_map;
260 id_map<void *, Procedural> procedural_map;
261 id_map<GeometryKey, Geometry> geometry_map;
262 id_map<ParticleSystemKey, ParticleSystem> particle_system_map;
263 set<Geometry *> geometry_synced;
264 set<Geometry *> geometry_motion_synced;
265 set<Geometry *> geometry_motion_attribute_synced;
267 map<void *, set<blender::ID *>> instance_geometries_by_object;
268 set<float> motion_times;
271 BlenderViewportParameters viewport_parameters;
275 bool use_adaptive_subdivision =
false;
276 bool use_developer_ui;
281 int max_subdivisions;
283 struct RenderLayerInfo {
286 blender::World *world_override =
nullptr;
287 bool use_background_shader =
true;
288 bool use_surfaces =
true;
289 bool use_hair =
true;
290 bool use_volumes =
true;
291 bool use_motion_blur =
true;
293 bool bound_samples =
false;
301 bool has_updates_ =
true;
303 float frame_last_synced = 0;
static SessionParams get_session_params(blender::RenderEngine &b_engine, blender::UserDef &b_preferences, blender::Scene &b_scene, bool background, float pixelsize)
void sync_data(blender::RenderData &b_render, blender::Depsgraph &b_depsgraph, blender::bScreen *b_screen, blender::View3D *b_v3d, blender::RegionView3D *b_rv3d, const int width, const int height, const DeviceInfo &denoise_device_info)
BlenderSync(blender::RenderEngine &b_engine, blender::Main &b_data, blender::Scene &b_scene, Scene *scene, bool preview, bool use_developer_ui, Progress &progress)
static SceneParams get_scene_params(blender::UserDef &b_preferences, blender::Main &b_data, blender::Scene &b_scene, const bool background, const bool use_developer_ui)