#include "BIF_toolbox.h"
#include "BIF_usiblender.h"
#include "BIF_previewrender.h"
+#include "BIF_sketch.h"
#include "BSE_edit.h"
#include "BSE_view.h"
#include "BDR_sculptmode.h"
#include "BDR_unwrapper.h"
#include "BDR_gpencil.h"
+#include "BDR_sketch.h"
#include "BLO_readfile.h" /* for BLO_blendhandle_close */
return; /* return if event was processed (swallowed) by handler(s) */
}
#endif
+ if(BIF_paintSketch(LEFTMOUSE)) return;
if(gpencil_do_paint(sa, L_MOUSE)) return;
if(BIF_do_manipulator(sa)) return;
}
else if(event==RIGHTMOUSE) {
if(gpencil_do_paint(sa, R_MOUSE)) return;
+ if(BIF_paintSketch(RIGHTMOUSE)) return;
}
/* swap mouse buttons based on user preference */
}
}
}
+
+ BDR_queueDrawSketch();
/* Handle retopo painting */
if(retopo_mesh_paint_check()) {
else if(G.obedit->type==OB_LATTICE)
deselectall_Latt();
else if(G.obedit->type==OB_ARMATURE)
- deselectall_armature(1, 1); /* 1 == toggle */
+ {
+ if (BIF_fullSketchMode())
+ {
+ BIF_selectAllSketch(1);
+ }
+ else
+ {
+ deselectall_armature(1, 1); /* 1 == toggle */
+ }
+ }
}
else if (ob && (ob->flag & OB_POSEMODE)){
deselectall_posearmature(ob, 1, 1);
else if(G.qual==LR_ALTKEY) {
if(ob && (ob->flag & OB_POSEMODE))
pose_clear_constraints(); /* poseobject.c */
+ else if (BIF_fullSketchMode())
+ {
+ BIF_convertSketch();
+ }
else
convertmenu(); /* editobject.c */
}
case DELKEY:
if(G.qual==0 || G.qual==LR_SHIFTKEY)
delete_context_selected();
- if(G.qual==LR_ALTKEY)
+ else if(G.qual==LR_ALTKEY)
gpencil_delete_menu();
break;
case YKEY:
break;
case ESCKEY:
- if(G.qual==0) {
+ if (G.qual == 0 && BIF_validSketchMode())
+ {
+ BIF_cancelStrokeSketch();
+ }
+ else if(G.qual==0) {
if (G.vd->flag & V3D_DISPIMAGE) {
G.vd->flag &= ~V3D_DISPIMAGE;
doredraw= 1;