From 2a0e954ebae412b3f7a2d931a01a444d3933a99d Mon Sep 17 00:00:00 2001 From: shycats Date: Sat, 19 Mar 2022 00:39:14 +0100 Subject: [PATCH] make code compatible with Python 3.10 and Blender 3.1 --- virtucamera_blender/__init__.py | 4 ++-- virtucamera_blender/virtucamera_blender.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/virtucamera_blender/__init__.py b/virtucamera_blender/__init__.py index ae854b2..20c79c1 100644 --- a/virtucamera_blender/__init__.py +++ b/virtucamera_blender/__init__.py @@ -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 @@ -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" diff --git a/virtucamera_blender/virtucamera_blender.py b/virtucamera_blender/virtucamera_blender.py index 9946afe..f285d64 100644 --- a/virtucamera_blender/virtucamera_blender.py +++ b/virtucamera_blender/virtucamera_blender.py @@ -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 @@ -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 @@ -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): @@ -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):