Blender V2.61 - r43446

node_util.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version. 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2007 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): Nathan Letwory.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00033 #ifndef NODE_UTIL_H_
00034 #define NODE_UTIL_H_
00035 
00036 #include "DNA_listBase.h"
00037 
00038 #include "BKE_node.h"
00039 
00040 #include "MEM_guardedalloc.h"
00041 
00042 #include "NOD_socket.h"
00043 
00044 #include "GPU_material.h" /* For Shader muting GPU code... */
00045 
00046 struct bNodeTree;
00047 struct bNode;
00048 
00049 /**** Storage Data ****/
00050 
00051 extern void node_free_curves(struct bNode *node);
00052 extern void node_free_standard_storage(struct bNode *node);
00053 
00054 extern void node_copy_curves(struct bNode *orig_node, struct bNode *new_node);
00055 extern void node_copy_standard_storage(struct bNode *orig_node, struct bNode *new_node);
00056 
00057 /**** Labels ****/
00058 
00059 const char *node_blend_label(struct bNode *node);
00060 const char *node_math_label(struct bNode *node);
00061 const char *node_vect_math_label(struct bNode *node);
00062 const char *node_filter_label(struct bNode *node);
00063 
00064 typedef struct LinkInOutsMuteNode
00065 {
00066     struct LinkInOutsMuteNode *next, *prev;
00067     void *in, *outs;
00068     unsigned int num_outs; /* If > 1, outs is an array of pointers that need to be freed too! */
00069 } LinkInOutsMuteNode;
00070 ListBase node_mute_get_links(struct bNodeTree *ntree, struct bNode *node, struct bNodeStack **nsin,
00071                              struct bNodeStack **nsout, struct GPUNodeStack *gnsin, struct GPUNodeStack *gnsout);
00072 
00073 #endif
00074 
00075 // this is needed for inlining behaviour
00076 #if defined _WIN32
00077 #   define DO_INLINE __inline
00078 #elif defined (__sun) || defined (__sun__)
00079 #   define DO_INLINE
00080 #else
00081 #   define DO_INLINE static inline
00082 #endif
00083