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-10 06:58:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-10 06:58:07 +0300
commitede0d855229713ee383d114cf3c6fecc4ff30464 (patch)
treedd28b3b2725ee6d3ca308de08e2b0f2e29a4826c /source/blender/makesrna
parenta9faad8b37b0b3eedc803f2a4d400b8f2af5e6dc (diff)
comment/remove various unused vars,
also make rna function for new images require width and hight args.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_action.c4
-rw-r--r--source/blender/makesrna/intern/rna_animation.c6
-rw-r--r--source/blender/makesrna/intern/rna_curve.c4
-rw-r--r--source/blender/makesrna/intern/rna_define.c12
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c4
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c6
11 files changed, 32 insertions, 30 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 92a798c044b..f9f6478cc3d 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 90c072bcfcb..d6c26486b25 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 8b9166b919f..a257356f6c9 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -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");
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index d2bd974d62a..a72777726c2 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -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;
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 4f7f32d72c0..97da3ab4ad9 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 3ab7d05cd8a..20d76b4f386 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index fbbc88cc481..b4895b3c43d 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 945d0dbb123..f7df4166528 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index e891d64d514..fbba43e5932 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index ee6715b86f9..e6d6759a449 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 9c5b8d0740a..e043db7d9d6 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -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);