diff options
Diffstat (limited to 'greasepencil_tools/timeline_scrub.py')
-rw-r--r-- | greasepencil_tools/timeline_scrub.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/greasepencil_tools/timeline_scrub.py b/greasepencil_tools/timeline_scrub.py index 8f058ed9..eaccab99 100644 --- a/greasepencil_tools/timeline_scrub.py +++ b/greasepencil_tools/timeline_scrub.py @@ -21,13 +21,13 @@ from bpy.props import (BoolProperty, EnumProperty) -def nearest(array, value): +def nearest(array, value) -> int: ''' Get a numpy array and a target value Return closest val found in array to passed value ''' idx = (np.abs(array - value)).argmin() - return array[idx] + return int(array[idx]) def draw_callback_px(self, context): |