2
$\begingroup$

I would like to have the same result with python as in the UI when I do unwrap > sphere projection on a mesh.

I know it's possible to use the operator bpy.ops.uv.sphere_project() – as mentioned in this answer – but I'd rather use the low-level (bmesh?) alternative, if any.

$\endgroup$
  • $\begingroup$ Related: blender.stackexchange.com/a/10444/15861 $\endgroup$ – TLousky Aug 16 '16 at 16:06
  • $\begingroup$ Yeah I saw this one too but that doesn't help much here. I suppose there is no answer to this question until a python blender guru looks at it. This is a shame that features in the UI cannot be replicated without using it in bare python... $\endgroup$ – nantille Aug 19 '16 at 7:48
  • $\begingroup$ The low-level alternative here is to calculate the map yourself, which, in all likelihood, will be slower than simply using the operator. Doing things via low level commands is usually a good idea, but not always :) $\endgroup$ – TLousky Aug 19 '16 at 8:15
  • $\begingroup$ It's a wee bit strange to speak about "low-level" in a high level language. I don't want to do low-level stuff, I merely wish to call the function that the operator in the UI uses to do the same, without anything on the scene. I use curves to mesh some objects and at no point in time I need to link to scene, which tremendously helps when you have thousands of objects. $\endgroup$ – nantille Aug 19 '16 at 8:32
  • $\begingroup$ Of course I link to scene when meshing is done. And the uv unwrapping is one of the last steps that may be automated. $\endgroup$ – nantille Aug 19 '16 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.