[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38052] trunk/blender/source/blender/ blenlib/intern/uvproject.c: fix [#27839] UV 'Project from view' ignores camera lens shift

Campbell Barton ideasman42 at gmail.com
Sun Jul 3 09:37:34 CEST 2011


Revision: 38052
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38052
Author:   campbellbarton
Date:     2011-07-03 07:37:33 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
fix [#27839] UV 'Project from view' ignores camera lens shift

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/uvproject.c

Modified: trunk/blender/source/blender/blenlib/intern/uvproject.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/uvproject.c	2011-07-03 07:21:33 UTC (rev 38051)
+++ trunk/blender/source/blender/blenlib/intern/uvproject.c	2011-07-03 07:37:33 UTC (rev 38052)
@@ -169,8 +169,8 @@
 		}
 		
 		/* include 0.5f here to move the UVs into the center */
-		uci.shiftx = 0.5f - camera->shiftx;
-		uci.shifty = 0.5f - camera->shifty;
+		uci.shiftx = 0.5f - (camera->shiftx * uci.xasp);
+		uci.shifty = 0.5f - (camera->shifty * uci.yasp);
 		
 		uci_pt= MEM_mallocN(sizeof(UvCameraInfo), "UvCameraInfo");
 		*uci_pt= uci;




More information about the Bf-blender-cvs mailing list