diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-30 03:57:32 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-30 03:57:32 +0300 |
commit | d953e940d3c5b9302539dfd00624fd60bc0ed017 (patch) | |
tree | 9e75c4e5ecbb4412f89bea4b43577e6457c31318 /source/blender | |
parent | d86b38cd6163fe71774525388961b9919b3c7fd5 (diff) |
RNA
* Added more DNA_color_types.h, starting from patch by Sebastian Skejø.
What's missing is write access to some things like point location,
hard to retrieve the CurveMapping for proper update still..
* Added all datablocks as ID pointer in Main already, now only have to
change the type from ID to the specific type. Also added filename
to Main, which is basically the only non-internal property.
* Fixed setting shadow buffers size in lamps, also ensured it to be a
multiple of 16.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 186 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_lamp.c | 46 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main.c | 77 |
4 files changed, 257 insertions, 54 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 2277389d3ff..8081b7f684d 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -177,7 +177,7 @@ static void rna_def_library(BlenderRNA *brna) srna= RNA_def_struct(brna, "Library", "ID", "Library"); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_ui_text(prop, "Filename", "Path to the library .blend file."); diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index d5c1b79d466..ba92cb9c938 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -32,17 +32,201 @@ #ifdef RNA_RUNTIME +#include "BKE_colortools.h" + +static int rna_CurveMapping_curves_length(PointerRNA *ptr) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + int len; + + for(len=0; len<CM_TOT; len++) + if(!cumap->cm[len].curve) + break; + + return len; +} + +static void rna_CurveMapping_curves_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + + rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), NULL); +} + +static void rna_CurveMapping_use_clipping_set(PointerRNA *ptr, int value) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + + if(value) cumap->flag |= CUMA_DO_CLIP; + else cumap->flag &= ~CUMA_DO_CLIP; + + curvemapping_changed(cumap, 0); +} + +static void rna_CurveMapping_black_level_set(PointerRNA *ptr, int index, float value) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + cumap->black[index]= value; + curvemapping_set_black_white(cumap, NULL, NULL); +} + +static void rna_CurveMapping_white_level_set(PointerRNA *ptr, int index, float value) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + cumap->white[index]= value; + curvemapping_set_black_white(cumap, NULL, NULL); +} + +static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + + *min= -100.0f; + *max= cumap->clipr.xmax; +} + +static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + + *min= -100.0f; + *max= cumap->clipr.ymax; +} + +static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + + *min= cumap->clipr.xmin; + *max= 100.0f; +} + +static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max) +{ + CurveMapping *cumap= (CurveMapping*)ptr->data; + + *min= cumap->clipr.ymin; + *max= 100.0f; +} + #else -void RNA_def_color(BlenderRNA *brna) +static void rna_def_curvemappoint(BlenderRNA *brna) { StructRNA *srna; + PropertyRNA *prop; + static EnumPropertyItem prop_handle_type_items[] = { + {0, "AUTO", "Auto Handle", ""}, + {CUMA_VECTOR, "VECTOR", "Vector Handle", ""}, + {0, NULL, NULL, NULL} + }; srna= RNA_def_struct(brna, "CurveMapPoint", NULL, "CurveMapPoint"); + /* not editable for now, need to have CurveMapping to do curvemapping_changed */ + + prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "x"); + RNA_def_property_array(prop, 2); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_ui_text(prop, "Location", ""); + + prop= RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "flag", PROP_DEF_ENUM_BITFLAGS); + RNA_def_property_enum_items(prop, prop_handle_type_items); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_ui_text(prop, "Handle Type", ""); + + prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_SELECT); + RNA_def_property_ui_text(prop, "Selected", ""); +} + +static void rna_def_curvemap(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + static EnumPropertyItem prop_extend_items[] = { + {0, "HORIZONTAL", "Horizontal", ""}, + {CUMA_EXTEND_EXTRAPOLATE, "EXTRAPOLATED", "Extrapolated", ""}, + {0, NULL, NULL, NULL} + }; + srna= RNA_def_struct(brna, "CurveMap", NULL, "CurveMap"); + /* not editable for now, need to have CurveMapping to do curvemapping_changed */ + + prop= RNA_def_property(srna, "extend", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "flag", CUMA_EXTEND_EXTRAPOLATE); + RNA_def_property_enum_items(prop, prop_extend_items); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_ui_text(prop, "Extend", ""); + + prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "curve", "totpoint"); + RNA_def_property_struct_type(prop, "CurveMapPoint"); + RNA_def_property_ui_text(prop, "Points", ""); +} + +static void rna_def_curvemapping(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + srna= RNA_def_struct(brna, "CurveMapping", NULL, "CurveMapping"); + + prop= RNA_def_property(srna, "use_clipping", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_DO_CLIP); + RNA_def_property_ui_text(prop, "Use Clipping", ""); + RNA_def_property_boolean_funcs(prop, NULL, "rna_CurveMapping_use_clipping_set"); + + prop= RNA_def_property(srna, "clip_min_x", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "clipr.xmin"); + RNA_def_property_range(prop, -100.0f, 100.0f); + RNA_def_property_ui_text(prop, "Clip Min X", ""); + RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipminx_range"); + + prop= RNA_def_property(srna, "clip_min_y", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "clipr.ymin"); + RNA_def_property_range(prop, -100.0f, 100.0f); + RNA_def_property_ui_text(prop, "Clip Min Y", ""); + RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipminy_range"); + + prop= RNA_def_property(srna, "clip_max_x", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "clipr.xmax"); + RNA_def_property_range(prop, -100.0f, 100.0f); + RNA_def_property_ui_text(prop, "Clip Max X", ""); + RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxx_range"); + + prop= RNA_def_property(srna, "clip_max_y", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "clipr.ymax"); + RNA_def_property_range(prop, -100.0f, 100.0f); + RNA_def_property_ui_text(prop, "Clip Max Y", ""); + RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxy_range"); + + prop= RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_funcs(prop, "rna_CurveMapping_curves_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, "rna_CurveMapping_curves_length", 0, 0); + RNA_def_property_struct_type(prop, "CurveMap"); + RNA_def_property_ui_text(prop, "Curves", ""); + + prop= RNA_def_property(srna, "black_level", PROP_FLOAT, PROP_COLOR); + RNA_def_property_float_sdna(prop, NULL, "black"); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 3); + RNA_def_property_ui_text(prop, "Black Level", ""); + RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_black_level_set", NULL); + + prop= RNA_def_property(srna, "white_level", PROP_FLOAT, PROP_COLOR); + RNA_def_property_float_sdna(prop, NULL, "white"); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 3); + RNA_def_property_ui_text(prop, "White Level", ""); + RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_white_level_set", NULL); +} + +void RNA_def_color(BlenderRNA *brna) +{ + rna_def_curvemappoint(brna); + rna_def_curvemap(brna); + rna_def_curvemapping(brna); } #endif diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 5272b4b038d..cf8247ab00f 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -33,6 +33,16 @@ #ifdef RNA_RUNTIME +static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value) +{ + Lamp *la= (Lamp*)ptr->data; + + CLAMP(value, 512, 10240); + la->bufsize= value; + la->bufsize &= (~15); /* round to multiple of 16 */ +} + + #else void RNA_def_lamp(BlenderRNA *brna) @@ -100,9 +110,9 @@ void RNA_def_lamp(BlenderRNA *brna) {0, NULL, NULL, NULL}}; static EnumPropertyItem prop_fallofftype_items[] = { {LA_FALLOFF_CONSTANT, "CONSTANT", "Constant", ""}, - {LA_FALLOFF_INVLINEAR, "INVLINEAR", "Invert Linear", ""}, - {LA_FALLOFF_INVSQUARE, "INVSQUARE", "Invert Square", ""}, - {LA_FALLOFF_CURVE, "CURVE", "Custum Curve", ""}, + {LA_FALLOFF_INVLINEAR, "INVLINEAR", "Inverse Linear", ""}, + {LA_FALLOFF_INVSQUARE, "INVSQUARE", "Inverse Square", ""}, + {LA_FALLOFF_CURVE, "CURVE", "Custom Curve", ""}, {LA_FALLOFF_SLIDERS, "SLIDERS", "Lin/Quad Weighted", ""}, {0, NULL, NULL, NULL}}; @@ -145,6 +155,7 @@ void RNA_def_lamp(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Sample Buffers", "Number of Buffers to sample."); prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* needs to be able to create curve mapping */ RNA_def_property_enum_items(prop, prop_fallofftype_items); RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance."); @@ -230,60 +241,61 @@ void RNA_def_lamp(BlenderRNA *brna) prop= RNA_def_property(srna, "buffer_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "bufsize"); RNA_def_property_range(prop, 512, 10240); - RNA_def_property_ui_text(prop, "Buffer Size", "The Size in Bytes of the Shadow Buffer"); + RNA_def_property_ui_text(prop, "Buffer Size", "Sets the size of the shadow buffer to nearest multiple of 16"); + RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL); prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "bufsize"); + RNA_def_property_float_sdna(prop, NULL, "haint"); RNA_def_property_range(prop, 0.0f, 5.0f); RNA_def_property_ui_text(prop, "Halo Intensity", "Intesity of Spot Halo"); prop= RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,20.0f); + RNA_def_property_range(prop, 0.0f, 20.0f); RNA_def_property_ui_text(prop, "Hor. Bright", "horizon brightness"); prop= RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,10.0f); + RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Hor. Spread", "horizon Spread"); prop= RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,10.0f); + RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Sun Bright", "Sun Brightness"); prop= RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,10.0f); + RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Sun Size", "Sun Size"); prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,1.0f); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Back Light", "Backscatter Light"); prop= RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,10.0f); + RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Sun Intens", "Sun Intensity"); prop= RNA_def_property(srna, "atm_turbidity", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,30.0f); + RNA_def_property_range(prop, 0.0f, 30.0f); RNA_def_property_ui_text(prop, "Turbidity", "Sky Tubidity"); prop= RNA_def_property(srna, "atm_inscattering_factor", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,1.0f); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Inscatter", "Scatter Contibution factor"); prop= RNA_def_property(srna, "atm_extinction_factor", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,1.0f); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Extinction", "Extinction Scattering Contibution factor"); prop= RNA_def_property(srna, "atm_distance_factor", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,500.0f); + RNA_def_property_range(prop, 0.0f, 500.0f); RNA_def_property_ui_text(prop, "Atmos Distance", "Scale blender distance to real distance"); prop= RNA_def_property(srna, "sky_blend_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "skyblendfac"); - RNA_def_property_range(prop, 0.0f,2.0f); + RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "Sky Blend Factor", "Blend factor with sky"); prop= RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0f,20.0f); + RNA_def_property_range(prop, 0.0f, 20.0f); RNA_def_property_ui_text(prop, "Sky Exposure", "Expsure Correction"); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 28b361a2d44..6eeb7a875d0 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -34,6 +34,24 @@ /* all the list begin functions are added manually here, Main is not in SDNA */ +static void rna_Main_filename_get(PointerRNA *ptr, char *value) +{ + Main *bmain= (Main*)ptr->data; + BLI_strncpy(value, bmain->name, sizeof(bmain->name)); +} + +static int rna_Main_filename_length(PointerRNA *ptr) +{ + Main *bmain= (Main*)ptr->data; + return strlen(bmain->name); +} + +static void rna_Main_filename_set(PointerRNA *ptr, const char *value) +{ + Main *bmain= (Main*)ptr->data; + BLI_strncpy(bmain->name, value, sizeof(bmain->name)); +} + static void rna_Main_scene_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; @@ -64,7 +82,6 @@ static void rna_Main_mesh_begin(CollectionPropertyIterator *iter, PointerRNA *pt rna_iterator_listbase_begin(iter, &bmain->mesh, NULL); } -#if 0 static void rna_Main_curve_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; @@ -77,16 +94,12 @@ static void rna_Main_mball_begin(CollectionPropertyIterator *iter, PointerRNA *p rna_iterator_listbase_begin(iter, &bmain->mball, NULL); } -#endif - static void rna_Main_mat_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->mat, NULL); } -#if 0 - static void rna_Main_tex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; @@ -105,8 +118,6 @@ static void rna_Main_latt_begin(CollectionPropertyIterator *iter, PointerRNA *pt rna_iterator_listbase_begin(iter, &bmain->latt, NULL); } - - static void rna_Main_camera_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; @@ -131,16 +142,12 @@ static void rna_Main_world_begin(CollectionPropertyIterator *iter, PointerRNA *p rna_iterator_listbase_begin(iter, &bmain->world, NULL); } -#endif - static void rna_Main_screen_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->screen, NULL); } -#if 0 - static void rna_Main_script_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; @@ -183,16 +190,12 @@ static void rna_Main_action_begin(CollectionPropertyIterator *iter, PointerRNA * rna_iterator_listbase_begin(iter, &bmain->action, NULL); } -#endif - static void rna_Main_nodetree_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->nodetree, NULL); } -#if 0 - static void rna_Main_brush_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; @@ -204,7 +207,6 @@ static void rna_Main_particle_begin(CollectionPropertyIterator *iter, PointerRNA Main *bmain= (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->particle, NULL); } -#endif static void rna_Main_wm_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { @@ -219,6 +221,7 @@ void RNA_def_main(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; const char *lists[][5]= { + {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks."}, {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks."}, {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks."}, {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks."}, @@ -228,30 +231,34 @@ void RNA_def_main(BlenderRNA *brna) {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks."}, {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks."}, {"windowmanagers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks."}, - {NULL, NULL, NULL, NULL, NULL}, - {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks."}, - {"metaballs", "MBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks."}, - {"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks."}, - {"images", "Image", "rna_Main_image_begin", "Images", "Image datablocks."}, - {"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", "Lattice datablocks."}, - {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks."}, - {"ipos", "Ipo", "rna_Main_ipo_begin", "Ipos", "Ipo datablocks."}, - {"keys", "Key", "rna_Main_key_begin", "Keys", "Key datablocks."}, - {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks."}, - {"scripts", "Script", "rna_Main_script_begin", "Scripts", "Script datablocks."}, - {"vfonts", "VFont", "rna_Main_vfont_begin", "VFonts", "VFont datablocks."}, - {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks."}, - {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks."}, - {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks."}, - {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks."}, - {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks."}, - {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks."}, - {"particles", "Particle", "rna_Main_particle_begin", "Particles", "Particle datablocks."}, + {"curves", "ID", "rna_Main_curve_begin", "Curves", "Curve datablocks."}, + {"metaballs", "ID", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks."}, + {"textures", "ID", "rna_Main_tex_begin", "Textures", "Texture datablocks."}, + {"images", "ID", "rna_Main_image_begin", "Images", "Image datablocks."}, + {"lattices", "ID", "rna_Main_latt_begin", "Lattices", "Lattice datablocks."}, + {"ipos", "ID", "rna_Main_ipo_begin", "Ipos", "Ipo datablocks."}, + {"keys", "ID", "rna_Main_key_begin", "Keys", "Key datablocks."}, + {"worlds", "ID", "rna_Main_world_begin", "Worlds", "World datablocks."}, + {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks."}, + {"vfonts", "ID", "rna_Main_vfont_begin", "VFonts", "VFont datablocks."}, + {"texts", "ID", "rna_Main_text_begin", "Texts", "Text datablocks."}, + {"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks."}, + {"groups", "ID", "rna_Main_group_begin", "Groups", "Group datablocks."}, + {"armatures", "ID", "rna_Main_armature_begin", "Armatures", "Armature datablocks."}, + {"actions", "ID", "rna_Main_action_begin", "Actions", "Action datablocks."}, + {"brushes", "ID", "rna_Main_brush_begin", "Brushes", "Brush datablocks."}, + {"particles", "ID", "rna_Main_particle_begin", "Particles", "Particle datablocks."}, {NULL, NULL, NULL, NULL, NULL}}; int i; srna= RNA_def_struct(brna, "Main", NULL, "Main"); + prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); + RNA_def_property_string_maxlength(prop, 240); + RNA_def_property_string_funcs(prop, "rna_Main_filename_get", "rna_Main_filename_length", "rna_Main_filename_set"); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file."); + for(i=0; lists[i][0]; i++) { prop= RNA_def_property(srna, lists[i][0], PROP_COLLECTION, PROP_NONE); |