I try to import an obj file and make a rendered image, by a python script. How to center the view to the mesh?
I've tried bpy.ops.view3d.view_selected()
but i get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 43, in <module>
File "J:\Programmi\blender-2.75a-windows32\2.75\scripts\modules\bpy\ops.py", l
ine 189, in __call__
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.action.view_selected.poll() failed, context is in
correct