RNA
authorAndrea Weikert <elubie@gmx.net>
Mon, 1 Dec 2008 21:23:58 +0000 (21:23 +0000)
committerAndrea Weikert <elubie@gmx.net>
Mon, 1 Dec 2008 21:23:58 +0000 (21:23 +0000)
* DNA_packedFile_types: added rna definitions for packed files
* also experimentally filled in correct struct 'PackedFile' in image rna for testing.
* updated MSVC projectfiles (also for rna_curve.c and rna_vfont.c)

Note:
I removed PackedFile->flags, I did grep through source and a complete recompile of blender trunk svn without them too, so they obviously aren't needed anymore. A bit of cleaning up :)

projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
source/blender/makesdna/DNA_packedFile_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_packedfile.c [new file with mode: 0644]

index 9f424d46cdbd6dd2833362701d4227bc9cfa88c3..8a576c2da6df313e0ed3f465194a28d29e37fc04 100644 (file)
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_controller.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\makesrna\intern\rna_curve.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_define.c"\r
                                >\r
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_object.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\makesrna\intern\rna_packedfile.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_property.c"\r
                                >\r
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_sensor.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\makesrna\intern\rna_vfont.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_wm.c"\r
                                >\r
index 2c965c928497b832b0c71642fdba2dec03ed197b..f11c51692e1fcc6f12dc303425ec48421e86d0f6 100644 (file)
@@ -36,8 +36,6 @@
 typedef struct PackedFile {
        int size;
        int seek;
-       int flags;
-       int pad;
        void * data;
 } PackedFile;
 
@@ -60,3 +58,4 @@ enum PF_FileStatus
 
 #endif /* PACKEDFILE_TYPES_H */
 
+
index 6912f8f7274a0c9f4850004bfcc9809bf23209f5..68866b89852480bc77b9e4bb7952569b2b02f603 100644 (file)
@@ -97,6 +97,7 @@ extern StructRNA RNA_Node;
 extern StructRNA RNA_NodeTree;
 extern StructRNA RNA_Object;
 extern StructRNA RNA_Operator;
+extern StructRNA RNA_PackedFile;
 extern StructRNA RNA_Panel;
 extern StructRNA RNA_PointerProperty;
 extern StructRNA RNA_Property;
@@ -279,3 +280,4 @@ int RNA_property_is_set(PointerRNA *ptr, const char *name);
 
 #endif /* RNA_ACCESS */
 
+
index a1a98a5640499ca8ffb76bc60b346a6c013e0966..3c174b11834d42619e9a3db1d271d1bf82223c58 100644 (file)
@@ -894,6 +894,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
        {"rna_modifier.c", RNA_def_modifier},
        {"rna_nodetree.c", RNA_def_nodetree},
        {"rna_object.c", RNA_def_object},
+       {"rna_packedfile.c", RNA_def_packedfile},
        {"rna_property.c", RNA_def_gameproperty},
        {"rna_radio.c", RNA_def_radio},
        {"rna_rna.c", RNA_def_rna},
@@ -1016,3 +1017,4 @@ int main(int argc, char **argv)
        return return_status;
 }
 
+
index 8166d0aa11ef6566e5d63cfd0e78c074d3bf7996..17a0f9eadcd0c69d532a91386774cd50bf216f57 100644 (file)
@@ -128,7 +128,7 @@ static void rna_def_image(BlenderRNA *brna)
 
        prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
-       RNA_def_property_struct_type(prop, "UnknownType");
+       RNA_def_property_struct_type(prop, "PackedFile");
        RNA_def_property_ui_text(prop, "Packed File", "");
 
        /* booleans */
@@ -228,3 +228,4 @@ void RNA_def_image(BlenderRNA *brna)
 
 #endif
 
+
index 508390e51662121cb0168c6c8ebfcf96bc357241..1a89384517357ee73cd42167eeea957aae3b4d1e 100644 (file)
@@ -101,6 +101,7 @@ void RNA_def_meta(struct BlenderRNA *brna);
 void RNA_def_modifier(struct BlenderRNA *brna);
 void RNA_def_nodetree(struct BlenderRNA *brna);
 void RNA_def_object(struct BlenderRNA *brna);
+void RNA_def_packedfile(struct BlenderRNA *brna);
 void RNA_def_radio(struct BlenderRNA *brna);
 void RNA_def_rna(struct BlenderRNA *brna);
 void RNA_def_scene(struct BlenderRNA *brna);
@@ -170,3 +171,4 @@ void rna_freelistN(struct ListBase *listbase);
 
 #endif /* RNA_INTERNAL_H */
 
+
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
new file mode 100644 (file)
index 0000000..0bbdd5b
--- /dev/null
@@ -0,0 +1,51 @@
+/**
+ * $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 <stdlib.h>
+
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "rna_internal.h"
+
+#include "DNA_packedFile_types.h"
+
+#ifdef RNA_RUNTIME
+#else
+
+void RNA_def_packedfile(BlenderRNA *brna)
+{
+       StructRNA *srna;
+       PropertyRNA *prop;
+
+       srna= RNA_def_struct(brna, "PackedFile", NULL, "Packed File");
+
+       prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
+       RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+       RNA_def_property_ui_text(prop, "Size", "Size of Packed File.");
+
+}
+
+#endif
+