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>2009-10-14 23:19:43 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-14 23:19:43 +0400
commit991e67ddc756cdbf6e85b9a0520792d1f48026e4 (patch)
treeca930274523e3355cfda68939b45525c1bed93d0 /source/blender/makesrna/intern/rna_particle.c
parent96d2dc7d090975687e5b99495fcc1e5725e75120 (diff)
RNA:
* Enums with an _itemf callback now never get context NULL passed in, rather a fixed list of enum items are defined which should contain all items (if possible), from which the _itemf callback can then use a subset.
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 2c81bda121f..28d0d2deb34 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -499,39 +499,9 @@ static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
else
strcpy(str, "No object");
}
-EnumPropertyItem from_items[] = {
- {PART_FROM_VERT, "VERT", 0, "Vertexes", ""},
- {PART_FROM_FACE, "FACE", 0, "Faces", ""},
- {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-EnumPropertyItem reactor_from_items[] = {
- {PART_FROM_VERT, "VERT", 0, "Vertexes", ""},
- {PART_FROM_FACE, "FACE", 0, "Faces", ""},
- {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
- {PART_FROM_PARTICLE, "PARTICLE", 0, "Particle", ""},
- {0, NULL, 0, NULL, NULL}
-};
static EnumPropertyItem *rna_Particle_from_itemf(bContext *C, PointerRNA *ptr, int *free)
{
- /* ParticleSettings *part = ptr->id.data; */
-
- if(C==NULL) {
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- /* needed for doc generation */
- RNA_enum_items_add(&item, &totitem, part_reactor_from_items);
- RNA_enum_items_add(&item, &totitem, part_from_items);
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
- }
-
//if(part->type==PART_REACTOR)
// return part_reactor_from_items;
//else
@@ -542,20 +512,6 @@ static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *C, PointerRNA *ptr
{
ParticleSettings *part = ptr->id.data;
- if(C==NULL) {
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- /* needed for doc generation */
- RNA_enum_items_add(&item, &totitem, part_hair_draw_as_items);
- RNA_enum_items_add(&item, &totitem, part_draw_as_items);
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
- }
-
if(part->type==PART_HAIR)
return part_hair_draw_as_items;
else
@@ -566,20 +522,6 @@ static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *C, PointerRNA *ptr,
{
ParticleSettings *part = ptr->id.data;
- if(C==NULL) {
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- /* needed for doc generation */
- RNA_enum_items_add(&item, &totitem, part_hair_ren_as_items);
- RNA_enum_items_add(&item, &totitem, part_ren_as_items);
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
- }
-
if(part->type==PART_HAIR)
return part_hair_ren_as_items;
else