From 8227b3d463955d887a987fe546d8eefa2757a982 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 13 Jan 2011 04:53:55 +0000 Subject: remove/comment unused vars also removed unnecessary NULL checks (where the pointer was used later without checking). --- source/blender/makesrna/intern/rna_animation.c | 2 +- source/blender/makesrna/intern/rna_curve.c | 2 +- source/blender/makesrna/intern/rna_fcurve.c | 2 +- source/blender/makesrna/intern/rna_mesh.c | 8 ++++---- source/blender/makesrna/intern/rna_meta.c | 2 +- source/blender/makesrna/intern/rna_nodetree.c | 6 +++--- source/blender/makesrna/intern/rna_object.c | 2 +- source/blender/makesrna/intern/rna_screen.c | 3 +-- source/blender/makesrna/intern/rna_ui_api.c | 4 ++-- 9 files changed, 15 insertions(+), 16 deletions(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index f9fa10f4a32..e366b0c61b9 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -676,7 +676,7 @@ static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_NlaTrack_new"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); RNA_def_function_ui_description(func, "Add a new NLA Tracks"); - parm = RNA_def_pointer(func, "prev", "NlaTrack", "", "NLA Track to add the new one after."); + RNA_def_pointer(func, "prev", "NlaTrack", "", "NLA Track to add the new one after."); /* return type */ parm = RNA_def_pointer(func, "track", "NlaTrack", "", "New NLA Track."); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index a257356f6c9..8ffd98b8d88 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1145,7 +1145,7 @@ static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add"); RNA_def_function_ui_description(func, "Add a number of points to this spline."); RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS); - parm= RNA_def_int(func, "number", 1, INT_MIN, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX); + RNA_def_int(func, "number", 1, INT_MIN, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX); /* func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 491defcd016..12ecf15816a 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -1346,7 +1346,7 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop) parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove."); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); /* optional */ - parm= RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time"); + RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time"); } static void rna_def_fcurve(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 1e6db94f7a3..08065b90530 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1650,7 +1650,7 @@ static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop) // PropertyRNA *prop; FunctionRNA *func; - PropertyRNA *parm; +// PropertyRNA *parm; RNA_def_property_srna(cprop, "MeshVertices"); srna= RNA_def_struct(brna, "MeshVertices", NULL); @@ -1659,7 +1659,7 @@ static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "add", "ED_mesh_vertices_add"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX); + RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX); } /* mesh.edges */ @@ -1688,7 +1688,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) PropertyRNA *prop; FunctionRNA *func; - PropertyRNA *parm; + /*PropertyRNA *parm;*/ RNA_def_property_srna(cprop, "MeshFaces"); srna= RNA_def_struct(brna, "MeshFaces", NULL); @@ -1707,7 +1707,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "add", "ED_mesh_faces_add"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX); + RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX); } /* mesh.vertex_colors */ diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index f1d41d86695..142c8017289 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -232,7 +232,7 @@ static void rna_def_metaball_elements(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "new", "rna_MetaBall_elements_new"); RNA_def_function_ui_description(func, "Add a new spline to the curve."); - parm= RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta element."); + RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta element."); parm= RNA_def_pointer(func, "element", "MetaElement", "", "The newly created metaelement."); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index e40506fcd83..7184fd05dcf 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2386,7 +2386,7 @@ static void rna_def_composite_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); parm= RNA_def_enum(func, "type", compositor_node_type_items, 0, "Type", "Type of node to add"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm= RNA_def_pointer(func, "group", "NodeTree", "", "The group tree"); + RNA_def_pointer(func, "group", "NodeTree", "", "The group tree"); /* return value */ parm= RNA_def_pointer(func, "node", "Node", "", "New node."); RNA_def_function_return(func, parm); @@ -2414,7 +2414,7 @@ static void rna_def_shader_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); parm= RNA_def_enum(func, "type", shader_node_type_items, 0, "Type", "Type of node to add"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm= RNA_def_pointer(func, "group", "NodeTree", "", "The group tree"); + RNA_def_pointer(func, "group", "NodeTree", "", "The group tree"); /* return value */ parm= RNA_def_pointer(func, "node", "Node", "", "New node."); RNA_def_function_return(func, parm); @@ -2442,7 +2442,7 @@ static void rna_def_texture_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); parm= RNA_def_enum(func, "type", texture_node_type_items, 0, "Type", "Type of node to add"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm= RNA_def_pointer(func, "group", "NodeTree", "", "The group tree"); + RNA_def_pointer(func, "group", "NodeTree", "", "The group tree"); /* return value */ parm= RNA_def_pointer(func, "node", "Node", "", "New node."); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 6cb5a074c03..35e19c6b6b7 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1658,7 +1658,7 @@ static void rna_def_object_vertex_groups(BlenderRNA *brna, PropertyRNA *cprop) /* vertex groups */ // add_vertex_group func= RNA_def_function(srna, "new", "rna_Object_vgroup_new"); RNA_def_function_ui_description(func, "Add vertex group to object."); - parm= RNA_def_string(func, "name", "Group", 0, "", "Vertex group name."); /* optional */ + RNA_def_string(func, "name", "Group", 0, "", "Vertex group name."); /* optional */ parm= RNA_def_pointer(func, "group", "VertexGroup", "", "New vertex group."); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index a9e43d35f32..f3f8db6fb39 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -107,7 +107,6 @@ static void rna_def_area(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; FunctionRNA *func; - PropertyRNA *parm; srna= RNA_def_struct(brna, "Area", NULL); RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor"); @@ -144,7 +143,7 @@ static void rna_def_area(BlenderRNA *brna) func= RNA_def_function(srna, "header_text_set", "ED_area_headerprint"); RNA_def_function_ui_description(func, "Set the header text"); - parm= RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text."); + RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text."); } static void rna_def_region(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index e6d6759a449..022f818d7d7 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -141,7 +141,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_boolean(func, "align", 0, "", "Align buttons to each other."); func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow"); - parm= RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX); + RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX); parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in."); RNA_def_function_return(func, parm); RNA_def_boolean(func, "align", 0, "", "Align buttons to each other."); @@ -327,7 +327,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps, etc."); parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock."); RNA_def_property_flag(parm, PROP_REQUIRED); - parm= RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?"); + RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?"); RNA_def_pointer(func, "parent", "ID", "", "ID datablock."); RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot."); -- cgit v1.2.3