I made a complex character scene and tried to bake it with command.
import bpy
sc = bpy.context.scene
bpy.ops.nla.bake(frame_start=sc.frame_start, frame_end=sc.frame_end, step=1, only_selected=False, clear_constraints=True, visual_keying=True, bake_types={'POSE'})
But this results long error which makes very little of sense to me.
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\startup\bl_operators\anim.py", line 308, in execute
actions = anim_utils.bake_action_objects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 129, in bake_action_objects
return iter.send(None)
^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in bake_action_objects_iter
yield tuple(iter.send(None) for iter in iter_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in <genexpr>
yield tuple(iter.send(None) for iter in iter_all)
^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 464, in bake_action_iter
bake_custom_properties(pbone, custom_props=custom_props[name], frame=f, group_name=name)
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 251, in bake_custom_properties
obj[key] = value
~~~^^^^^
TypeError: Cannot assign a 'dict' value to the existing 'bbdObject' Group IDProperty
Error: Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\startup\bl_operators\anim.py", line 308, in execute
actions = anim_utils.bake_action_objects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 129, in bake_action_objects
return iter.send(None)
^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in bake_action_objects_iter
yield tuple(iter.send(None) for iter in iter_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in <genexpr>
yield tuple(iter.send(None) for iter in iter_all)
^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\Error: Python: Traceback (most recent call last):
File "C:\Projects\Veleho_ArtFull\WorkingFiles\Pawns\BaseMale01\Animations\idle_1h.blend\Text", line 3, in <module>
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in __call__
ret = _op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\startup\bl_operators\anim.py", line 308, in execute
actions = anim_utils.bake_action_objects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 129, in bake_action_objects
return iter.send(None)
^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in bake_action_objects_iter
yield tuple(iter.send(None) for iter in iter_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in <genexpr>
yield tuple(iter.send(None) for iter in iter_all)
^^^^^^^^^^^^^^^
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 464, in bake_action_iter
bake_custom_properties(pbone, custom_props=custom_props[name], frame=f, group_name=name)
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 251, in bake_custom_properties
obj[key] = value
~~~^^^^^
TypeError: Cannot assign a 'dict' value to the existing 'bbdObject' Group IDProperty
Location: C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py:109
Any ideas?