diff options
-rw-r--r-- | source/blender/include/editmesh.h | 4 | ||||
-rw-r--r-- | source/blender/include/multires.h | 4 | ||||
-rw-r--r-- | source/blender/src/buttons_editing.c | 18 | ||||
-rw-r--r-- | source/blender/src/editmesh_add.c | 3 | ||||
-rw-r--r-- | source/blender/src/editmesh_tools.c | 3 | ||||
-rw-r--r-- | source/blender/src/multires.c | 2 | ||||
-rw-r--r-- | source/blender/src/vpaint.c | 2 |
7 files changed, 20 insertions, 16 deletions
diff --git a/source/blender/include/editmesh.h b/source/blender/include/editmesh.h index 36007252a26..50115e52a21 100644 --- a/source/blender/include/editmesh.h +++ b/source/blender/include/editmesh.h @@ -104,9 +104,5 @@ extern EditVert *findnearestvert(int *dist, short sel, short strict); /* ******************* editmesh_tools.c */ -/* multires.c */ -int multires_test(); -int multires_level1_test(); - #endif diff --git a/source/blender/include/multires.h b/source/blender/include/multires.h index 55e98f169d2..7efae2ed9a1 100644 --- a/source/blender/include/multires.h +++ b/source/blender/include/multires.h @@ -38,6 +38,10 @@ struct MultiresLevel; struct Multires; struct uiBlock; +/* For canceling operations that don't work with multires on or on a non-base level */ +int multires_test(); +int multires_level1_test(); + void multires_draw_interface(struct uiBlock *block, unsigned short cx, unsigned short cy); void multires_disp_map(void *, void*); diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index e1e734284ea..0ae1b3ede34 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -4592,14 +4592,16 @@ void do_fpaintbuts(unsigned short event) allqueue(REDRAWBUTSEDIT, 0); break; case B_CLR_WPAINT: - defGroup = BLI_findlink(&ob->defbase, ob->actdef-1); - if(defGroup) { - Mesh *me= ob->data; - int a; - for(a=0; a<me->totvert; a++) - remove_vert_defgroup (ob, defGroup, a); - allqueue(REDRAWVIEW3D, 0); - DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + if(!multires_level1_test()) { + defGroup = BLI_findlink(&ob->defbase, ob->actdef-1); + if(defGroup) { + Mesh *me= ob->data; + int a; + for(a=0; a<me->totvert; a++) + remove_vert_defgroup (ob, defGroup, a); + allqueue(REDRAWVIEW3D, 0); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + } } break; case B_SCULPT_TEXBROWSE: diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c index 750e5b24595..2f3d899735a 100644 --- a/source/blender/src/editmesh_add.c +++ b/source/blender/src/editmesh_add.c @@ -85,8 +85,9 @@ #include "BSE_view.h" #include "BSE_edit.h" -#include "mydevice.h" #include "blendef.h" +#include "multires.h" +#include "mydevice.h" #include "editmesh.h" diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 3f0df4f2155..0f4c2ff1498 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -100,8 +100,9 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "BSE_view.h" #include "BSE_edit.h" -#include "mydevice.h" #include "blendef.h" +#include "multires.h" +#include "mydevice.h" #include "editmesh.h" diff --git a/source/blender/src/multires.c b/source/blender/src/multires.c index 5ae8d013145..a4d56f6f2d0 100644 --- a/source/blender/src/multires.c +++ b/source/blender/src/multires.c @@ -70,7 +70,6 @@ #include "IMB_imbuf_types.h" #include "blendef.h" -#include "editmesh.h" #include "multires.h" #include "mydevice.h" #include "parametrizer.h" @@ -79,7 +78,6 @@ const CustomDataMask vdata_mask= CD_MASK_MDEFORMVERT; -/* editmesh.h */ int multires_test() { Mesh *me= get_mesh(OBACT); diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index 8ba30f778c3..695fec5da75 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -91,6 +91,7 @@ #include "BSE_trans_types.h" #include "BSE_view.h" +#include "multires.h" #include "mydevice.h" #include "blendef.h" @@ -1091,6 +1092,7 @@ void weight_paint(void) if((G.f & G_WEIGHTPAINT)==0) return; if(G.obedit) return; + if(multires_level1_test()) return; ob= OBACT; if(!ob || ob->id.lib) return; |