Skip to content

Commit 2a0e954

Browse files
authored
make code compatible with Python 3.10 and Blender 3.1
1 parent a9a893c commit 2a0e954

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

virtucamera_blender/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# VirtuCameraBlender
2-
# Copyright (c) 2021 Pablo Javier Garcia Gonzalez.
2+
# Copyright (c) 2021-2022 Pablo Javier Garcia Gonzalez.
33
#
44
# Permission is hereby granted, free of charge, to any person obtaining a copy
55
# of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,7 @@
2727
"author" : "Pablo Garcia",
2828
"description" : "Live camera motion capture",
2929
"blender" : (2, 80, 0),
30-
"version" : (1, 1, 0),
30+
"version" : (1, 1, 1),
3131
"location" : "3D View > VirtuCamera",
3232
"warning" : "",
3333
"category" : "3D View"

virtucamera_blender/virtucamera_blender.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# VirtuCameraBlender
2-
# Copyright (c) 2021 Pablo Javier Garcia Gonzalez.
2+
# Copyright (c) 2021-2022 Pablo Javier Garcia Gonzalez.
33
#
44
# Permission is hereby granted, free of charge, to any person obtaining a copy
55
# of this software and associated documentation files (the "Software"), to deal
@@ -38,7 +38,7 @@
3838
# VirtuCamera API
3939
from .virtucamera import VCBase, VCServer
4040

41-
plugin_version = (1, 1, 0)
41+
plugin_version = (1, 1, 1)
4242

4343
class VirtuCameraBlender(VCBase):
4444
# Constants
@@ -222,7 +222,7 @@ def set_frame(self, vcserver, frame):
222222
The current frame number.
223223
"""
224224

225-
bpy.context.scene.frame_current = frame
225+
bpy.context.scene.frame_current = int(frame)
226226

227227

228228
def set_playback_range(self, vcserver, start, end):
@@ -238,8 +238,8 @@ def set_playback_range(self, vcserver, start, end):
238238
Animation range end frame number.
239239
"""
240240

241-
bpy.context.scene.frame_start = start
242-
bpy.context.scene.frame_end = end
241+
bpy.context.scene.frame_start = int(start)
242+
bpy.context.scene.frame_end = int(end)
243243

244244

245245
def start_playback(self, vcserver, forward):

0 commit comments

Comments
 (0)