blender/tests/files/render/util/render_updates.py
Brecht Van Lommel 5c06bf4361 Fix #159340: Cycles hair not following deforming mesh in viewport
Introduced in e9c36249f7, missing update tags that caused the BVH to
not be rebuilt. Remove dedicated booleans on Geometry so they can not be
out of sync with the attribute modified boolean.

Pull Request: https://projects.blender.org/blender/blender/pulls/159540
2026-06-04 23:42:16 +02:00

26 lines
720 B
Python

# SPDX-FileCopyrightText: 2024 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
# Render the final frame of the animation with persistent data, to test
# incremental updates work.
import bpy
def render_persistent_data_animation(context):
scene = context.scene
scene.render.use_persistent_data = True
for frame in range(scene.frame_start, scene.frame_end + 1):
scene.frame_set(frame)
bpy.ops.render.render()
# Save the last rendered frame to the path expected by the tests.
image = bpy.data.images['Render Result']
image.save_render(scene.render.filepath + '0001.png', scene=scene)
if __name__ == "__main__":
render_persistent_data_animation(bpy.context)