CGCookie / CGCookie/apply_modifiers_with_shape_keys

ShapeKey.relative_key ID type assignment is temporary, can't assign

Open
#13 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use the addon to apply the armature modifier of a rigged mesh but the error persist

Python: Traceback (most recent call last):
File "C:\Users\haise\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\apply_modifiers_with_shape_keys\apply_modifiers_with_shape_keys.py", line 57, in execute
success, error_info = apply_modifiers_with_shape_keys(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\haise\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\apply_modifiers_with_shape_keys\functions.py", line 322, in apply_modifiers_with_shape_keys
restore_shape_key_properties(original_obj, shape_key_properties)
File "C:\Users\haise\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\apply_modifiers_with_shape_keys\functions.py", line 107, in restore_shape_key_properties
setattr(key_block, prop, value)
TypeError: bpy_struct: item.attr = val: ShapeKey.relative_key ID type assignment is temporary, can't assign

Image

When it stops, it creates a duplicate of the mesh and gives the error message

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in functions.py at restore_shape_key_properties, especially line 107, and trace the call from apply_modifiers_with_shape_keys. Reproduce the armature-modifier case in Blender 4.5 using the issue's steps and traceback. Done means the modifier is applied without the ShapeKey.relative_key assignment error, the duplicate mesh is handled correctly, and shape key properties are restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.