[Bf-committers] Patch for Spherical UV mapping

Michael Velikanje bf-committers@blender.org
Tue, 27 May 2003 23:40:37 -0800


Hi,
I've added (re-enabled the menu selection) and tested spherical UV 
mapping (the code was present for, but there was no menu selection for 
spherical mapping). There are some issues with the spherical mapping 
but it doesn't seem to be in the code for the mapping, but in the way 
blender assigns the UV coordinates when a sphere is added to a scene, 
you get different results depending on which window the sphere is added 
in, the best results being when the sphere is added in the top view.
I submitted a patch file at blender.org, but am going to do so here, 
again. This file only adds one line to 
blender/source/blender/src/editface.c , that being this 
"MENUSTRING("Sphere",        UV_SPHERE_MAPPING) "|" "

This is the full patch_editface.txt file.

Index: blender/source/blender/src/editface.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/editface.c,v
retrieving revision 1.6
diff -u -r1.6 editface.c
--- blender/source/blender/src/editface.c	3 May 2003 16:06:30 -0000	1.6
+++ blender/source/blender/src/editface.c	28 May 2003 07:05:57 -0000
@@ -633,6 +633,7 @@
  	mode= pupmenu(MENUTITLE("UV Calculation")
  	              MENUSTRING("Cube",          UV_CUBE_MAPPING) "|"
  	              MENUSTRING("Cylinder",      UV_CYL_MAPPING) "|"
+                      MENUSTRING("Sphere",        UV_SPHERE_MAPPING) 
"|"
  	              MENUSTRING("Bounds to 1/8", UV_BOUNDS8_MAPPING) "|"
  	              MENUSTRING("Bounds to 1/4", UV_BOUNDS4_MAPPING) "|"
  	              MENUSTRING("Bounds to 1/2", UV_BOUNDS2_MAPPING) "|"


Is there any reason that this couldn't/shouldn't be added to the source?

Michael Velikanje
AKA: VelikM