im trying to UV unwrap a plane via python using:
bpy.ops.uv.project_from_view(orthographic=False, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)
but everytime i use that function it returns this error:
Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
File “C:\Users\Elite\BLENDE~1\Blender2\2.56\scripts\modules\bpy\ops.py”, line 179, in call
ret = op_call(self.idname_py(), None, kw)
SystemError: Operator bpy.ops.uv.project_from_view.poll() failed, context is incorrect
why the context is incorrect? i´m doing that on Edit Mode…
My mouse need´s to be in the 3d view so this operator can work?
yeah, that´s the weird thing…
I guess “wrong context” means that my mouse needs to be on the 3D view making this operator useless if I trying to acess it via python.
a really late reply, but I try to do the same and get the same error-message. But if I remeber correctly yesterday it worked in another script I wrote. Any news on this?
Like the operator only work in 3dview , press ‘run script’ and in the 3dview select the meshes(only meshes) and press ‘SPACE’ and write ‘Mapping_multiuv’. BLENDER 2.62
import bpy
class ViewOperator(bpy.types.Operator):