- loading missing files didnt give any warning
authorCampbell Barton <ideasman42@gmail.com>
Sun, 27 Dec 2009 23:29:34 +0000 (23:29 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 27 Dec 2009 23:29:34 +0000 (23:29 +0000)
- shape key transfer poll function

release/scripts/op/object.py
release/scripts/ui/space_info.py
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_operators.c

index c510981ebc253c5532ccfd722fc2a9736945ca53..e093460ab3166a00b5c5f5d5bb5a0c5c45154a7f 100644 (file)
@@ -305,6 +305,10 @@ class ShapeTransfer(bpy.types.Operator):
 
         return {'FINISHED'}
 
+    def poll(self, context):
+        obj = context.active_object
+        return (obj and obj.mode != 'EDIT')
+
     def execute(self, context):
         C = bpy.context
         ob_act = C.active_object
index 3f35bbc06d80d45979e1903f4671c8177ad0a696..92bf6dc36a70afbbe036e9fc90bdbe3709d8992d 100644 (file)
@@ -150,7 +150,7 @@ class INFO_MT_file_external_data(bpy.types.Menu):
 
 class INFO_MT_mesh_add(bpy.types.Menu):
     bl_idname = "INFO_MT_mesh_add"
-    bl_label = "Mesh"
+    bl_label = "Add Mesh"
 
     def draw(self, context):
         layout = self.layout
index 87e4048971b2a4a753c68fa7bb5f3dbee88c23bc..05fdb500d9e581efe4018f12d0dcc40bdd46f720 100644 (file)
@@ -286,8 +286,8 @@ void WM_read_file(bContext *C, char *name, ReportList *reports)
        else if(retval==1)
                BKE_write_undo(C, "Import file");
        else if(retval == -1) {
-               if(reports && reports->list.first == NULL)
-                       BKE_report(reports, RPT_ERROR, "Cannot read file.");
+               if(reports)
+                       BKE_reportf(reports, RPT_ERROR, "Can't read file \"%s\".", name);
        }
 }
 
index 69d6ef541dcb2a776cf95bc7922e89213cf87383..db79fcd70b9be439c6f6ce372ac130fe7d674131 100644 (file)
@@ -1160,7 +1160,7 @@ static int recentfile_exec(bContext *C, wmOperator *op)
                        }
                }
        }
-       return 0;
+       return OPERATOR_FINISHED;
 }
 
 static int wm_recentfile_invoke(bContext *C, wmOperator *op, wmEvent *event)