3

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.

nantille
  • 819
  • 6
  • 21
  • Related: http://blender.stackexchange.com/a/10444/15861 – TLousky Aug 16 '16 at 16:06
  • 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... – nantille Aug 19 '16 at 07:48
  • 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 :) – TLousky Aug 19 '16 at 08:15
  • 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. – nantille Aug 19 '16 at 08:32
  • Of course I link to scene when meshing is done. And the uv unwrapping is one of the last steps that may be automated. – nantille Aug 19 '16 at 08:57

1 Answers1

-1

In Blender 2.9 the Python for calling this is bpy.ops.uv.sphere_project()

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187
DrewTNBD
  • 98
  • 10