diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2011-12-02 02:08:42 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2011-12-02 02:08:42 +0400 |
commit | 1936b31cd0f7741ec39f638cc57286e5b379134c (patch) | |
tree | 5f476443622f52433bf9d96a4d648edd80173a02 /source/blender/makesrna/intern | |
parent | 4db4a0933f8cef74a27561fa26e79ceab9021d67 (diff) |
renaming BooleanProperty to BoolProperty (rna structs shouldnt affect scripters)
Talked with Brecht and Campbell and they both agreed that bpy.types should match bpy.props
In the ideal world we would rename bpy.props to BooleanProperty. This would break scripts though. So we go for a compromise and at least have some consistency.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 16 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_internal_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 10 |
5 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 1fcc8072f9b..fbe9ed33063 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1196,7 +1196,7 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp) switch(prop->type) { case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; if(!prop->arraydimension) { if(!bprop->get && !bprop->set && !dp->booleanbit) @@ -1812,7 +1812,7 @@ static void rna_sort(BlenderRNA *brna) static const char *rna_property_structname(PropertyType type) { switch(type) { - case PROP_BOOLEAN: return "BooleanPropertyRNA"; + case PROP_BOOLEAN: return "BoolPropertyRNA"; case PROP_INT: return "IntPropertyRNA"; case PROP_FLOAT: return "FloatPropertyRNA"; case PROP_STRING: return "StringPropertyRNA"; @@ -2154,7 +2154,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr break; } case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; unsigned int i; if(prop->arraydimension && prop->totarraylength) { @@ -2243,7 +2243,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr switch(prop->type) { case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; fprintf(f, "\t%s, %s, %s, %s, %d, ", rna_function_string(bprop->get), rna_function_string(bprop->set), rna_function_string(bprop->getarray), rna_function_string(bprop->setarray), bprop->defaultvalue); if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier); else fprintf(f, "NULL\n"); diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index d3666e28338..fa2fb061e3e 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1580,7 +1580,7 @@ void RNA_property_update_cache_free(void) int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop) { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); @@ -1596,7 +1596,7 @@ int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop) void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value) { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); @@ -1623,7 +1623,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value) void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values) { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); @@ -1671,7 +1671,7 @@ int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values) { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); @@ -1729,7 +1729,7 @@ void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int inde int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop) { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); BLI_assert(RNA_property_array_check(prop) == 0); @@ -1739,7 +1739,7 @@ int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop) void RNA_property_boolean_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *prop, int *values) { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); BLI_assert(RNA_property_array_check(prop) != 0); @@ -4682,8 +4682,8 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE if(!(parm->flag & PROP_REQUIRED) && !(parm->flag & PROP_DYNAMIC)) { switch(parm->type) { case PROP_BOOLEAN: - if(parm->arraydimension) memcpy(data, ((BooleanPropertyRNA*)parm)->defaultarray, size); - else memcpy(data, &((BooleanPropertyRNA*)parm)->defaultvalue, size); + if(parm->arraydimension) memcpy(data, ((BoolPropertyRNA*)parm)->defaultarray, size); + else memcpy(data, &((BoolPropertyRNA*)parm)->defaultvalue, size); break; case PROP_INT: if(parm->arraydimension) memcpy(data, ((IntPropertyRNA*)parm)->defaultarray, size); diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index e911c936df8..e55559c39dc 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -580,7 +580,7 @@ void RNA_free(BlenderRNA *brna) static size_t rna_property_type_sizeof(PropertyType type) { switch(type) { - case PROP_BOOLEAN: return sizeof(BooleanPropertyRNA); + case PROP_BOOLEAN: return sizeof(BoolPropertyRNA); case PROP_INT: return sizeof(IntPropertyRNA); case PROP_FLOAT: return sizeof(FloatPropertyRNA); case PROP_STRING: return sizeof(StringPropertyRNA); @@ -1308,7 +1308,7 @@ void RNA_def_property_boolean_default(PropertyRNA *prop, int value) switch(prop->type) { case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; bprop->defaultvalue= value; break; } @@ -1325,7 +1325,7 @@ void RNA_def_property_boolean_array_default(PropertyRNA *prop, const int *array) switch(prop->type) { case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; bprop->defaultarray= array; break; } @@ -1889,7 +1889,7 @@ void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const ch switch(prop->type) { case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; if(prop->arraydimension) { if(get) bprop->getarray= (PropBooleanArrayGetFunc)get; @@ -2806,7 +2806,7 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA switch(prop->type) { case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; if(bprop->defaultarray) { iarray= MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store"); @@ -2875,7 +2875,7 @@ void RNA_def_property_free_pointers(PropertyRNA *prop) switch(prop->type) { case PROP_BOOLEAN: { - BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop; if(bprop->defaultarray) MEM_freeN((void*)bprop->defaultarray); break; } diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index ec6504fbbcb..960d3155fd5 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -185,7 +185,7 @@ struct PropertyRNA { /* Property Types */ -typedef struct BooleanPropertyRNA { +typedef struct BoolPropertyRNA { PropertyRNA property; PropBooleanGetFunc get; @@ -196,7 +196,7 @@ typedef struct BooleanPropertyRNA { int defaultvalue; const int *defaultarray; -} BooleanPropertyRNA; +} BoolPropertyRNA; typedef struct IntPropertyRNA { PropertyRNA property; diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 940e2e749e3..9a141dde3db 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -413,7 +413,7 @@ static StructRNA *rna_Property_refine(PointerRNA *ptr) rna_idproperty_check(&prop, ptr); /* XXX ptr? */ switch(prop->type) { - case PROP_BOOLEAN: return &RNA_BooleanProperty; + case PROP_BOOLEAN: return &RNA_BoolProperty; case PROP_INT: return &RNA_IntProperty; case PROP_FLOAT: return &RNA_FloatProperty; case PROP_STRING: return &RNA_StringProperty; @@ -578,7 +578,7 @@ static int rna_BoolProperty_default_get(PointerRNA *ptr) { PropertyRNA *prop= (PropertyRNA*)ptr->data; rna_idproperty_check(&prop, ptr); - return ((BooleanPropertyRNA*)prop)->defaultvalue; + return ((BoolPropertyRNA*)prop)->defaultvalue; } static int rna_IntProperty_default_get(PointerRNA *ptr) @@ -615,7 +615,7 @@ static void rna_IntProperty_default_array_get(PointerRNA *ptr, int *values) static void rna_BoolProperty_default_array_get(PointerRNA *ptr, int *values) { PropertyRNA *prop= (PropertyRNA*)ptr->data; - BooleanPropertyRNA *nprop= (BooleanPropertyRNA*)prop; + BoolPropertyRNA *nprop= (BoolPropertyRNA*)prop; rna_idproperty_check(&prop, ptr); if(nprop->defaultarray) { @@ -1355,8 +1355,8 @@ void RNA_def_rna(BlenderRNA *brna) /* Property */ rna_def_property(brna); - /* BooleanProperty */ - srna= RNA_def_struct(brna, "BooleanProperty", "Property"); + /* BoolProperty */ + srna= RNA_def_struct(brna, "BoolProperty", "Property"); RNA_def_struct_ui_text(srna, "Boolean Definition", "RNA boolean property definition"); rna_def_number_property(srna, PROP_BOOLEAN); |