OLD | NEW |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version.· | 7 * of the License, or (at your option) any later version.· |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(nt
emp)) | 143 static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(nt
emp)) |
144 { | 144 { |
145 TexNodeOutput *tno = MEM_callocN(sizeof(TexNodeOutput), "TEX_output"); | 145 TexNodeOutput *tno = MEM_callocN(sizeof(TexNodeOutput), "TEX_output"); |
146 node->storage= tno; | 146 node->storage= tno; |
147 ········ | 147 ········ |
148 strcpy(tno->name, "Default"); | 148 strcpy(tno->name, "Default"); |
149 unique_name(node); | 149 unique_name(node); |
150 assign_index(node); | 150 assign_index(node); |
151 } | 151 } |
152 | 152 |
153 static void copy(bNode *orig, bNode *new) | 153 static void copy(bNodeTree *dest_ntree, bNode *dest_node, bNode *src_node) |
154 { | 154 { |
155 » node_copy_standard_storage(orig, new); | 155 » node_copy_standard_storage(dest_ntree, dest_node, src_node); |
156 » unique_name(new); | 156 » unique_name(dest_node); |
157 » assign_index(new); | 157 » assign_index(dest_node); |
158 } | 158 } |
159 | 159 |
160 void register_node_type_tex_output(bNodeTreeType *ttype) | 160 void register_node_type_tex_output(bNodeTreeType *ttype) |
161 { | 161 { |
162 static bNodeType ntype; | 162 static bNodeType ntype; |
163 ········ | 163 ········ |
164 node_type_base(ttype, &ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTP
UT, NODE_PREVIEW|NODE_OPTIONS); | 164 node_type_base(ttype, &ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTP
UT, NODE_PREVIEW|NODE_OPTIONS); |
165 node_type_socket_templates(&ntype, inputs, NULL); | 165 node_type_socket_templates(&ntype, inputs, NULL); |
166 node_type_size(&ntype, 150, 60, 200); | 166 node_type_size(&ntype, 150, 60, 200); |
167 node_type_init(&ntype, init); | 167 node_type_init(&ntype, init); |
168 node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, c
opy); | 168 node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, c
opy); |
169 node_type_exec(&ntype, exec); | 169 node_type_exec(&ntype, exec); |
170 ········ | 170 ········ |
171 /* Do not allow muting output. */ | 171 /* Do not allow muting output. */ |
172 node_type_mute(&ntype, NULL, NULL); | 172 node_type_mute(&ntype, NULL, NULL); |
173 ········ | 173 ········ |
174 nodeRegisterType(ttype, &ntype); | 174 nodeRegisterType(ttype, &ntype); |
175 } | 175 } |
OLD | NEW |