Skip to content

Commit

Permalink
make code compatible with Python 3.10 and Blender 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shycats authored Mar 18, 2022
1 parent a9a893c commit 2a0e954
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions virtucamera_blender/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# VirtuCameraBlender
# Copyright (c) 2021 Pablo Javier Garcia Gonzalez.
# Copyright (c) 2021-2022 Pablo Javier Garcia Gonzalez.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -27,7 +27,7 @@
"author" : "Pablo Garcia",
"description" : "Live camera motion capture",
"blender" : (2, 80, 0),
"version" : (1, 1, 0),
"version" : (1, 1, 1),
"location" : "3D View > VirtuCamera",
"warning" : "",
"category" : "3D View"
Expand Down
10 changes: 5 additions & 5 deletions virtucamera_blender/virtucamera_blender.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# VirtuCameraBlender
# Copyright (c) 2021 Pablo Javier Garcia Gonzalez.
# Copyright (c) 2021-2022 Pablo Javier Garcia Gonzalez.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -38,7 +38,7 @@
# VirtuCamera API
from .virtucamera import VCBase, VCServer

plugin_version = (1, 1, 0)
plugin_version = (1, 1, 1)

class VirtuCameraBlender(VCBase):
# Constants
Expand Down Expand Up @@ -222,7 +222,7 @@ def set_frame(self, vcserver, frame):
The current frame number.
"""

bpy.context.scene.frame_current = frame
bpy.context.scene.frame_current = int(frame)


def set_playback_range(self, vcserver, start, end):
Expand All @@ -238,8 +238,8 @@ def set_playback_range(self, vcserver, start, end):
Animation range end frame number.
"""

bpy.context.scene.frame_start = start
bpy.context.scene.frame_end = end
bpy.context.scene.frame_start = int(start)
bpy.context.scene.frame_end = int(end)


def start_playback(self, vcserver, forward):
Expand Down

0 comments on commit 2a0e954

Please sign in to comment.