I’m a newbie about Blender so pls excuse if this is a banal issue, i did a series of searches and havent found my solution…
When i try to open a Voodoo tracking python export i saved, it returns the following error:
AttributeError: ‘Scene’ object has no attribute ’ set_frame’
location: <unknown location>:-1
Below is a part of the exported script itself:
blender export (blender version 2.5x and higher)
created by voodoo camera tracker - www.digilab.uni-hannover.de
Creation date: Mon Dec 20 18:33:23 2010
USAGE: load this python script into Blender’s text editor and execute the script with ALT-P
use the ‘voodoo_render_cam’ for rendering your scene
use the helper object ‘voodoo_scene’ to rotate, translate and scale the scene
import bpy
import mathutils
import string
import math
scene = bpy.context.scene
dummy = bpy.data.objects.new(‘voodoo_scene’, None)
dummy.location = (0.0, 0.0, 0.0)
dummy.rotation_euler = ( -3.141593/2, 0.0, 0.0)
dummy.scale = (0.2, 0.2, 0.2)
scene.objects.link(dummy)
data = bpy.data.cameras.new(‘voodoo_render_cam’)
data.lens_unit = ‘DEGREES’
vcam = bpy.data.objects.new(‘voodoo_render_cam’, data)
vcam.location = (0.0, 0.0, 0.0)
vcam.rotation_euler = (0.0, 0.0, 0.0)
vcam.scale = (1.0, 1.0, 1.0)
data.lens = 35.0
data.shift_x = 0.0
data.shift_y = 0.0
data.dof_distance = 0.0
data.clip_start = 0.1
data.clip_end = 1000.0
data.draw_size = 0.5
scene.objects.link(vcam)
vcam.parent = dummy
data = bpy.data.meshes.new(‘voodoo_FP3D_cloud’)
mesh = bpy.data.objects.new(‘voodoo_FP3D_cloud’, data)
mesh.location = (0.0, 0.0, 0.0)
mesh.rotation_euler = (0.0, 0.0, 0.0)
mesh.scale = (1.0, 1.0, 1.0)
scene.objects.link(mesh)
mesh.parent = dummy
#Camera Parameters
scene.set_frame(0)
vcam.data.lens = 42.927190
vcam.matrix_world = mathutils.Matrix([0.999458,-0.003389,-0.032760,0.000000], [-0.002443,-0.999580,0.028874,0.000000], [-0.032844,-0.028779,-0.999046,0.000000], [0.268443,-0.906921,-0.898772,1.000000])
vcam.keyframe_insert(‘location’)
vcam.keyframe_insert(‘scale’)
vcam.keyframe_insert(‘rotation_euler’)
vcam.data.keyframe_insert(‘lens’)
scene.set_frame(1)
vcam.data.lens = 42.927190
vcam.matrix_world = mathutils.Matrix([0.999165,-0.006664,-0.040320,0.000000], [-0.005498,-0.999566,0.028948,0.000000], [-0.040495,-0.028702,-0.998767,0.000000], [0.078954,-0.888576,-0.821536,1.000000])
vcam.keyframe_insert(‘location’)
vcam.keyframe_insert(‘scale’)
vcam.keyframe_insert(‘rotation_euler’)
vcam.data.keyframe_insert(‘lens’)