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 
17 #include "BKE_node.h"
18 
19 #include "NOD_simulation.h"
20 
21 #include "NOD_common.h"
22 #include "node_common.h"
23 #include "node_simulation_util.h"
24 
register_node_type_sim_group(void)25 void register_node_type_sim_group(void)
26 {
27   static bNodeType ntype;
28 
29   node_type_base_custom(&ntype, "SimulationNodeGroup", "Group", 0, 0);
30   ntype.type = NODE_GROUP;
31   ntype.poll = sim_node_poll_default;
32   ntype.poll_instance = node_group_poll_instance;
33   ntype.insert_link = node_insert_link_default;
34   ntype.update_internal_links = node_update_internal_links_default;
35   ntype.rna_ext.srna = RNA_struct_find("SimulationNodeGroup");
36   BLI_assert(ntype.rna_ext.srna != NULL);
37   RNA_struct_blender_type_set(ntype.rna_ext.srna, &ntype);
38 
39   node_type_socket_templates(&ntype, NULL, NULL);
40   node_type_size(&ntype, 140, 60, 400);
41   node_type_label(&ntype, node_group_label);
42   node_type_group_update(&ntype, node_group_update);
43 
44   nodeRegisterType(&ntype);
45 }
46