Skip to content

Commit e1746d3

Browse files
author
Nusiq
committed
Updated format version after adding for new feature NLA editor support. v 6.2.0. Removed some unused code.
1 parent 8782951 commit e1746d3

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

mcblend/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"author": "Artur",
7979
"description": "",
8080
"blender": (2, 80, 0),
81-
"version": (6, 1, 0), # COMPATIBILITY BREAKING CHANGE, NEW FEATURE, BUGFIX
81+
"version": (6, 2, 0), # COMPATIBILITY BREAKING CHANGE, NEW FEATURE, BUGFIX
8282
"location": "",
8383
"warning": "",
8484
"category": "Generic"

mcblend/operator_func/animation.py

-32
Original file line numberDiff line numberDiff line change
@@ -79,38 +79,6 @@ def _pick_closet_location(
7979
return choice2
8080
return choice1
8181

82-
def _get_next_keyframe(context: bpy_types.Context) -> Optional[int]: # TODO - this is old code. Remove it.
83-
'''
84-
Returns the next keyframe index from selected objects or None if there is
85-
no more keyframes to chose from until the end of animation.
86-
87-
:param context: the context of running the operator.
88-
:returns: index of the next keyframe or None.
89-
'''
90-
curr = context.scene.frame_current
91-
next_keyframe = None
92-
for obj in context.selected_objects:
93-
if (
94-
obj.animation_data is None or
95-
obj.animation_data.action is None or
96-
obj.animation_data.action.fcurves is None
97-
):
98-
continue
99-
for fcurve in obj.animation_data.action.fcurves:
100-
if fcurve.keyframe_points is None:
101-
continue
102-
for kframe_point in fcurve.keyframe_points:
103-
time = kframe_point.co[0]
104-
if time <= curr:
105-
continue
106-
if next_keyframe is None:
107-
next_keyframe = time
108-
else:
109-
next_keyframe = min(time, next_keyframe)
110-
if next_keyframe is not None and next_keyframe > context.scene.frame_end:
111-
return None
112-
return next_keyframe
113-
11482
def _get_keyframes(context: bpy_types.Context) -> List[int]:
11583
'''
11684
Lists keyframe numbers of the animation from keyframes of NLA tracks and

0 commit comments

Comments
 (0)