- loading missing files didnt give any warning
- shape key transfer poll function
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user