[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1877] contrib/py/scripts/addons/ io_import_voodoo_camera.py: minor changes to be compatible with 2.57
Fazekas Laszlo
mneko at freemail.hu
Thu Apr 28 22:21:39 CEST 2011
Revision: 1877
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1877
Author: totoro
Date: 2011-04-28 20:21:39 +0000 (Thu, 28 Apr 2011)
Log Message:
-----------
minor changes to be compatible with 2.57
Modified Paths:
--------------
contrib/py/scripts/addons/io_import_voodoo_camera.py
Modified: contrib/py/scripts/addons/io_import_voodoo_camera.py
===================================================================
--- contrib/py/scripts/addons/io_import_voodoo_camera.py 2011-04-27 04:26:19 UTC (rev 1876)
+++ contrib/py/scripts/addons/io_import_voodoo_camera.py 2011-04-28 20:21:39 UTC (rev 1877)
@@ -16,12 +16,12 @@
#
# ##### END GPL LICENSE BLOCK #####
-bl_addon_info = {
+bl_info = {
"name": "Import Voodoo camera",
"author": "Fazekas Laszlo",
- "version": (0, 6),
- "blender": (2, 5, 6),
- "api": 34074,
+ "version": (0, 7),
+ "blender": (2, 5, 7),
+ "api": 36339,
"location": "File > Import > Voodoo camera",
"description": "Imports a Blender (2.4x or 2.5x) Python script from the Voodoo camera tracker software.",
"warning": "",
@@ -123,8 +123,12 @@
if (pos != -1):
fr = int(lineSplit[0][1:pos],10)
scene.frame_set(fr)
- # from Michael (Meikel) Oetjen
- vcam.matrix_world = eval('mathutils.Matrix(' + line.rstrip()[pos+28:-2].replace('[','(',4).replace(']',')',4) + ')')
+ # for up to 2.55
+ # vcam.matrix_world = eval('mathutils.' + line.rstrip()[pos+21:-1])
+ # for 2.56, from Michael (Meikel) Oetjen
+ # vcam.matrix_world = eval('mathutils.Matrix(' + line.rstrip()[pos+28:-2].replace('[','(',4).replace(']',')',4) + ')')
+ # for 2.57
+ vcam.matrix_world = eval('mathutils.Matrix([' + line.rstrip()[pos+28:-2] + '])')
vcam.keyframe_insert('location')
vcam.keyframe_insert('scale')
vcam.keyframe_insert('rotation_euler')
@@ -165,12 +169,18 @@
if (pos != -1):
- if (line[pos+8] == '['):
- # from Michael (Meikel) Oetjen
- vcam.matrix_world = eval('mathutils.Matrix((' + line.rstrip()[pos+9:-1].replace('[','(',3).replace(']',')',4) + ')')
- else:
- vcam.matrix_world = eval('mathutils' + line[pos:])
+ # for up to 2.55
+ # vcam.matrix_world = eval('mathutils' + line[pos:])
+ # for 2.56
+ # if (line[pos+8] == '['):
+ # # from Michael (Meikel) Oetjen
+ # vcam.matrix_world = eval('mathutils.Matrix((' + line.rstrip()[pos+9:-1].replace('[','(',3).replace(']',')',4) + ')')
+ # else:
+ # vcam.matrix_world = eval('mathutils' + line[pos:])
+
+ # for 2.57
+ vcam.matrix_world = eval('mathutils.Matrix([' + line.rstrip()[pos+8:-1] + '])')
vcam.keyframe_insert('location')
vcam.keyframe_insert('scale')
vcam.keyframe_insert('rotation_euler')
@@ -239,10 +249,12 @@
def register():
+ bpy.utils.register_module(__name__)
bpy.types.INFO_MT_file_import.append(menu_func)
def unregister():
+ bpy.utils.unregister_module(__name__)
bpy.types.INFO_MT_file_import.remove(menu_func)
More information about the Bf-extensions-cvs
mailing list