Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-01 02:50:02 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-01 02:50:02 +0300
commit7f24dbe5fc5a00ee161717070deb6baf4af8e83e (patch)
tree3d62a641123bdd8c61e9d2bf5b40203befac2597 /source/blender/makesdna/DNA_genfile.h
parentb589489ef8d56976165fb88ebf7b59dbc417d443 (diff)
RNA / Data API
This is the first code for the Data API, also known as RNA system in the 2.5 Branch. It does not include a user interface, and only wraps some Scene properties for testing. It is integrated with Scons and Makefiles, and compiles a 'makesrna' program that generates an RNA.c file. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataAPI http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA The changes are quite local, basically adding a makesrna module which works similar to the makesdna module. The one external change is in moving genfile.c from blenloader to the makesdna module, so that it can be reused by the RNA code. This also meant changing the DNA makefiles. It seems to be doing dependencies correct still in my tests, but if there is an issue with the DNA not being rebuilt this commit might be the one causing it. Also it seems for scons the makesdna and makesrna modules are compiling without warnings. Not a new issue but this should be fixed. The RNA code supports all types as defined in the Data API design, so in that sense it is fairly complete and I hope that aspect will not have to change much. Some obviously missing parts are context related code, notify() functions for updates and user defined / ID properties.
Diffstat (limited to 'source/blender/makesdna/DNA_genfile.h')
-rw-r--r--source/blender/makesdna/DNA_genfile.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
new file mode 100644
index 00000000000..4b9401bf4b9
--- /dev/null
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -0,0 +1,52 @@
+/*
+ * $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.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ * blenloader genfile private function prototypes
+ */
+
+#ifndef GENFILE_H
+#define GENFILE_H
+
+struct SDNA;
+
+extern unsigned char DNAstr[]; /* DNA.c */
+extern int DNAlen;
+
+struct SDNA *DNA_sdna_from_data(void *data, int datalen, int do_endian_swap);
+void DNA_sdna_free(struct SDNA *sdna);
+
+int DNA_struct_find_nr(struct SDNA *sdna, const char *str);
+void DNA_struct_switch_endian(struct SDNA *oldsdna, int oldSDNAnr, char *data);
+char *DNA_struct_get_compareflags(struct SDNA *sdna, struct SDNA *newsdna);
+void *DNA_struct_reconstruct(struct SDNA *newsdna, struct SDNA *oldsdna, char *compflags, int oldSDNAnr, int blocks, void *data);
+
+int DNA_elem_array_size(const char *astr, int len);
+int DNA_elem_offset(struct SDNA *sdna, char *stype, char *vartype, char *name);
+
+#endif
+
+