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:
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_moviedistortion.c')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_moviedistortion.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
index f6ffc783b08..d9f0da9b8aa 100644
--- a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
+++ b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
@@ -4,7 +4,7 @@
* 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.
+ * 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
@@ -37,12 +37,12 @@
/* **************** Translate ******************** */
-static bNodeSocketTemplate cmp_node_moviedistortion_in[] = {
+static bNodeSocketTemplate cmp_node_moviedistortion_in[]= {
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketTemplate cmp_node_moviedistortion_out[] = {
+static bNodeSocketTemplate cmp_node_moviedistortion_out[]= {
{ SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -51,63 +51,63 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
if (in[0]->data) {
if (node->id) {
- MovieClip *clip = (MovieClip *)node->id;
- CompBuf *cbuf = typecheck_compbuf(in[0]->data, CB_RGBA);
- CompBuf *stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 0);
+ MovieClip *clip= (MovieClip *)node->id;
+ CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
+ CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 0);
ImBuf *ibuf;
- ibuf = IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
+ ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
if (ibuf) {
- RenderData *rd = data;
+ RenderData *rd= data;
ImBuf *obuf;
- MovieTracking *tracking = &clip->tracking;
+ MovieTracking *tracking= &clip->tracking;
int width, height;
- float overscan = 0.0f;
- MovieClipUser user = {0};
+ float overscan= 0.0f;
+ MovieClipUser user= {0};
BKE_movieclip_user_set_frame(&user, rd->cfra);
- ibuf->rect_float = cbuf->rect;
+ ibuf->rect_float= cbuf->rect;
BKE_movieclip_get_size(clip, &user, &width, &height);
if (!node->storage)
- node->storage = BKE_tracking_distortion_create();
+ node->storage= BKE_tracking_distortion_create();
- if (node->custom1 == 0)
+ if (node->custom1==0)
obuf= BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 1);
else
obuf= BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 0);
- stackbuf->rect = obuf->rect_float;
- stackbuf->malloc = TRUE;
+ stackbuf->rect= obuf->rect_float;
+ stackbuf->malloc= 1;
- obuf->mall &= ~IB_rectfloat;
- obuf->rect_float = NULL;
+ obuf->mall&= ~IB_rectfloat;
+ obuf->rect_float= NULL;
IMB_freeImBuf(ibuf);
IMB_freeImBuf(obuf);
}
/* pass on output and free */
- out[0]->data = stackbuf;
+ out[0]->data= stackbuf;
- if (cbuf != in[0]->data)
+ if (cbuf!=in[0]->data)
free_compbuf(cbuf);
}
else {
- CompBuf *cbuf = in[0]->data;
- CompBuf *stackbuf = pass_on_compbuf(cbuf);
+ CompBuf *cbuf= in[0]->data;
+ CompBuf *stackbuf= pass_on_compbuf(cbuf);
- out[0]->data = stackbuf;
+ out[0]->data= stackbuf;
}
}
}
static const char *label(bNode *node)
{
- if (node->custom1 == 0)
+ if (node->custom1==0)
return IFACE_("Undistortion");
else
return IFACE_("Distortion");
@@ -124,7 +124,7 @@ static void storage_free(bNode *node)
static void storage_copy(bNode *orig_node, bNode *new_node)
{
if (orig_node->storage)
- new_node->storage = BKE_tracking_distortion_copy(orig_node->storage);
+ new_node->storage= BKE_tracking_distortion_copy(orig_node->storage);
}
void register_node_type_cmp_moviedistortion(bNodeTreeType *ttype)