Skip to content

Commit 821613c

Browse files
committed
Version 11.4.1 - fixed potential crashes during animation export.
1 parent 82408a6 commit 821613c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

fake_bpy_modules/bpy/types/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63342,7 +63342,7 @@ class Action(ID, bpy_struct):
6334263342
:type: mathutils.Vector
6334363343
"""
6334463344

63345-
fcurves: ActionFCurves
63345+
fcurves: ActionFCurves | None
6334663346
""" The individual F-Curves that make up the action
6334763347

6334863348
:type: ActionFCurves

mcblend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"author": "Artur",
119119
"description": "An addon that allows to design and animate Minecraft Bedrock Edition models",
120120
"blender": (4, 2, 0),
121-
"version": (11, 4, 0), # Remember to update the version in the "docs/conf.py"
121+
"version": (11, 4, 1), # Remember to update the version in the "docs/conf.py"
122122
"location": "",
123123
"warning": "",
124124
"category": "Object"

mcblend/operator_func/animation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ def _add_keyframe_data(
261261
cycle_length = limit_up - limit_down
262262
scaled_cycle_length = cycle_length * scale
263263
repeat = strip.repeat
264-
for (keyframe, bone_state) in sorted(strip_action_keyframes):
264+
for (keyframe, bone_state) in sorted(
265+
strip_action_keyframes, key=lambda x: x[0]):
265266
if keyframe < limit_down or keyframe > limit_up:
266267
continue
267268
transformed_keyframe_base = keyframe * scale
@@ -294,7 +295,7 @@ def _get_keyframes_and_bone_states(
294295
pattern = re.compile(
295296
r'pose\.bones\[(?:\'|")([^\]]+)(?:\'|")\]\.([a-zA-Z0-9_]+)')
296297
if action.fcurves is None: # type: ignore
297-
return set()
298+
return []
298299
result: List[TimeNameTypeInterpolation] = []
299300
for fcurve in action.fcurves:
300301
if fcurve.keyframe_points is None: # type: ignore

0 commit comments

Comments
 (0)