diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 32 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 10 |
2 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 9fa4d73cead..31d477dfe07 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -627,31 +627,31 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr if (dp->dnaarraylength == 1) { if (prop->type == PROP_BOOLEAN && dp->booleanbit) { - fprintf(f, " values[i]= %s((data->%s & (%d<<i)) != 0);\n", + fprintf(f, " values[i] = %s((data->%s & (%d<<i)) != 0);\n", (dp->booleannegative) ? "!" : "", dp->dnaname, dp->booleanbit); } else { - fprintf(f, " values[i]= (%s)%s((&data->%s)[i]);\n", + fprintf(f, " values[i] = (%s)%s((&data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname); } } else { if (prop->type == PROP_BOOLEAN && dp->booleanbit) { - fprintf(f, " values[i]= %s((data->%s[i] & ", (dp->booleannegative) ? "!" : "", + fprintf(f, " values[i] = %s((data->%s[i] & ", (dp->booleannegative) ? "!" : "", dp->dnaname); rna_int_print(f, dp->booleanbit); fprintf(f, ") != 0);\n"); } else if (rna_color_quantize(prop, dp)) { - fprintf(f, " values[i]= (%s)(data->%s[i]*(1.0f/255.0f));\n", + fprintf(f, " values[i] = (%s)(data->%s[i]*(1.0f/255.0f));\n", rna_type_type(prop), dp->dnaname); } else if (dp->dnatype) { - fprintf(f, " values[i]= (%s)%s(((%s*)data->%s)[i]);\n", + fprintf(f, " values[i] = (%s)%s(((%s*)data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnatype, dp->dnaname); } else { - fprintf(f, " values[i]= (%s)%s((data->%s)[i]);\n", + fprintf(f, " values[i] = (%s)%s((data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname); } } @@ -839,7 +839,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr } } - fprintf(f, " data->%s= value.data;\n", dp->dnaname); + fprintf(f, " data->%s = value.data;\n", dp->dnaname); } fprintf(f, "}\n\n"); @@ -882,7 +882,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr fprintf(f, " else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit); } else { - fprintf(f, " (&data->%s)[i]= %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); + fprintf(f, " (&data->%s)[i] = %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); rna_clamp_value(f, prop, 1); } } @@ -897,14 +897,14 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr fprintf(f, ";\n"); } else if (rna_color_quantize(prop, dp)) { - fprintf(f, " data->%s[i]= FTOCHAR(values[i]);\n", dp->dnaname); + fprintf(f, " data->%s[i] = FTOCHAR(values[i]);\n", dp->dnaname); } else { if (dp->dnatype) - fprintf(f, " ((%s*)data->%s)[i]= %s", dp->dnatype, dp->dnaname, + fprintf(f, " ((%s*)data->%s)[i] = %s", dp->dnatype, dp->dnaname, (dp->booleannegative) ? "!" : ""); else - fprintf(f, " (data->%s)[i]= %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); + fprintf(f, " (data->%s)[i] = %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); rna_clamp_value(f, prop, 1); } } @@ -937,7 +937,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr } else { rna_clamp_value_range(f, prop); - fprintf(f, " data->%s= %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); + fprintf(f, " data->%s = %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); rna_clamp_value(f, prop, 0); } } @@ -1775,7 +1775,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA else { data_str = "_data"; } - fprintf(f, "\t%s= ", dparm->prop->identifier); + fprintf(f, "\t%s = ", dparm->prop->identifier); if (!pout) fprintf(f, "%s", valstr); @@ -1785,13 +1785,13 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA } if (dparm->next) - fprintf(f, "\t_data+= %d;\n", rna_parameter_size_alloc(dparm->prop)); + fprintf(f, "\t_data += %d;\n", rna_parameter_size_alloc(dparm->prop)); } if (dfunc->call) { fprintf(f, "\t\n"); fprintf(f, "\t"); - if (func->c_ret) fprintf(f, "%s= ", func->c_ret->identifier); + if (func->c_ret) fprintf(f, "%s = ", func->c_ret->identifier); fprintf(f, "%s(", dfunc->call); first = 1; @@ -1845,7 +1845,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA dparm = rna_find_parameter_def(func->c_ret); ptrstr = (((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR)) || (dparm->prop->arraydimension)) ? "*" : ""; - fprintf(f, "\t*((%s%s%s*)_retdata)= %s;\n", rna_type_struct(dparm->prop), + fprintf(f, "\t*((%s%s%s*)_retdata) = %s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, func->c_ret->identifier); } } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 7676f4a5866..008b54efb77 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -642,7 +642,7 @@ int RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test) RNA_PROP_BEGIN(ptr, itemptr, iterprop) { - /* PropertyRNA *prop= itemptr.data; */ + /* PropertyRNA *prop = itemptr.data; */ if (prop_test == (PropertyRNA *)itemptr.data) { found = TRUE; break; @@ -2561,7 +2561,7 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr BLI_assert(RNA_property_type(prop) == PROP_POINTER); - if ((/*idprop=*/ rna_idproperty_check(&prop, ptr))) { + if ((/*idprop = */ rna_idproperty_check(&prop, ptr))) { /* not supported */ /* rna_idproperty_touch(idprop); */ } @@ -2579,7 +2579,7 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr PointerRNA RNA_property_pointer_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop)) { - /*PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; */ + /*PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop; */ /* BLI_assert(RNA_property_type(prop) == PROP_POINTER); */ @@ -2718,7 +2718,7 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop) void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr) { IDProperty *idprop; -/* CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; */ +/* CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop; */ BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); @@ -2777,7 +2777,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key) { IDProperty *idprop; -/* CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; */ +/* CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop; */ BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); |