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 /** \file
18  * \ingroup RNA
19  */
20 
21 #include <stdlib.h>
22 
23 #include "RNA_define.h"
24 #include "RNA_enum_types.h"
25 
26 #include "DNA_simulation_types.h"
27 
28 #include "rna_internal.h"
29 
30 #ifdef RNA_RUNTIME
31 
32 #else
33 
rna_def_simulation(BlenderRNA * brna)34 static void rna_def_simulation(BlenderRNA *brna)
35 {
36   StructRNA *srna;
37   PropertyRNA *prop;
38 
39   srna = RNA_def_struct(brna, "Simulation", "ID");
40   RNA_def_struct_ui_text(srna, "Simulation", "Simulation data-block");
41   RNA_def_struct_ui_icon(srna, ICON_PHYSICS); /* TODO: Use correct icon. */
42 
43   prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
44   RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
45   RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
46   RNA_def_property_ui_text(prop, "Node Tree", "Node tree defining the simulation");
47 
48   /* common */
49   rna_def_animdata_common(srna);
50 }
51 
RNA_def_simulation(BlenderRNA * brna)52 void RNA_def_simulation(BlenderRNA *brna)
53 {
54   rna_def_simulation(brna);
55 }
56 
57 #endif
58