Fix #120308: GP3 objects with geonodes renders original data from CLI

The issue was caused by the special code in Cycles which clears object
caches when it thinks they are not needed. We should not free caches of
grease pencils because it is needed later by a separate render engine.

Pull Request: https://projects.blender.org/blender/blender/pulls/120315
This commit is contained in:
Sergey Sharybin
2024-04-05 18:13:12 +02:00
committed by Sergey Sharybin
parent 5bed08fc56
commit 958bc91867

View File

@@ -797,6 +797,11 @@ void BlenderSync::free_data_after_sync(BL::Depsgraph &b_depsgraph)
* but that will need some API support first.
*/
for (BL::Object &b_ob : b_depsgraph.objects) {
/* Grease pencil render requires all evaluated objects available as-is after Cycles is done
* with its part. */
if (b_ob.type() == BL::Object::type_GREASEPENCIL || b_ob.type() == BL::Object::type_GPENCIL) {
continue;
}
b_ob.cache_release();
}
}