From a371f5513a749dcebe789f2e00870083f26725b4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 2 Jan 2009 13:47:33 +0000 Subject: RNA * Added skeleton code for particle/object_force/userdef. * More Object properties wrapped. * Added User Preferences display in outliner. --- source/blender/makesrna/intern/rna_particle.c | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 source/blender/makesrna/intern/rna_particle.c (limited to 'source/blender/makesrna/intern/rna_particle.c') diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c new file mode 100644 index 00000000000..25e3df40111 --- /dev/null +++ b/source/blender/makesrna/intern/rna_particle.c @@ -0,0 +1,66 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Blender Foundation (2008). + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include + +#include "RNA_define.h" +#include "RNA_types.h" + +#include "rna_internal.h" + +#include "DNA_particle_types.h" + +#ifdef RNA_RUNTIME + +#else + +static void rna_def_particlesettings(BlenderRNA *brna) +{ + StructRNA *srna; + + srna= RNA_def_struct(brna, "ParticleSettings", "ID"); + RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems."); +} + +static void rna_def_particlesystem(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "ParticleSystem", NULL); + RNA_def_struct_ui_text(srna, "Particle System", "Particle system in an object."); + + prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "part"); + RNA_def_property_ui_text(prop, "Settings", "Particle system settings."); +} + +void RNA_def_particle(BlenderRNA *brna) +{ + rna_def_particlesystem(brna); + rna_def_particlesettings(brna); +} + +#endif + -- cgit v1.2.3