Blender  V2.93
rna_simulation.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 
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 
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");
46  RNA_def_property_ui_text(prop, "Node Tree", "Node tree defining the simulation");
47 
48  /* common */
50 }
51 
53 {
54  rna_def_simulation(brna);
55 }
56 
57 #endif
@ PROP_POINTER
Definition: RNA_types.h:78
@ PROP_PTR_NO_OWNERSHIP
Definition: RNA_types.h:242
@ PROP_NONE
Definition: RNA_types.h:113
void rna_def_animdata_common(StructRNA *srna)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2762
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1676
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1259
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1279
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1517
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1047
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
Definition: rna_define.c:1267
void RNA_def_simulation(BlenderRNA *brna)
static void rna_def_simulation(BlenderRNA *brna)