Blender
V2.93
source
blender
nodes
composite
nodes
node_composite_stabilize2d.c
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2011 Blender Foundation.
17
* All rights reserved.
18
*/
19
24
#include "
node_composite_util.h
"
25
26
#include "
BKE_context.h
"
27
#include "
BKE_lib_id.h
"
28
29
/* **************** Translate ******************** */
30
31
static
bNodeSocketTemplate
cmp_node_stabilize2d_in
[] = {
32
{
SOCK_RGBA
,
N_
(
"Image"
), 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
33
{-1,
""
},
34
};
35
36
static
bNodeSocketTemplate
cmp_node_stabilize2d_out
[] = {
37
{
SOCK_RGBA
,
N_
(
"Image"
)},
38
{-1,
""
},
39
};
40
41
static
void
init
(
const
bContext
*
C
,
PointerRNA
*
ptr
)
42
{
43
bNode
*
node
=
ptr
->
data
;
44
Scene
*
scene
=
CTX_data_scene
(
C
);
45
46
node
->id = (
ID
*)
scene
->
clip
;
47
id_us_plus
(
node
->id);
48
49
/* default to bilinear, see node_sampler_type_items in rna_nodetree.c */
50
node
->custom1 = 1;
51
}
52
53
void
register_node_type_cmp_stabilize2d
(
void
)
54
{
55
static
bNodeType
ntype;
56
57
cmp_node_type_base
(&ntype,
CMP_NODE_STABILIZE2D
,
"Stabilize 2D"
,
NODE_CLASS_DISTORT
, 0);
58
node_type_socket_templates
(&ntype,
cmp_node_stabilize2d_in
,
cmp_node_stabilize2d_out
);
59
ntype.
initfunc_api
=
init
;
60
61
nodeRegisterType
(&ntype);
62
}
BKE_context.h
CTX_data_scene
struct Scene * CTX_data_scene(const bContext *C)
Definition:
context.c:1034
BKE_lib_id.h
id_us_plus
void id_us_plus(struct ID *id)
Definition:
lib_id.c:288
node_type_socket_templates
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
Definition:
node.cc:4527
NODE_CLASS_DISTORT
#define NODE_CLASS_DISTORT
Definition:
BKE_node.h:343
CMP_NODE_STABILIZE2D
#define CMP_NODE_STABILIZE2D
Definition:
BKE_node.h:1194
nodeRegisterType
void nodeRegisterType(struct bNodeType *ntype)
Definition:
node.cc:1298
N_
#define N_(msgid)
Definition:
BLT_translation.h:50
SOCK_RGBA
@ SOCK_RGBA
Definition:
DNA_node_types.h:158
C
#define C
Definition:
RandGen.cpp:39
node
OperationNode * node
Definition:
deg_builder_cycle.cc:54
scene
Scene scene
Definition:
deg_eval_copy_on_write.cc:120
init
static void init(const bContext *C, PointerRNA *ptr)
Definition:
node_composite_stabilize2d.c:41
register_node_type_cmp_stabilize2d
void register_node_type_cmp_stabilize2d(void)
Definition:
node_composite_stabilize2d.c:53
cmp_node_stabilize2d_out
static bNodeSocketTemplate cmp_node_stabilize2d_out[]
Definition:
node_composite_stabilize2d.c:36
cmp_node_stabilize2d_in
static bNodeSocketTemplate cmp_node_stabilize2d_in[]
Definition:
node_composite_stabilize2d.c:31
cmp_node_type_base
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
Definition:
node_composite_util.c:49
node_composite_util.h
ID
Definition:
DNA_ID.h:273
PointerRNA
Definition:
RNA_types.h:49
PointerRNA::data
void * data
Definition:
RNA_types.h:52
Scene
Definition:
DNA_scene_types.h:1684
Scene::clip
struct MovieClip * clip
Definition:
DNA_scene_types.h:1764
bContext
Definition:
context.c:69
bNodeSocketTemplate
Compact definition of a node socket.
Definition:
BKE_node.h:95
bNodeType
Defines a node type.
Definition:
BKE_node.h:221
bNodeType::initfunc_api
void(* initfunc_api)(const struct bContext *C, struct PointerRNA *ptr)
Definition:
BKE_node.h:288
bNode
Definition:
DNA_node_types.h:212
ptr
PointerRNA * ptr
Definition:
wm_files.c:3157
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1