diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-22 21:50:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-22 21:50:29 +0400 |
commit | b4ef0c7d8d9b4197d209193743e76099cf042ec7 (patch) | |
tree | 4f2951f73c5e6744ce8dba9fe8b5bee81e6dbecf /source/blender/makesrna/intern/rna_main_api.c | |
parent | abb49829ef6bdc7385e51a00a3e2d5402dc09155 (diff) |
minor fixes for merge of soc-2009-kazanbas, rev23422
- Use CTX_data_main(C) over G.main
- no need to define object_type_items inline.
- rna_mesh.c - dynamic length array was commented out, not sure why this was needed. Povray and PLY scripts rely on faces having 3/4 verts rather then checking the 4th index is 0 (ok in C, not nice in py).
Diffstat (limited to 'source/blender/makesrna/intern/rna_main_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 9d42c473f50..379cf75d450 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -31,6 +31,7 @@ #include "RNA_define.h" #include "RNA_types.h" +#include "RNA_enum_types.h" #include "DNA_object_types.h" #include "DNA_material_types.h" @@ -135,21 +136,6 @@ void RNA_api_main(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - /* copied from rna_def_object */ - static EnumPropertyItem object_type_items[] = { - {OB_EMPTY, "EMPTY", 0, "Empty", ""}, - {OB_MESH, "MESH", 0, "Mesh", ""}, - {OB_CURVE, "CURVE", 0, "Curve", ""}, - {OB_SURF, "SURFACE", 0, "Surface", ""}, - {OB_FONT, "TEXT", 0, "Text", ""}, - {OB_MBALL, "META", 0, "Meta", ""}, - {OB_LAMP, "LAMP", 0, "Lamp", ""}, - {OB_CAMERA, "CAMERA", 0, "Camera", ""}, - {OB_WAVE, "WAVE", 0, "Wave", ""}, - {OB_LATTICE, "LATTICE", 0, "Lattice", ""}, - {OB_ARMATURE, "ARMATURE", 0, "Armature", ""}, - {0, NULL, 0, NULL, NULL}}; - func= RNA_def_function(srna, "add_object", "rna_Main_add_object"); RNA_def_function_ui_description(func, "Add a new object."); parm= RNA_def_enum(func, "type", object_type_items, 0, "", "Type of Object."); |