diff options
author | Andrea Weikert <elubie@gmx.net> | 2008-12-02 00:23:58 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2008-12-02 00:23:58 +0300 |
commit | 23a77e76885d6833edc3bd69619f17174c23b8ee (patch) | |
tree | 2cdc29743e67a4ddc7cbdb498d64652e5655d2e8 /source/blender/makesrna/intern | |
parent | 31ffe5b65e98b8c34b184ad24daa5163d36ba68c (diff) |
RNA
* 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 :)
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_image.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_packedfile.c | 51 |
4 files changed, 57 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index a1a98a56404..3c174b11834 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -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; } + diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 8166d0aa11e..17a0f9eadcd 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -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 + diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 508390e5166..1a893845173 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -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 index 00000000000..0bbdd5bfd8c --- /dev/null +++ b/source/blender/makesrna/intern/rna_packedfile.c @@ -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 + |