40 BL::BlendData &b_data,
44 bool use_developer_ui,
48 void reset(BL::BlendData &b_data, BL::Scene &b_scene);
55 void sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, BL::RegionView3D &b_rv3d);
56 void sync_data(BL::RenderSettings &b_render,
57 BL::Depsgraph &b_depsgraph,
58 BL::SpaceView3D &b_v3d,
59 BL::Object &b_override,
62 void **python_thread_state,
70 BL::Object &b_override,
73 const char *viewname);
75 BL::RegionView3D &b_rv3d,
80 return view_layer.samples;
84 return view_layer.bound_samples;
92 const bool background,
93 const bool use_developer_ui);
95 BL::Preferences &b_preferences,
100 BL::RegionView3D &b_rv3d,
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,
115 BL::SpaceView3D &b_v3d,
116 const float motion_time = 0.0f);
117 void sync_motion(BL::RenderSettings &b_render,
118 BL::Depsgraph &b_depsgraph,
119 BL::SpaceView3D &b_v3d,
120 BL::Object &b_override,
123 void **python_thread_state);
124 void sync_film(BL::ViewLayer &b_view_layer, BL::SpaceView3D &b_v3d);
129 void sync_world(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d,
bool update_all);
130 void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d,
bool update_all);
131 void sync_nodes(
Shader *shader, BL::ShaderNodeTree &b_ntree);
133 bool scene_attr_needs_recalc(
Shader *shader, BL::Depsgraph &b_depsgraph);
134 void resolve_view_layer_attributes(
Shader *shader,
136 BL::Depsgraph &b_depsgraph);
139 Object *sync_object(BL::ViewLayer &b_view_layer,
140 BL::DepsgraphObjectInstance &b_instance,
141 const float motion_time,
142 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);
159 void sync_mesh_motion(
BObjectInfo &b_ob_info,
Mesh *mesh,
int motion_step);
163 void sync_hair_motion(
BObjectInfo &b_ob_info,
Hair *hair,
int motion_step);
164 void sync_hair(
Hair *hair,
BObjectInfo &b_ob_info,
bool motion,
const int motion_step = 0);
165 void sync_particle_hair(
Hair *hair,
169 const int motion_step = 0);
170 bool object_has_particle_hair(BL::Object b_ob);
174 void sync_pointcloud_motion(
PointCloud *pointcloud,
176 const int motion_step = 0);
179 void sync_camera_motion(BL::RenderSettings &b_render,
183 const float motion_time);
188 bool use_particle_hair,
193 const float motion_time,
194 bool use_particle_hair,
199 void sync_background_light(BL::SpaceView3D &b_v3d);
202 bool sync_dupli_particle(BL::Object &b_ob,
203 BL::DepsgraphObjectInstance &b_instance,
213 bool object_can_have_geometry(BL::Object &b_ob);
214 bool object_is_light(BL::Object &b_ob);
215 bool object_is_camera(BL::Object &b_ob);
216 BL::Object get_dicing_camera_object(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d);
219 BL::RenderEngine b_engine;
220 BL::BlendData b_data;
222 BL::Object b_bake_target;
224 enum ShaderFlags { SHADER_WITH_LAYER_ATTRS };
226 id_map<void *, Shader, ShaderFlags> shader_map;
227 id_map<ObjectKey, Object> object_map;
228 id_map<void *, Procedural> procedural_map;
229 id_map<GeometryKey, Geometry> geometry_map;
230 id_map<ParticleSystemKey, ParticleSystem> particle_system_map;
231 set<Geometry *> geometry_synced;
232 set<Geometry *> geometry_motion_synced;
233 set<Geometry *> geometry_motion_attribute_synced;
235 map<void *, set<BL::ID>> instance_geometries_by_object;
236 set<float> motion_times;
239 bool world_use_portal =
false;
240 BlenderViewportParameters viewport_parameters;
244 bool use_experimental_procedural =
false;
245 bool use_adaptive_subdivision =
false;
246 bool use_developer_ui;
249 int max_subdivisions;
251 struct RenderLayerInfo {
255 BL::Material material_override;
256 BL::World world_override;
257 bool use_background_shader =
true;
258 bool use_surfaces =
true;
259 bool use_hair =
true;
260 bool use_volumes =
true;
261 bool use_motion_blur =
true;
263 bool bound_samples =
false;
271 bool has_updates_ =
true;