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:
authorTon Roosendaal <ton@blender.org>2010-12-21 18:10:09 +0300
committerTon Roosendaal <ton@blender.org>2010-12-21 18:10:09 +0300
commitfae8dc5a735d6e47d96d5757fbc51a33b45a4cea (patch)
treefcced0ae10dba2d9afbcc6ef4c997edb6d762d8f /source/blender/editors/mesh/editmesh_tools.c
parentb0f87a17460578382cabb8447934cb045eee223a (diff)
Error/Warning report flipping.
An operator Error throws up a menu, a Warning only a flashy header print. In mesh editmode the menus for simple failures got very annoying, like "Already a face" for Fkey on a face. Proposal is to use warning for contextual failures, like: - wrong selection - unsupported combination - wrong modes And use errors for cases you really need user attention, for example when issues are invisble or potentially damaging work. - Memory failures - Files not found List can grow in future :) let's test this for mesh now. I'll tackle this for other ops later after review. (Also changed: loopcut disabled when editmode shows deformed result)
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index b1306a5c262..7c3262f3747 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -635,7 +635,7 @@ static void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op, short typ
EM_stats_update(em);
if(transmode==0) {
- BKE_report(op->reports, RPT_ERROR, "Not a valid selection for extrude");
+ BKE_report(op->reports, RPT_WARNING, "Not a valid selection for extrude");
}
else {
EM_fgon_flags(em);
@@ -991,7 +991,7 @@ static int spin_mesh_exec(bContext *C, wmOperator *op)
ok= spin_mesh(C, op, NULL, RNA_int_get(op->ptr,"steps"), RNA_float_get(op->ptr,"degrees"), RNA_boolean_get(op->ptr,"dupli"));
if(ok==0) {
- BKE_report(op->reports, RPT_ERROR, "No valid vertices are selected");
+ BKE_report(op->reports, RPT_WARNING, "No valid vertices are selected");
return OPERATOR_CANCELLED;
}
@@ -1077,7 +1077,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
}
}
if(v1==NULL || v2==NULL) {
- BKE_report(op->reports, RPT_ERROR, "You have to select a string of connected vertices too");
+ BKE_report(op->reports, RPT_WARNING, "You have to select a string of connected vertices too");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -1103,7 +1103,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
else {
- BKE_report(op->reports, RPT_ERROR, "No valid vertices are selected");
+ BKE_report(op->reports, RPT_WARNING, "No valid vertices are selected");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -3777,7 +3777,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
}
else
{
- BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces");
+ BKE_report(op->reports, RPT_WARNING, "Select one edge or two adjacent faces");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -3792,7 +3792,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
}
}
else {
- BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces");
+ BKE_report(op->reports, RPT_WARNING, "Select one edge or two adjacent faces");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -4878,12 +4878,12 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
if(efa) {
- BKE_report(op->reports, RPT_ERROR, "Can't perform ripping with faces selected this way");
+ BKE_report(op->reports, RPT_WARNING, "Can't perform ripping with faces selected this way");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
if(sefa==NULL) {
- BKE_report(op->reports, RPT_ERROR, "No proper selection or faces included");
+ BKE_report(op->reports, RPT_WARNING, "No proper selection or faces included");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -4948,7 +4948,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
if(seed==NULL) { // never happens?
- BKE_report(op->reports, RPT_ERROR, "No proper edge found to start");
+ BKE_report(op->reports, RPT_WARNING, "No proper edge found to start");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -5078,7 +5078,7 @@ static void shape_propagate(Object *obedit, EditMesh *em, wmOperator *op)
if(me->key){
ky = me->key;
} else {
- BKE_report(op->reports, RPT_ERROR, "Object Has No Key");
+ BKE_report(op->reports, RPT_WARNING, "Object Has No Key");
return;
}
@@ -5093,7 +5093,7 @@ static void shape_propagate(Object *obedit, EditMesh *em, wmOperator *op)
}
}
} else {
- BKE_report(op->reports, RPT_ERROR, "Object Has No Blendshapes");
+ BKE_report(op->reports, RPT_WARNING, "Object Has No Blendshapes");
return;
}
@@ -5858,7 +5858,7 @@ static int merge_exec(bContext *C, wmOperator *op)
if(ese && ese->type == EDITVERT) {
count = merge_firstlast(em, 0, uvs);
} else {
- BKE_report(op->reports, RPT_ERROR, "no last selected vertex set");
+ BKE_report(op->reports, RPT_WARNING, "no last selected vertex set");
}
break;
case 6:
@@ -5867,7 +5867,7 @@ static int merge_exec(bContext *C, wmOperator *op)
count = merge_firstlast(em, 1, uvs);
}
else {
- BKE_report(op->reports, RPT_ERROR, "no last selected vertex set");
+ BKE_report(op->reports, RPT_WARNING, "no last selected vertex set");
}
break;
case 5:
@@ -6123,7 +6123,7 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op)
}
else {
BKE_mesh_end_editmesh(obedit->data, em);
- BKE_report(op->reports, RPT_ERROR, "Path Selection requires that exactly two vertices be selected");
+ BKE_report(op->reports, RPT_WARNING, "Path Selection requires that exactly two vertices be selected");
return OPERATOR_CANCELLED;
}
@@ -6408,7 +6408,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op)
int dir= RNA_enum_get(op->ptr, "direction");
if (!EM_texFaceCheck(em)) {
- BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -6482,7 +6482,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
int axis= RNA_enum_get(op->ptr, "axis");
if (!EM_texFaceCheck(em)) {
- BKE_report(op->reports, RPT_ERROR, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -6570,7 +6570,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
int dir= RNA_enum_get(op->ptr, "direction");
if (!EM_vertColorCheck(em)) {
- BKE_report(op->reports, RPT_ERROR, "Mesh has no color layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no color layers.");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -6627,7 +6627,7 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op)
int axis= RNA_enum_get(op->ptr, "axis");
if (!EM_vertColorCheck(em)) {
- BKE_report(op->reports, RPT_ERROR, "Mesh has no color layers");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no color layers");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}