Skip to content

Conversation

@TomMontagnon
Copy link
Contributor

As specified in issue #669:

"this is a known issue in Blender + plugins that implement the frame
update callback. The solution is to save the Blender project and launch
the blender rendering via command line in headless mode (no GUI)."

Following this workflow requires closing Blender and launching the animation rendering in headless mode.

However, closing Blender resets the global variables, including empty_mesh. This means that when the callback runs during rendering, empty_mesh is None. Consequently, the following lines:

new_mesh = bpy.data.meshes.new('mesh_position_clones')
chobject.data = new_mesh

crash with a TypeError because chobject.data is not prepared to receive a mesh. This also causes only a subset of objects to be instantiated in the scene.

This PR ensures that empty_mesh is properly initialized before it is used in the callback, guaranteeing that all Chrono objects are correctly created and rendered in headless mode.

@rserban rserban requested a review from tasora January 14, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant