[Bf-blender-cvs] [c16796089c] blender2.8: Remove commented out code from transform_snap.c

Dalai Felinto noreply at git.blender.org
Wed Mar 15 13:59:09 CET 2017


Commit: c16796089ce60f0fe5ca2f5b0c8266e7bcef2dfc
Author: Dalai Felinto
Date:   Wed Mar 15 12:17:29 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBc16796089ce60f0fe5ca2f5b0c8266e7bcef2dfc

Remove commented out code from transform_snap.c

Code was commented out in 2012 and it was not working even then. So it makes for an impossible conversion to the new gawain API.

===================================================================

M	source/blender/editors/transform/transform_snap.c

===================================================================

diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index bd640463da..8f37b35c6f 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -206,35 +206,7 @@ void drawSnapping(const struct bContext *C, TransInfo *t)
 	else if (t->spacetype == SPACE_IMAGE) {
 		if (validSnap(t)) {
 			/* This will not draw, and Im nor sure why - campbell */
-#if 0
-			float xuser_asp, yuser_asp;
-			int wi, hi;
-			float w, h;
-			
-			calc_image_view(G.sima, 'f');   // float
-			myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax);
-			glLoadIdentity();
-			
-			ED_space_image_get_aspect(t->sa->spacedata.first, &xuser_aspx, &yuser_asp);
-			ED_space_image_width(t->sa->spacedata.first, &wi, &hi);
-			w = (((float)wi) / IMG_SIZE_FALLBACK) * G.sima->zoom * xuser_asp;
-			h = (((float)hi) / IMG_SIZE_FALLBACK) * G.sima->zoom * yuser_asp;
-			
-			cpack(0xFFFFFF);
-			glTranslate2fv(t->tsnap.snapPoint);
-			
-			//glRectf(0, 0, 1, 1);
-			
-			setlinestyle(0);
-			cpack(0x0);
-			fdrawline(-0.020 / w, 0, -0.1 / w, 0);
-			fdrawline(0.1 / w, 0, 0.020 / w, 0);
-			fdrawline(0, -0.020 / h, 0, -0.1 / h);
-			fdrawline(0, 0.1 / h, 0, 0.020 / h);
-			
-			glTranslatef(-t->tsnap.snapPoint[0], -t->tsnap.snapPoint[1], 0.0f);
-			setlinestyle(0);
-#endif
+			/* TODO: see 2.7x for non-working code */
 		}
 	}
 	else if (t->spacetype == SPACE_NODE) {




More information about the Bf-blender-cvs mailing list