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:
authorCampbell Barton <ideasman42@gmail.com>2011-01-09 04:17:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-09 04:17:56 +0300
commit70a828d5a5d0bd49765b281c01ca27cf188e3fca (patch)
tree634464a911d68b21d6906ccc4d34b30f51c0125f /source/blender/makesrna
parentc0bae16dad7952eb39aaff47d7a54cc15b7f016c (diff)
remove unused vars, comment some which look like they could be useful still. have makesrna.c omit unused _data definitions for rna funcs with no args.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/makesrna.c15
-rw-r--r--source/blender/makesrna/intern/rna_access.c3
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c6
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c4
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c6
5 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 6d9c2ec16d3..1e5024b35db 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -1499,6 +1499,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
PropertyType type;
const char *funcname, *valstr;
const char *ptrstr;
+ const short has_data= (dfunc->cont.properties.first != NULL);
int flag, pout, cptr, first;
srna= dsrna->srna;
@@ -1552,10 +1553,12 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, "\t%s%s %s%s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
}
- fprintf(f, "\tchar *_data");
- if(func->c_ret) fprintf(f, ", *_retdata");
- fprintf(f, ";\n");
- fprintf(f, "\t\n");
+ if(has_data) {
+ fprintf(f, "\tchar *_data");
+ if(func->c_ret) fprintf(f, ", *_retdata");
+ fprintf(f, ";\n");
+ fprintf(f, "\t\n");
+ }
/* assign self */
if(func->flag & FUNC_USE_SELF_ID) {
@@ -1567,7 +1570,9 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
else fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", srna->identifier);
}
- fprintf(f, "\t_data= (char *)_parms->data;\n");
+ if(has_data) {
+ fprintf(f, "\t_data= (char *)_parms->data;\n");
+ }
dparm= dfunc->cont.properties.first;
for(; dparm; dparm= dparm->next) {
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index ee1ae025bd6..d509efbb927 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -4207,8 +4207,6 @@ void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter)
void RNA_parameter_list_next(ParameterIterator *iter)
{
- PropertyType ptype;
-
iter->offset+= iter->size;
iter->parm= iter->parm->next;
iter->valid= iter->parm != NULL;
@@ -4216,7 +4214,6 @@ void RNA_parameter_list_next(ParameterIterator *iter)
if(iter->valid) {
iter->size= rna_parameter_size_alloc(iter->parm);
iter->data= (((char*)iter->parms->data)+iter->offset);
- ptype= RNA_property_type(iter->parm);
}
}
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index e71454ef9ec..96ec09f844e 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -1335,9 +1335,9 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop)
parm= RNA_def_float(func, "value", 0.0f, -FLT_MAX, FLT_MAX, "", "Y Value of this keyframe point", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* optional */
- parm= RNA_def_boolean(func, "replace", 0, "Replace", "Don't add any new keyframes, but just replace existing ones");
- parm= RNA_def_boolean(func, "needed", 0, "Needed", "Only adds keyframes that are needed");
- parm= RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe insertion to avoid recalculating the curve each time");
+ RNA_def_boolean(func, "replace", 0, "Replace", "Don't add any new keyframes, but just replace existing ones");
+ RNA_def_boolean(func, "needed", 0, "Needed", "Only adds keyframes that are needed");
+ RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe insertion to avoid recalculating the curve each time");
parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Newly created keyframe");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 26136eeaf3e..fbbc88cc481 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1727,7 +1727,7 @@ static void rna_def_vertex_colors(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Mesh_vertex_color_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh.");
- parm= RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
+ RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
parm= RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer.");
RNA_def_function_return(func, parm);
@@ -1768,7 +1768,7 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Mesh_uv_texture_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a UV texture layer to Mesh.");
- parm= RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
+ RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
parm= RNA_def_pointer(func, "layer", "MeshTextureFaceLayer", "", "The newly created layer.");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 378d6455fe7..ee6715b86f9 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -398,9 +398,9 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element.");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX);
- parm= RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display.", 0, INT_MAX);
- parm= RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use.");
+ RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX);
+ RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display.", 0, INT_MAX);
+ RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use.");
func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);