[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43266] trunk/blender/source/blender/nodes /composite/nodes/node_composite_doubleEdgeMask.c: SVN maintenance.

gsr b3d gsr.b3d at infernal-iceberg.com
Tue Jan 10 20:45:28 CET 2012


Revision: 43266
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43266
Author:   gsrb3d
Date:     2012-01-10 19:45:20 +0000 (Tue, 10 Jan 2012)
Log Message:
-----------
SVN maintenance.

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c

Property Changed:
----------------
    trunk/blender/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c

Modified: trunk/blender/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
===================================================================
--- trunk/blender/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c	2012-01-10 19:08:08 UTC (rev 43265)
+++ trunk/blender/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c	2012-01-10 19:45:20 UTC (rev 43266)
@@ -1,1183 +1,1181 @@
-/*
- * $Id: node_composite_doubleEdgeMask.c 35237 2012-01-01 03:06:22Z xgl.asyliax $
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2011 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Peter Larabell.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
- *  \ingroup cmpnodes
- */
-#include "node_composite_util.h"
-/* **************** DblEdgMatte  ******************** */
-
-
-static bNodeSocketTemplate cmp_node_doubleedgemask_in[]= {
-    { SOCK_FLOAT, 1, "Inner Mask", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE},  // inner mask socket definition
-    { SOCK_FLOAT, 1, "Outer Mask", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE},  // outer mask socket definition
-    { -1, 0, ""	}                                                                   // input socket array terminator
-};
-static bNodeSocketTemplate cmp_node_doubleedgemask_out[]= {
-    { SOCK_FLOAT, 0, "Mask"},          // output socket definition
-    { -1, 0, "" }                      // output socket array terminator
-};
-
-static void do_adjacentKeepBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize){
-    int x;
-    unsigned int isz=0; // inner edge size
-    unsigned int osz=0; // outer edge size
-    unsigned int gsz=0; // gradient fill area size
-    /* Test the four corners */
-    /* upper left corner */
-    x=t-rw+1;
-    // test if inner mask is filled
-    if(limask[x]){
-        // test if pixel underneath, or to the right, are empty in the inner mask,
-        // but filled in the outer mask
-        if((!limask[x-rw] && lomask[x-rw]) || (!limask[x+1] && lomask[x+1])){
-            isz++;                               // increment inner edge size
-            lres[x]=4;                           // flag pixel as inner edge
-        } else {
-            res[x]=1.0f;                         // pixel is just part of inner mask, and it's not an edge
-        }
-    } else if(lomask[x]){                        // inner mask was empty, test if outer mask is filled
-        osz++;                                   // increment outer edge size
-        lres[x]=3;                               // flag pixel as outer edge
-    }
-    /* upper right corner */
-    x=t;
-    // test if inner mask is filled
-    if(limask[x]){
-        // test if pixel underneath, or to the left, are empty in the inner mask,
-        // but filled in the outer mask
-        if((!limask[x-rw] && lomask[x-rw]) || (!limask[x-1] && lomask[x-1])){
-            isz++;                               // increment inner edge size
-            lres[x]=4;                           // flag pixel as inner edge
-        } else {
-            res[x]=1.0f;                         // pixel is just part of inner mask, and it's not an edge
-        }
-    } else if(lomask[x]){                        // inner mask was empty, test if outer mask is filled
-        osz++;                                   // increment outer edge size
-        lres[x]=3;                               // flag pixel as outer edge
-    }
-    /* lower left corner */
-    x=0;
-    // test if inner mask is filled
-    if(limask[x]){
-        // test if pixel above, or to the right, are empty in the inner mask,
-        // but filled in the outer mask
-        if((!limask[x+rw] && lomask[x+rw]) || (!limask[x+1] && lomask[x+1])){
-            isz++;                               // increment inner edge size
-            lres[x]=4;                           // flag pixel as inner edge
-        } else {
-            res[x]=1.0f;                         // pixel is just part of inner mask, and it's not an edge
-        }
-    } else if(lomask[x]){                        // inner mask was empty, test if outer mask is filled
-        osz++;                                   // increment outer edge size
-        lres[x]=3;                               // flag pixel as outer edge
-    }
-    /* lower right corner */
-    x=rw-1;
-    // test if inner mask is filled
-    if(limask[x]){
-        // test if pixel above, or to the left, are empty in the inner mask,
-        // but filled in the outer mask
-        if((!limask[x+rw] && lomask[x+rw]) || (!limask[x-1] && lomask[x-1])){
-            isz++;                               // increment inner edge size
-            lres[x]=4;                           // flag pixel as inner edge
-        } else {
-            res[x]=1.0f;                         // pixel is just part of inner mask, and it's not an edge
-        }
-    } else if(lomask[x]){                        // inner mask was empty, test if outer mask is filled
-        osz++;                                   // increment outer edge size
-        lres[x]=3;                               // flag pixel as outer edge
-    }
-
-    /* Test the TOP row of pixels in buffer, except corners */
-    for(x= t-1; x>=(t-rw)+2; x--) {
-        // test if inner mask is filled
-        if(limask[x]) {
-            // test if pixel to the right, or to the left, are empty in the inner mask,
-            // but filled in the outer mask
-            if((!limask[x-1] && lomask[x-1]) || (!limask[x+1] && lomask[x+1])) {
-                isz++;                           // increment inner edge size
-                lres[x]=4;                       // flag pixel as inner edge
-            } else {
-                res[x]=1.0f;                     // pixel is just part of inner mask, and it's not an edge
-            }
-        } else if(lomask[x]) {                   // inner mask was empty, test if outer mask is filled
-            osz++;                               // increment outer edge size
-            lres[x]=3;                           // flag pixel as outer edge
-        }
-    }
-
-    /* Test the BOTTOM row of pixels in buffer, except corners */
-    for(x= rw-2; x; x--) {
-        // test if inner mask is filled
-        if(limask[x]) {
-            // test if pixel to the right, or to the left, are empty in the inner mask,
-            // but filled in the outer mask
-            if((!limask[x-1] && lomask[x-1]) || (!limask[x+1] && lomask[x+1])) {
-                isz++;                           // increment inner edge size
-                lres[x]=4;                       // flag pixel as inner edge
-            } else {
-                res[x]=1.0f;                     // pixel is just part of inner mask, and it's not an edge
-            }
-        } else if(lomask[x]) {                   // inner mask was empty, test if outer mask is filled
-            osz++;                               // increment outer edge size
-            lres[x]=3;                           // flag pixel as outer edge
-        }
-    }
-    /* Test the LEFT edge of pixels in buffer, except corners */
-    for(x= t-(rw<<1)+1; x>=rw; x-=rw) {
-        // test if inner mask is filled
-        if(limask[x]) {
-            // test if pixel underneath, or above, are empty in the inner mask,
-            // but filled in the outer mask
-            if((!limask[x-rw] && lomask[x-rw]) || (!limask[x+rw] && lomask[x+rw])) {
-                isz++;                           // increment inner edge size
-                lres[x]=4;                       // flag pixel as inner edge
-            } else {
-                res[x]=1.0f;                     // pixel is just part of inner mask, and it's not an edge
-            }
-        } else if(lomask[x]) {                   // inner mask was empty, test if outer mask is filled
-            osz++;                               // increment outer edge size
-            lres[x]=3;                           // flag pixel as outer edge
-        }
-    }
-
-    /* Test the RIGHT edge of pixels in buffer, except corners */
-    for(x= t-rw; x>rw; x-=rw) {
-        // test if inner mask is filled
-        if(limask[x]) {
-            // test if pixel underneath, or above, are empty in the inner mask,
-            // but filled in the outer mask
-            if((!limask[x-rw] && lomask[x-rw]) || (!limask[x+rw] && lomask[x+rw])) {
-                isz++;                           // increment inner edge size
-                lres[x]=4;                       // flag pixel as inner edge
-            } else {
-                res[x]=1.0f;                     // pixel is just part of inner mask, and it's not an edge
-            }
-        } else if(lomask[x]) {                   // inner mask was empty, test if outer mask is filled
-            osz++;                               // increment outer edge size
-            lres[x]=3;                           // flag pixel as outer edge
-        }
-    }
-
-    rsize[0]=isz;  // fill in our return sizes for edges + fill
-    rsize[1]=osz;
-    rsize[2]=gsz;
-}
-
-static void do_adjacentBleedBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize){
-    int x;
-    unsigned int isz=0; // inner edge size
-    unsigned int osz=0; // outer edge size
-    unsigned int gsz=0; // gradient fill area size

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list