Fix #70114: Cycles: Particle systems missing in headless multiview render #120543
|
@ -406,15 +406,21 @@ void BlenderSession::render(BL::Depsgraph &b_depsgraph_)
|
||||||
height,
|
height,
|
||||||
&python_thread_state,
|
&python_thread_state,
|
||||||
session_params.device);
|
session_params.device);
|
||||||
|
|
||||||
|
/* At the moment we only free if we are not doing multi-view
|
||||||
|
* (or if we are rendering the last view). See #58142/D4239 for discussion.
|
||||||
|
*/
|
||||||
|
const bool can_free_cache = (view_index == num_views - 1);
|
||||||
|
if (can_free_cache) {
|
||||||
|
sync->free_data_after_sync(b_depsgraph);
|
||||||
|
}
|
||||||
|
|
||||||
builtin_images_load();
|
builtin_images_load();
|
||||||
|
|
||||||
/* Attempt to free all data which is held by Blender side, since at this
|
/* Attempt to free all data which is held by Blender side, since at this
|
||||||
* point we know that we've got everything to render current view layer.
|
* point we know that we've got everything to render current view layer.
|
||||||
*/
|
*/
|
||||||
/* At the moment we only free if we are not doing multi-view
|
if (can_free_cache) {
|
||||||
* (or if we are rendering the last view). See #58142/D4239 for discussion.
|
|
||||||
*/
|
|
||||||
if (view_index == num_views - 1) {
|
|
||||||
free_blender_memory_if_possible();
|
free_blender_memory_if_possible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -294,8 +294,6 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
|
||||||
* false = don't delete unused shaders, not supported. */
|
* false = don't delete unused shaders, not supported. */
|
||||||
shader_map.post_sync(false);
|
shader_map.post_sync(false);
|
||||||
|
|
||||||
free_data_after_sync(b_depsgraph);
|
|
||||||
|
|
||||||
VLOG_INFO << "Total time spent synchronizing data: " << timer.get_time();
|
VLOG_INFO << "Total time spent synchronizing data: " << timer.get_time();
|
||||||
|
|
||||||
has_updates_ = false;
|
has_updates_ = false;
|
||||||
|
|
|
@ -87,6 +87,9 @@ class BlenderSync {
|
||||||
return view_layer.bound_samples;
|
return view_layer.bound_samples;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Early data free. */
|
||||||
|
void free_data_after_sync(BL::Depsgraph &b_depsgraph);
|
||||||
|
|
||||||
/* get parameters */
|
/* get parameters */
|
||||||
static SceneParams get_scene_params(BL::Scene &b_scene,
|
static SceneParams get_scene_params(BL::Scene &b_scene,
|
||||||
const bool background,
|
const bool background,
|
||||||
|
@ -208,9 +211,6 @@ class BlenderSync {
|
||||||
/* Images. */
|
/* Images. */
|
||||||
void sync_images();
|
void sync_images();
|
||||||
|
|
||||||
/* Early data free. */
|
|
||||||
void free_data_after_sync(BL::Depsgraph &b_depsgraph);
|
|
||||||
|
|
||||||
/* util */
|
/* util */
|
||||||
void find_shader(BL::ID &id, array<Node *> &used_shaders, Shader *default_shader);
|
void find_shader(BL::ID &id, array<Node *> &used_shaders, Shader *default_shader);
|
||||||
bool BKE_object_is_modified(BL::Object &b_ob);
|
bool BKE_object_is_modified(BL::Object &b_ob);
|
||||||
|
|
Loading…
Reference in New Issue