Fix: Error when baking custom properties of unavailable addon
When baking an Action on an object which has custom properties that come from an addon or python script that isn't loaded, the baking would fail with: ``` TypeError: Cannot assign a 'dict' value to the existing 'hops' Group IDProperty ``` This comes from an addon that isn't present or loaded on a users machine. The fix is to check for `IDProperty` and skip those. Pull Request: https://projects.blender.org/blender/blender/pulls/129057
This commit is contained in:
committed by
Philipp Oeser
parent
fcc6680633
commit
6e0232fc71
@@ -243,11 +243,14 @@ def bake_action_iter(
|
||||
return clean_props
|
||||
|
||||
def bake_custom_properties(obj, *, custom_props, frame, group_name=""):
|
||||
import idprop
|
||||
if frame is None or not custom_props:
|
||||
return
|
||||
for key, value in custom_props.items():
|
||||
if key in obj.bl_rna.properties and not obj.bl_rna.properties[key].is_animatable:
|
||||
continue
|
||||
if isinstance(obj[key], idprop.types.IDPropertyGroup):
|
||||
continue
|
||||
obj[key] = value
|
||||
if key in obj.bl_rna.properties:
|
||||
rna_path = key
|
||||
|
||||
Reference in New Issue
Block a user