comment/remove various unused vars,

also make rna function for new images require width and hight args.
This commit is contained in:
Campbell Barton 2011-01-10 03:58:07 +00:00
parent a9faad8b37
commit ede0d85522
13 changed files with 37 additions and 35 deletions

@ -1746,7 +1746,7 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter)
if(bl->poly== -1) { /* check its not cyclic */
/* skip the first point */
bevp0= bevp1;
/* bevp0= bevp1; */
bevp1= bevp2;
bevp2++;
nr--;
@ -1777,7 +1777,7 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter)
normalize_qt(bevp1->quat);
bevp0= bevp1;
/* bevp0= bevp1; */ /* UNUSED */
bevp1= bevp2;
bevp2++;
}
@ -1956,7 +1956,7 @@ static void make_bevel_list_3D_tangent(BevList *bl)
normalize_v3(cross_tmp);
tri_to_quat( bevp1->quat,zero, cross_tmp, bevp1->tan); /* XXX - could be faster */
bevp0= bevp1;
/* bevp0= bevp1; */ /* UNUSED */
bevp1= bevp2;
bevp2++;
}

@ -2482,7 +2482,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
const short hasHaloMat = (ma && (ma->material_type == MA_TYPE_HALO));
const short is_paint_sel= (ob==OBACT && paint_facesel_test(ob));
int draw_wire = 0;
int totvert, totedge, totface;
int /* totvert,*/ totedge, totface;
DispList *dl;
DerivedMesh *dm= mesh_get_derived_final(scene, ob, scene->customdata_mask);
@ -2493,7 +2493,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
draw_wire = 2; /* draw wire after solid using zoffset and depth buffer adjusment */
}
totvert = dm->getNumVerts(dm);
/* totvert = dm->getNumVerts(dm); */ /*UNUSED*/
totedge = dm->getNumEdges(dm);
totface = dm->getNumFaces(dm);

@ -405,8 +405,8 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "FCurve data path to use.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_int(func, "array_index", 0, 0, INT_MAX, "Index", "Array index.", 0, INT_MAX);
parm= RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this fcurve into.");
RNA_def_int(func, "array_index", 0, 0, INT_MAX, "Index", "Array index.", 0, INT_MAX);
RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this fcurve into.");
parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created fcurve");
RNA_def_function_return(func, parm);

@ -549,10 +549,10 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
parm= RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
RNA_def_property_flag(parm, PROP_REQUIRED);
/* index (defaults to -1 for entire array) */
parm=RNA_def_int(func, "index", -1, -1, INT_MAX, "Index", "The index of the destination property (i.e. axis of Location/Rotation/etc.), or -1 for the entire array.", 0, INT_MAX);
RNA_def_int(func, "index", -1, -1, INT_MAX, "Index", "The index of the destination property (i.e. axis of Location/Rotation/etc.), or -1 for the entire array.", 0, INT_MAX);
/* grouping */
parm=RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use.");
parm=RNA_def_string(func, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name).");
RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use.");
RNA_def_string(func, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name).");
/* Remove Path */

@ -1108,7 +1108,7 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
//PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
//PropertyRNA *parm;
RNA_def_property_srna(cprop, "SplinePoints");
srna= RNA_def_struct(brna, "SplinePoints", NULL);
@ -1118,7 +1118,7 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "rna_Curve_spline_points_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");

