Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender 4.1 issues - signature of bake_action changed #132

Open
mikecokina opened this issue Mar 27, 2024 · 2 comments
Open

Blender 4.1 issues - signature of bake_action changed #132

mikecokina opened this issue Mar 27, 2024 · 2 comments

Comments

@mikecokina
Copy link

Hi,

I've started learning car animation and encountered an issue with an addon. It seems that the developers of Blender have significantly changed the signature of the bake_action function within the anim_utils module. After some investigation, I've identified the issue and realized that updates need to be made in the addon file bake_operations.

Previously, the code snippet looked like this:

baked_action = bpy_extras.anim_utils.bake_action(
            context.object,
            action=None,
            frames=range(self.frame_start, self.frame_end + 1),
            only_selected=True,
            do_pose=True,
            do_object=False,
            do_visual_keying=True,
        )

Now, it requires something like this:

bake_options = bpy_extras.anim_utils.BakeOptions(
            only_selected=True,
            do_pose=True,
            do_object=False,
            do_visual_keying=True,
            do_constraint_clear=False,
            do_parents_clear=False,
            do_clean=False,
            do_location=True,
            do_scale=True,
            do_rotation=True,
            do_bbone=True,
            do_custom_props=True
        )

baked_action = bpy_extras.anim_utils.bake_action(
            context.object,
            action=None,
            frames=range(self.frame_start, self.frame_end + 1),
            bake_options=bake_options
        )

As a beginner with Blender, I'm not entirely sure what these new options actually do. If anyone is more familiar with the Blender API, please use this information as a starting point and make the necessary changes and pull requests. Thank you.

@LohmingIDesgin
Copy link

It still does not work after embedding. An error will be reported when turning to bake

@mikecokina
Copy link
Author

You have to make an update within version fixed for blender 4.0 (https://github.com/webbertakken/rigacar/blob/main/bake_operators.py).

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

No branches or pull requests

2 participants