Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-04-21 19:53:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-21 19:53:30 +0400
commitf9f771cd01b626be30a85a533ea622bcedd981f5 (patch)
tree45c3744fc35aeeebfcfd641ea3c0b3b9aa6303fe /source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
parent210ee1ade4b4ec5b6f2d3710986171a21a4b8604 (diff)
converted more mixed tab/space indentations to tabs. only whitespace changes.
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
index 2694c0559d7..5f7613464c1 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
@@ -53,35 +53,35 @@ static void do_distance_matte(bNode *node, float *out, float *in)
{
NodeChroma *c= (NodeChroma *)node->storage;
float tolerence=c->t1;
- float falloff=c->t2;
+ float falloff=c->t2;
float distance;
- float alpha;
-
- distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) +
+ float alpha;
+
+ distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) +
(c->key[1]-in[1])*(c->key[1]-in[1]) +
(c->key[2]-in[2])*(c->key[2]-in[2]));
- VECCOPY(out, in);
-
- /*make 100% transparent */
- if(distance < tolerence) {
- out[3]=0.0;
- }
- /*in the falloff region, make partially transparent */
- else if(distance < falloff+tolerence){
- distance=distance-tolerence;
- alpha=distance/falloff;
- /*only change if more transparent than before */
- if(alpha < in[3]) {
- out[3]=alpha;
- }
- else { /* leave as before */
- out[3]=in[3];
- }
- }
- else {
- out[3]=in[3];
- }
+ VECCOPY(out, in);
+
+ /*make 100% transparent */
+ if(distance < tolerence) {
+ out[3]=0.0;
+ }
+ /*in the falloff region, make partially transparent */
+ else if(distance < falloff+tolerence){
+ distance=distance-tolerence;
+ alpha=distance/falloff;
+ /*only change if more transparent than before */
+ if(alpha < in[3]) {
+ out[3]=alpha;
+ }
+ else { /* leave as before */
+ out[3]=in[3];
+ }
+ }
+ else {
+ out[3]=in[3];
+ }
}
static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
@@ -124,10 +124,10 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac
static void node_composit_init_distance_matte(bNode *node)
{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
- node->storage= c;
- c->t1= 0.1f;
- c->t2= 0.1f;
+ NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
+ node->storage= c;
+ c->t1= 0.1f;
+ c->t2= 0.1f;
}
void register_node_type_cmp_distance_matte(ListBase *lb)