[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34951] trunk/blender: - clear some warnings

Campbell Barton ideasman42 at gmail.com
Fri Feb 18 07:07:42 CET 2011


Revision: 34951
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34951
Author:   campbellbarton
Date:     2011-02-18 06:07:41 +0000 (Fri, 18 Feb 2011)
Log Message:
-----------
- clear some warnings
- rename layout.operator_enums -> operator_enum (since we have operator_menu_enum, only called in 4 places)

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_image.py
    trunk/blender/release/scripts/ui/space_view3d.py
    trunk/blender/source/blender/blenlib/intern/math_rotation.c
    trunk/blender/source/blender/blenlib/intern/path_util.c
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/editors/interface/interface_icons.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
    trunk/blender/source/blender/makesrna/intern/rna_ui_api.c
    trunk/blender/source/blender/python/intern/bpy_operator.c
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/release/scripts/ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/ui/space_image.py	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/release/scripts/ui/space_image.py	2011-02-18 06:07:41 UTC (rev 34951)
@@ -204,7 +204,7 @@
         layout = self.layout
 
         layout.operator("uv.weld")  # W, 1
-        layout.operator_enums("uv.align", "axis")  # W, 2/3/4
+        layout.operator_enum("uv.align", "axis")  # W, 2/3/4
 
 
 class IMAGE_MT_uvs(bpy.types.Menu):

Modified: trunk/blender/release/scripts/ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d.py	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/release/scripts/ui/space_view3d.py	2011-02-18 06:07:41 UTC (rev 34951)
@@ -317,11 +317,11 @@
     def draw(self, context):
         layout = self.layout
 
-        layout.operator_enums("view3d.view_orbit", "type")
+        layout.operator_enum("view3d.view_orbit", "type")
 
         layout.separator()
 
-        layout.operator_enums("view3d.view_pan", "type")
+        layout.operator_enum("view3d.view_pan", "type")
 
         layout.separator()
 
@@ -933,7 +933,7 @@
             layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
             layout.operator_menu_enum("marker.make_links_scene", "scene", text="Markers to Scene...")
 
-        layout.operator_enums("object.make_links_data", "type")  # inline
+        layout.operator_enum("object.make_links_data", "type")  # inline
 
 
 class VIEW3D_MT_object_game(bpy.types.Menu):

Modified: trunk/blender/source/blender/blenlib/intern/math_rotation.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_rotation.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/blenlib/intern/math_rotation.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -1258,7 +1258,7 @@
 
 
 /* Convert 3x3 matrix to Euler angles (in radians). */
-void mat3_to_eulO(float eul[3], short order,float M[3][3])
+void mat3_to_eulO(float eul[3], const short order,float M[3][3])
 {
 	float eul1[3], eul2[3];
 	

Modified: trunk/blender/source/blender/blenlib/intern/path_util.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/path_util.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/blenlib/intern/path_util.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -1382,7 +1382,7 @@
 
 int BLI_replace_extension(char *path, int maxlen, const char *ext)
 {
-	int a;
+	unsigned int a;
 
 	for(a=strlen(path)-1; a>=0; a--)
 		if(path[a] == '.' || path[a] == '/' || path[a] == '\\')
@@ -1738,7 +1738,7 @@
 	}
 }
 
-void BLI_where_is_temp(char *fullname, int maxlen, int usertemp)
+void BLI_where_is_temp(char *fullname, const int maxlen, int usertemp)
 {
 	fullname[0] = '\0';
 	

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -8604,7 +8604,7 @@
 						ima->flag |= IMA_STD_FIELD;
 				}
 				tex->iuser.frames= tex->frames;
-				tex->iuser.fie_ima= tex->fie_ima;
+				tex->iuser.fie_ima= (char)tex->fie_ima;
 				tex->iuser.offset= tex->offset;
 				tex->iuser.sfra= tex->sfra;
 				tex->iuser.cycl= (tex->imaflag & TEX_ANIMCYCLIC_)!=0;

Modified: trunk/blender/source/blender/editors/interface/interface_icons.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_icons.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/editors/interface/interface_icons.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -972,7 +972,7 @@
 	if(di->type == ICON_TYPE_VECTOR) {
 		/* vector icons use the uiBlock transformation, they are not drawn
 		with untransformed coordinates like the other icons */
-		di->data.vector.func(x, y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f); 
+		di->data.vector.func((int)x, (int)y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f); 
 	} 
 	else if(di->type == ICON_TYPE_TEXTURE) {
 		icon_draw_texture(x, y, w, h, di->data.texture.x, di->data.texture.y,

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -2202,7 +2202,7 @@
 	
 	float tf_uv_pxoffset[4][2]; /* bucket bounds in UV space so we can init pixels only for this face,  */
 	float xhalfpx, yhalfpx;
-	const float ibuf_xf = ibuf->x, ibuf_yf = ibuf->y;
+	const float ibuf_xf = (float)ibuf->x, ibuf_yf = (float)ibuf->y;
 	
 	int has_x_isect = 0, has_isect = 0; /* for early loop exit */
 	

Modified: trunk/blender/source/blender/makesrna/intern/rna_ui_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui_api.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui_api.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -202,14 +202,14 @@
 	RNA_def_function_return(func, parm);
 	RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator.");
 
-/*	func= RNA_def_function(srna, "operator_enum", "uiItemEnumO_string");
+/*	func= RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string");
 	api_ui_item_op_common(func);
 	parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
 	parm= RNA_def_string(func, "value", "", 0, "", "Enum property value.");
 	RNA_def_property_flag(parm, PROP_REQUIRED); */
 
-	func= RNA_def_function(srna, "operator_enums", "uiItemsEnumO");
+	func= RNA_def_function(srna, "operator_enum", "uiItemsEnumO");
 	parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator.");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
 	parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");

Modified: trunk/blender/source/blender/python/intern/bpy_operator.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_operator.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/python/intern/bpy_operator.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -137,7 +137,7 @@
 	ot= WM_operatortype_find(opname, TRUE);
 
 	if (ot == NULL) {
-		PyErr_Format(PyExc_LookupError, "Calling operator \"bpy.ops.%s\" error, could not be found", opname);
+		PyErr_Format(PyExc_AttributeError, "Calling operator \"bpy.ops.%s\" error, could not be found", opname);
 		return NULL;
 	}
 	

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2011-02-18 06:04:05 UTC (rev 34950)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2011-02-18 06:07:41 UTC (rev 34951)
@@ -722,7 +722,7 @@
 	/* fake button, it holds space for search items */
 	uiDefBut(block, LABEL, 0, "", 10, 10 - uiSearchBoxhHeight(), 180, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
 
-	uiPopupBoundsBlock(block, 6.0f, 0, -20); /* move it downwards, mouse over button */
+	uiPopupBoundsBlock(block, 6, 0, -20); /* move it downwards, mouse over button */
 	uiEndBlock(C, block);
 
 	event= *(win->eventstate);	/* XXX huh huh? make api call */




More information about the Bf-blender-cvs mailing list