Simply data structure, only store index

This commit is contained in:
MMaker 2022-03-25 14:08:17 -04:00
parent 5a520c59c9
commit 0d82095ea5
Signed by: mmaker
GPG Key ID: CCE79B8FEDA40FB2

View File

@ -109,7 +109,7 @@ class FCurveHandlePasteValue(bpy.types.Operator):
if (keys[i].select_control_point): if (keys[i].select_control_point):
if fcurve not in selected_keys: if fcurve not in selected_keys:
selected_keys[fcurve] = [] selected_keys[fcurve] = []
selected_keys[fcurve].append(keys[i]) selected_keys[fcurve].append(i)
for fcurve, keys in selected_keys.items(): for fcurve, keys in selected_keys.items():
if (len(keys) == 0): if (len(keys) == 0):
@ -120,7 +120,7 @@ class FCurveHandlePasteValue(bpy.types.Operator):
pass pass
else: else:
keys.pop() # TODO: Related to above, implement soon keys.pop() # TODO: Related to above, implement soon
for i, _ in enumerate(keys): for i in keys:
f_keys = fcurve.keyframe_points f_keys = fcurve.keyframe_points
if (i < len(f_keys) - 1): if (i < len(f_keys) - 1):
new_handles = generate_new_handles(f_keys[i], f_keys[i + 1]) new_handles = generate_new_handles(f_keys[i], f_keys[i + 1])