Fix error when keyframing with Custom Properties
Since rBf9ccd26b037d, calling `data.path_resolve()` on custom properties with `None` value do not cause a `ValueError` exception any more. This is now taken into account in the keying sets targeting custom properties. Reviewed By: sybren Differential Revision: https://developer.blender.org/D13787
This commit is contained in:
@@ -238,11 +238,15 @@ def RKS_GEN_custom_props(_ksi, _context, ks, data):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
prop_path = '["%s"]' % bpy.utils.escape_identifier(cprop_name)
|
prop_path = '["%s"]' % bpy.utils.escape_identifier(cprop_name)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
rna_property = data.path_resolve(prop_path, False)
|
rna_property = data.path_resolve(prop_path, False)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
# This happens when a custom property is set to None. In that case it cannot
|
# Can technically happen, but there is no known case.
|
||||||
# be converted to an FCurve-compatible value, so we can't keyframe it anyway.
|
continue
|
||||||
|
if rna_property is None:
|
||||||
|
# In this case the property cannot be converted to an
|
||||||
|
# FCurve-compatible value, so we can't keyframe it anyways.
|
||||||
continue
|
continue
|
||||||
if rna_property.rna_type not in prop_type_compat:
|
if rna_property.rna_type not in prop_type_compat:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user