@ -1604,7 +1604,7 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
PropertyDefRNA *dp;
/* PropertyDefRNA *dp; */
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
@ -1618,7 +1618,7 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const
return;
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
if(( /* dp= */ rna_def_property_sdna(prop, structname, propname))) {
if(prop->arraydimension) {
prop->arraydimension= 0;
prop->totarraylength= 0;
@ -1645,7 +1645,7 @@ void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structnam
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
PropertyDefRNA *dp;
/* PropertyDefRNA *dp; */
StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
StructRNA *srna= DefRNA.laststruct;
@ -1660,7 +1660,7 @@ void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, con
return;
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
if((/* dp= */ rna_def_property_sdna(prop, structname, propname))) {
if(prop->arraydimension) {
sprop->maxlength= prop->totarraylength;
prop->arraydimension= 0;
@ -1671,7 +1671,7 @@ void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, con
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
PropertyDefRNA *dp;
/* PropertyDefRNA *dp; */
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
@ -1685,7 +1685,7 @@ void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, co
return;
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
if((/* dp= */ rna_def_property_sdna(prop, structname, propname))) {
if(prop->arraydimension) {
prop->arraydimension= 0;
prop->totarraylength= 0;

@ -200,7 +200,7 @@ void RNA_api_image(StructRNA *srna)
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_string(func, "filepath", "", 0, "", "Save path.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from");
RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from");
func= RNA_def_function(srna, "save", "rna_Image_save");
RNA_def_function_ui_description(func, "Save image to its source path");
@ -216,8 +216,8 @@ void RNA_api_image(StructRNA *srna)
func= RNA_def_function(srna, "gl_load", "rna_Image_gl_load");
RNA_def_function_ui_description(func, "Load the image into OpenGL graphics memory");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_int(func, "filter", GL_LINEAR_MIPMAP_NEAREST, -INT_MAX, INT_MAX, "Filter", "The texture minifying function", -INT_MAX, INT_MAX);
parm= RNA_def_int(func, "mag", GL_LINEAR, -INT_MAX, INT_MAX, "Magnification", "The texture magnification function", -INT_MAX, INT_MAX);
RNA_def_int(func, "filter", GL_LINEAR_MIPMAP_NEAREST, -INT_MAX, INT_MAX, "Filter", "The texture minifying function", -INT_MAX, INT_MAX);
RNA_def_int(func, "mag", GL_LINEAR, -INT_MAX, INT_MAX, "Magnification", "The texture magnification function", -INT_MAX, INT_MAX);
/* return value */
parm= RNA_def_int(func, "error", 0, -INT_MAX, INT_MAX, "Error", "OpenGL error value", -INT_MAX, INT_MAX);
RNA_def_function_return(func, parm);

@ -790,9 +790,11 @@ void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
parm= RNA_def_string(func, "name", "Image", 0, "", "New name for the datablock.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image.", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image.", 0, INT_MAX);
parm= RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel");
parm= RNA_def_boolean(func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel");
RNA_def_boolean(func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color");
/* return type */
parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock.");
RNA_def_function_return(func, parm);

@ -1669,7 +1669,7 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop)
// PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
// PropertyRNA *parm;
RNA_def_property_srna(cprop, "MeshEdges");
srna= RNA_def_struct(brna, "MeshEdges", NULL);
@ -1678,7 +1678,7 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "ED_mesh_edges_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.faces */

@ -415,8 +415,8 @@ void RNA_api_object(StructRNA *srna)
func= RNA_def_function(srna, "shape_key_add", "rna_Object_shape_key_add");
RNA_def_function_ui_description(func, "Add shape key to an object.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keylock."); /* optional */
parm= RNA_def_boolean(func, "from_mix", 1, "", "Create new shape from existing mix of shapes.");
RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keylock."); /* optional */
RNA_def_boolean(func, "from_mix", 1, "", "Create new shape from existing mix of shapes.");
parm= RNA_def_pointer(func, "key", "ShapeKey", "", "New shape keyblock.");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);

@ -87,7 +87,7 @@ void RNA_api_scene(StructRNA *srna)
RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately.");
parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set.", MINAFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_float(func, "subframe", 0.0, 0.0, 1.0, "", "Sub-frame time, between 0.0 and 1.0", 0.0, 1.0);
RNA_def_float(func, "subframe", 0.0, 0.0, 1.0, "", "Sub-frame time, between 0.0 and 1.0", 0.0, 1.0);
func= RNA_def_function(srna, "update", "rna_Scene_update_tagged");
RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators.");
@ -100,7 +100,7 @@ void RNA_api_scene_render(StructRNA *srna)
func= RNA_def_function(srna, "frame_path", "rna_SceneRender_get_frame_path");
RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame.");
parm= RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "", "Frame number to use, if unset the current frame will be used.", MINAFRAME, MAXFRAME);
RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "", "Frame number to use, if unset the current frame will be used.", MINAFRAME, MAXFRAME);
parm= RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "the resulting filepath from the scenes render settings.");
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */

@ -297,7 +297,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_string(func, "type_property", "", 0, "", "Identifier of property in data giving the type of the ID-blocks to use.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
@ -306,7 +306,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
@ -405,7 +405,7 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
func= RNA_def_function(srna, "template_operator_search", "uiTemplateOperatorSearch");
RNA_def_function(srna, "template_operator_search", "uiTemplateOperatorSearch");
func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);

@ -88,8 +88,8 @@ static void rna_generic_op_invoke(FunctionRNA *func, int flag)
}
if(flag & WM_GEN_INVOKE_SIZE) {
parm= RNA_def_int(func, "width", 300, 0, INT_MAX, "", "Width of the popup.", 0, INT_MAX);
parm= RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup.", 0, INT_MAX);
RNA_def_int(func, "width", 300, 0, INT_MAX, "", "Width of the popup.", 0, INT_MAX);
RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup.", 0, INT_MAX);
}
if(flag & WM_GEN_INVOKE_RETURN) {
@ -257,7 +257,7 @@ void RNA_api_keymap(StructRNA *srna)
parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "User editable key map.");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "restore_to_default", "WM_keymap_restore_to_default");
RNA_def_function(srna, "restore_to_default", "WM_keymap_restore_to_default");
func= RNA_def_function(srna, "restore_item_to_default", "rna_keymap_restore_item_to_default");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);