Blender  V2.93
node_composite_util.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) 2006 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include "node_composite_util.h"
25 
28  const char **r_disabled_hint)
29 {
30  if (!STREQ(ntree->idname, "CompositorNodeTree")) {
31  *r_disabled_hint = "Not a compositor node tree";
32  return false;
33  }
34  return true;
35 }
36 
38 {
39  bNodeSocket *sock;
40  for (sock = node->outputs.first; sock; sock = sock->next) {
41  if (sock->cache) {
42  // free_compbuf(sock->cache);
43  // sock->cache = NULL;
44  }
45  }
46  node->need_exec = 1;
47 }
48 
49 void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
50 {
51  node_type_base(ntype, type, name, nclass, flag);
52 
53  ntype->poll = cmp_node_poll_default;
57 }
void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
Definition: node.cc:4443
#define UNUSED(x)
#define STREQ(a, b)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
OperationNode * node
bNodeTree * ntree
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
bool cmp_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree, const char **r_disabled_hint)
void cmp_node_update_default(bNodeTree *UNUSED(ntree), bNode *node)
void node_insert_link_default(bNodeTree *ntree, bNode *node, bNodeLink *link)
Definition: node_util.c:305
void node_update_internal_links_default(bNodeTree *ntree, bNode *node)
Definition: node_util.c:503
struct bNodeSocket * next
char idname[64]
Defines a node type.
Definition: BKE_node.h:221
bool(* poll)(struct bNodeType *ntype, struct bNodeTree *nodetree, const char **r_disabled_hint)
Definition: BKE_node.h:301
void(* update_internal_links)(struct bNodeTree *, struct bNode *node)
Definition: BKE_node.h:312
void(* updatefunc)(struct bNodeTree *ntree, struct bNode *node)
Definition: BKE_node.h:274
void(* insert_link)(struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link)
Definition: BKE_node.h:310