[Bf-blender-cvs] [34487cd] particles_refactor: Basic RNA for paged buffer and nparticle buffer.

Lukas Tönne noreply at git.blender.org
Tue Apr 22 12:05:26 CEST 2014


Commit: 34487cd754610bf00631ec3eee6cff93fa1ae846
Author: Lukas Tönne
Date:   Tue Jun 4 16:55:49 2013 +0200
https://developer.blender.org/rB34487cd754610bf00631ec3eee6cff93fa1ae846

Basic RNA for paged buffer and nparticle buffer.

===================================================================

M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/makesrna/intern/makesrna.c
M	source/blender/makesrna/intern/rna_internal.h
M	source/blender/makesrna/intern/rna_modifier.c
A	source/blender/makesrna/intern/rna_nparticle.c
A	source/blender/makesrna/intern/rna_pagedbuffer.c

===================================================================

diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 6a0208a..56656aa 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -66,9 +66,11 @@ set(DEFSRC
 	rna_movieclip.c
 	rna_nla.c
 	rna_nodetree.c
+	rna_nparticle.c
 	rna_object.c
 	rna_object_force.c
 	rna_packedfile.c
+	rna_pagedbuffer.c
 	rna_particle.c
 	rna_pose.c
 	rna_property.c
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 76a9677..6a7a98d 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -3262,9 +3262,11 @@ static RNAProcessItem PROCESS_ITEMS[] = {
 	{"rna_modifier.c", NULL, RNA_def_modifier},
 	{"rna_nla.c", NULL, RNA_def_nla},
 	{"rna_nodetree.c", NULL, RNA_def_nodetree},
+	{"rna_nparticle.c", NULL, RNA_def_nparticle},
 	{"rna_object.c", "rna_object_api.c", RNA_def_object},
 	{"rna_object_force.c", NULL, RNA_def_object_force},
 	{"rna_packedfile.c", NULL, RNA_def_packedfile},
+	{"rna_pagedbuffer.c", NULL, RNA_def_pagedbuffer},
 	{"rna_particle.c", NULL, RNA_def_particle},
 	{"rna_pose.c", "rna_pose_api.c", RNA_def_pose},
 	{"rna_property.c", NULL, RNA_def_gameproperty},
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index d75ee25..19aad4b 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -161,9 +161,11 @@ void RNA_def_meta(struct BlenderRNA *brna);
 void RNA_def_modifier(struct BlenderRNA *brna);
 void RNA_def_nla(struct BlenderRNA *brna);
 void RNA_def_nodetree(struct BlenderRNA *brna);
+void RNA_def_nparticle(struct BlenderRNA *brna);
 void RNA_def_object(struct BlenderRNA *brna);
 void RNA_def_object_force(struct BlenderRNA *brna);
 void RNA_def_packedfile(struct BlenderRNA *brna);
+void RNA_def_pagedbuffer(struct BlenderRNA *brna);
 void RNA_def_particle(struct BlenderRNA *brna);
 void RNA_def_pose(struct BlenderRNA *brna);
 void RNA_def_render(struct BlenderRNA *brna);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 82fec32..5aa3de3 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -3660,6 +3660,9 @@ static void rna_def_modifier_nparticlesystem(BlenderRNA *brna)
 	RNA_def_struct_ui_text(srna, "NParticle System Modifier", "Particles");
 	RNA_def_struct_sdna(srna, "NParticleSystemModifierData");
 	RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
+
+	prop = RNA_def_property(srna, "buffer", PROP_POINTER, PROP_NONE);
+	RNA_def_property_ui_text(prop, "Particle Buffer", "Particle data used by the system");
 }
 
 void RNA_def_modifier(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_nparticle.c b/source/blender/makesrna/intern/rna_nparticle.c
new file mode 100644
index 0000000..009bf93
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_nparticle.c
@@ -0,0 +1,54 @@
+/*
+ * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Lukas Toenne
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/makesrna/intern/rna_nparticle.c
+ *  \ingroup RNA
+ */
+
+#include "DNA_nparticle_types.h"
+
+#include "RNA_define.h"
+
+#include "rna_internal.h"
+
+#ifdef RNA_RUNTIME
+
+#include "BKE_nparticle.h"
+
+
+#else
+
+static void rna_def_nparticle_buffer(BlenderRNA *brna)
+{
+	StructRNA *srna;
+	PropertyRNA *prop;
+
+	srna = RNA_def_struct(brna, "NParticleBuffer", NULL);
+	RNA_def_struct_ui_text(srna, "Particle Buffer", "Container for particles");
+}
+
+void RNA_def_nparticle(BlenderRNA *brna)
+{
+	rna_def_nparticle_buffer(brna);
+}
+
+#endif
diff --git a/source/blender/makesrna/intern/rna_pagedbuffer.c b/source/blender/makesrna/intern/rna_pagedbuffer.c
new file mode 100644
index 0000000..a1267be
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_pagedbuffer.c
@@ -0,0 +1,64 @@
+/*
+ * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Lukas Toenne
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/makesrna/intern/rna_pagedbuffer.c
+ *  \ingroup RNA
+ */
+
+#include "DNA_pagedbuffer_types.h"
+
+#include "RNA_define.h"
+
+#include "rna_internal.h"
+
+#ifdef RNA_RUNTIME
+
+#include "BLI_pagedbuffer.h"
+
+
+#else
+
+static void rna_def_pagedbuffer_layer(BlenderRNA *brna)
+{
+	StructRNA *srna;
+	PropertyRNA *prop;
+
+	srna = RNA_def_struct(brna, "PagedBufferLayer", NULL);
+	RNA_def_struct_ui_text(srna, "Paged Buffer Layer", "Data layer in a paged buffer");
+}
+
+static void rna_def_pagedbuffer(BlenderRNA *brna)
+{
+	StructRNA *srna;
+	PropertyRNA *prop;
+
+	srna = RNA_def_struct(brna, "PagedBuffer", NULL);
+	RNA_def_struct_ui_text(srna, "Paged Buffer", "Optimized buffer for multiple data layers with dynamic size");
+}
+
+void RNA_def_pagedbuffer(BlenderRNA *brna)
+{
+	rna_def_pagedbuffer_layer(brna);
+	rna_def_pagedbuffer(brna);
+}
+
+#endif




More information about the Bf-blender-cvs mailing list