diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index a1392bb0a98..153446caec5 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -176,6 +176,7 @@ typedef struct Global { #define G_DRAWSEAMS (1 << 20) #define G_HIDDENEDGES (1 << 21) + /* Measurement info Drawing */ #define G_DRAW_EDGELEN (1 << 22) #define G_DRAW_FACEAREA (1 << 23) @@ -193,6 +194,11 @@ typedef struct Global { #define G_AUTOMATKEYS (1 << 30) +/* macro for testing face select mode + * Texture paint could be removed since selected faces are not used + * however hiding faces is useful */ +#define FACESEL_PAINT_TEST ((G.f&G_FACESELECT) && (G.f & (G_VERTEXPAINT|G_WEIGHTPAINT|G_TEXTUREPAINT))) + /* G.fileflags */ #define G_AUTOPACK (1 << 0) diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 25826037d5f..ab5a3a9a531 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1782,7 +1782,7 @@ CustomDataMask get_viewedit_datamask() ScrArea *sa; /* check if we need tfaces & mcols due to face select or texture paint */ - if(G.f & G_FACESELECT || G.f & G_TEXTUREPAINT) { + if(FACESEL_PAINT_TEST || G.f & G_TEXTUREPAINT) { mask |= CD_MASK_MTFACE | CD_MASK_MCOL; } else { /* check if we need tfaces & mcols due to view mode */ @@ -2325,7 +2325,7 @@ static void mesh_build_data(Object *ob, CustomDataMask dataMask) if(ob!=G.obedit) { Object *obact = G.scene->basact?G.scene->basact->object:NULL; - int editing = (G.f & (G_FACESELECT|G_WEIGHTPAINT|G_VERTEXPAINT|G_TEXTUREPAINT)); + int editing = (FACESEL_PAINT_TEST); int needMapping = editing && (ob==obact); if( (G.f & G_WEIGHTPAINT) && ob==obact ) { |