- loading missing files didnt give any warning

- shape key transfer poll function
This commit is contained in:
2009-12-27 23:29:34 +00:00
parent 532b5e7bba
commit 351f5d1837
4 changed files with 8 additions and 4 deletions

View 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

View 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

View 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);
}
}

View 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)