[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40879] branches/soc-2011-tomato/source/ blender/nodes/composite/nodes/node_composite_scale.c: Camera tracking integration

Sergey Sharybin g.ulairi at gmail.com
Sun Oct 9 22:28:35 CEST 2011


Revision: 40879
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40879
Author:   nazgul
Date:     2011-10-09 20:28:35 +0000 (Sun, 09 Oct 2011)
Log Message:
-----------
Camera tracking integration
===========================

Scale compositor node feature: if there's no input and scaling is set to
absolute, generate image with given resolution using color from input
socket as background. Useful to generate "overscanned" foortage.

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_scale.c

Modified: branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_scale.c
===================================================================
--- branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_scale.c	2011-10-09 20:28:29 UTC (rev 40878)
+++ branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_scale.c	2011-10-09 20:28:35 UTC (rev 40879)
@@ -110,6 +110,25 @@
 		if(cbuf!=in[0]->data)
 			free_compbuf(cbuf);
 	}
+	else if (node->custom1==CMP_SCALE_ABSOLUTE) {
+		CompBuf *stackbuf;
+		int a, x, y;
+		float *fp;
+
+		x = MAX2((int)in[1]->vec[0], 1);
+		y = MAX2((int)in[2]->vec[0], 1);
+
+		stackbuf = alloc_compbuf(x, y, CB_RGBA, 1);
+		fp = stackbuf->rect;
+
+		a = stackbuf->x * stackbuf->y;
+		while(a--) {
+			copy_v4_v4(fp, in[0]->vec);
+			fp += 4;
+		}
+
+		out[0]->data= stackbuf;
+	}
 }
 
 void register_node_type_cmp_scale(ListBase *lb)




More information about the Bf-blender-cvs mailing list