Sheesh mate, slight overreaction. There's no need to bite his head off, I think it's pretty clear that it was an honest mistake. In any case a simple "Hi, I think you forgot to credit me here. Could you add it please?" would do just fine, and make a few more friends than this.
<br><br>cheers,<br><br>Matt<br><br><br><div><span class="gmail_quote">On 7/11/07, <b class="gmail_sendername">GSR</b> <<a href="mailto:gsr.b3d@infernal-iceberg.com">gsr.b3d@infernal-iceberg.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><a href="mailto:bob_holcomb@hotmail.com">bob_holcomb@hotmail.com</a> (2007-07-10 at 0427.43 +0200):<br>> Revision: 11203<br>> <a href="http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11203">
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11203</a><br>> Author: scourage<br>> Date: 2007-07-10 04:27:37 +0200 (Tue, 10 Jul 2007)<br>><br>> Log Message:
<br>> -----------<br>> Added normalize compositing node.<br><br>"Thanks" for _not_ giving credit or patch url at all.<br><br>At first I thought it was another case of "oops, coded it and later<br>noticed there was a similar patch/bugfix, so closed that and went with
<br>my version, sorry". But then decided to check what differences<br>existed, to learn anything interesting, and realized the code is<br>mostly the same.<br><br>So fix it (svn allows changing logs, but no idea if enabled, other
<br>issues are simpler, just change files) or revert the commit, as there<br>is base for an authorship misappropiation issue.<br><br>> Modified Paths:<br>> --------------<br>> trunk/blender/source/blender/blenkernel/BKE_node.h
<br>> trunk/blender/source/blender/blenkernel/intern/node.c<br>> trunk/blender/source/blender/nodes/CMP_node.h<br>><br>> Added Paths:<br>> -----------<br>> trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c
<br>><br>> Modified: trunk/blender/source/blender/blenkernel/BKE_node.h<br>> ===================================================================<br>> --- trunk/blender/source/blender/blenkernel/BKE_node.h 2007-07-10 02:06:10 UTC (rev 11202)
<br>> +++ trunk/blender/source/blender/blenkernel/BKE_node.h 2007-07-10 02:27:37 UTC (rev 11203)<br>> @@ -298,6 +298,7 @@<br>> #define CMP_NODE_BRIGHTCONTRAST 249<br>> #define CMP_NODE_GAMMA 250
<br>> #define CMP_NODE_INVERT 251<br>> +#define CMP_NODE_NORMALIZE 252<br><br>You reviewed the patch as the ID provided was one to avoid collisions<br>in local version.<br><br>> /* channel toggles */
<br>> #define CMP_CHAN_RGB 1<br>><br>> Modified: trunk/blender/source/blender/blenkernel/intern/node.c<br>> ===================================================================<br>> --- trunk/blender/source/blender/blenkernel/intern/node.c 2007-07-10 02:06:10 UTC (rev 11202)
<br>> +++ trunk/blender/source/blender/blenkernel/intern/node.c 2007-07-10 02:27:37 UTC (rev 11203)<br>> @@ -2331,6 +2331,7 @@<br>> nodeRegisterType(ntypelist, &cmp_node_normal);<br>> nodeRegisterType(ntypelist, &cmp_node_curve_vec);
<br>> nodeRegisterType(ntypelist, &cmp_node_map_value);<br>> + nodeRegisterType(ntypeList, &cmp_node_normalize);<br>><br>> nodeRegisterType(ntypelist, &cmp_node_filter);<br>> nodeRegisterType(ntypelist, &cmp_node_blur);
<br>><br>> Modified: trunk/blender/source/blender/nodes/CMP_node.h<br>> ===================================================================<br>> --- trunk/blender/source/blender/nodes/CMP_node.h 2007-07-10 02:06:10 UTC (rev 11202)
<br>> +++ trunk/blender/source/blender/nodes/CMP_node.h 2007-07-10 02:27:37 UTC (rev 11203)<br>> @@ -62,6 +62,7 @@<br>> extern bNodeType cmp_node_normal;<br>> extern bNodeType cmp_node_curve_vec;<br>> extern bNodeType cmp_node_map_value;
<br>> +extern bNodeType cmp_node_normalize;<br><br>Another adaptation.<br><br>> extern bNodeType cmp_node_filter;<br>> extern bNodeType cmp_node_blur;<br>><br>> Added: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c
<br>> ===================================================================<br>> --- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c (rev 0)<br>> +++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c 2007-07-10 02:27:37 UTC (rev 11203)
<br>> @@ -0,0 +1,113 @@<br>> +/**<br>> + * $Id: CMP_normalize.c,v 1.0 2007/03/24 06:57:29 scourage Exp $<br>> + *<br>> + * ***** BEGIN GPL LICENSE BLOCK *****<br>> + *<br>> + * This program is free software; you can redistribute it and/or
<br>> + * modify it under the terms of the GNU General Public License<br>> + * as published by the Free Software Foundation; either version 2<br>> + * of the License, or (at your option) any later version.<br>> + *
<br>> + * This program is distributed in the hope that it will be useful,<br>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<br>> + * GNU General Public License for more details.<br>> + *<br>> + * You should have received a copy of the GNU General Public License<br>> + * along with this program; if not, write to the Free Software Foundation,
<br>> + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.<br>> + *<br>> + * The Original Code is Copyright (C) 2006 Blender Foundation.<br>> + * All rights reserved.<br>> + *<br>> + * The Original Code is: all of this file.
<br>> + *<br>> + * Contributor(s): none yet.<br>> + *<br>> + * ***** END GPL LICENSE BLOCK *****<br>> + */<br><br>But forgot to review the legal block or just replace with one you know<br>to be good and then fill the fields as required. What if patch sneaked
<br>something weird there?<br><br>> +<br>> +#include "../CMP_util.h"<br>> +<br>> +<br><br>Lines below a mostly a 100% copy of the patch, so hard to go with the<br>"oops, this is another version".
<br><br>> +/* **************** NORMALIZE single channel, useful for Z buffer ******************** */<br>> +static bNodeSocketType cmp_node_normalize_in[]= {<br>> + { SOCK_VALUE, 1, "Value",
1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},<br>> + { -1, 0, "" }<br>> +};<br>> +static bNodeSocketType cmp_node_normalize_out[]= {<br>> + { SOCK_VALUE, 0, "Value", 1.0f, 0.0f
, 0.0f, 1.0f, 0.0f, 1.0f},<br>> + { -1, 0, "" }<br>> +};<br>> +<br>> +static void do_normalize(bNode *node, float *out, float *src, float *min, float *mult)<br>> +{<br>> + float res;
<br>> + res = (src[0] - min[0]) * mult[0];<br>> + if (res > 1.0f) {<br>> + out[0] = 1.0f;<br>> + }<br>> + else if (res < 0.0f) {<br>> + out[0] = 0.0f;<br>> + }
<br>> + else {<br>> + out[0] = res;<br>> + }<br>> +}<br>> +<br>> +#define BLENDER_ZMAX 10000.0f<br>> +<br>> +static void node_composit_exec_normalize(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
<br>> +{<br>> + /* stack order in: valbuf */<br>> + /* stack order out: valbuf */<br>> + if(out[0]->hasoutput==0) return;<br>> +<br>> + /* input no image? then only value operation */<br>
> + if(in[0]->data==NULL) {<br>> + QUATCOPY(out[0]->vec, in[0]->vec);<br>> + }<br>> + else {<br>> + float min = 1.0f+BLENDER_ZMAX;<br>> + float max = -
1.0f-BLENDER_ZMAX;<br>> + float mult = 1.0f;<br>> + float *val;<br>> + /* make output size of input image */<br>> + CompBuf *cbuf= in[0]->data;<br>> + int tot= cbuf->x*cbuf->y;
<br>> + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */<br>> +<br>> + for (val = cbuf->rect; tot; tot--, val++) {<br>> + if ((*val > max) && (*val < BLENDER_ZMAX)) {
<br>> + max = *val;<br>> + }<br>> + if (*val < min) {<br>> + min = *val;<br>> + }<br>> + }
<br>> + mult = 1.0f/(max-min);<br>> +<br>> + printf("min %f max %f\n", min, max);<br><br>Debug line. I doubt users will like that printed per pass (it could be<br>useful as out sockets or as extra statistic nodes, tho).
<br><br>> +<br>> + composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, NULL, &min, NULL, &mult, do_normalize, CB_VAL, CB_VAL, CB_VAL);<br>> +<br>> + out[0]->data= stackbuf;
<br>> + }<br>> +}<br>> +<br>> +bNodeType cmp_node_normalize= {<br>> + /* *next, *prev*/ NULL, NULL,<br>> + /* type code */ CMP_NODE_NORMALIZE,<br>> + /* name */ "Normalize",
<br>> + /* width+range */ 100, 60, 150,<br>> + /* class+opts */ NODE_CLASS_OP_VECTOR, NODE_OPTIONS,<br>> + /* input sock */ cmp_node_normalize_in,<br>> + /* output sock */ cmp_node_normalize_out,
<br>> + /* storage */ "TexMapping",<br>> + /* execfunc */ node_composit_exec_normalize,<br>> + /* butfunc */ NULL,<br>> + /* initfunc */ NULL,<br>> + /* freestoragefunc */ NULL,
<br>> + /* copystoragefunc */ NULL,<br>> + /* id */ NULL<br>> +};<br><br>Some fields added here, probably it failed to compile with new changes<br>to node system, so indeed the review was half-half.
<br><br>GSR<br><br>_______________________________________________<br>Bf-committers mailing list<br><a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br><a href="http://lists.blender.org/mailman/listinfo/bf-committers">
http://lists.blender.org/mailman/listinfo/bf-committers</a><br></blockquote></div><br>