[Bf-blender-cvs] [8d5d6de] master: Reuse local view for UVs for previous commit, thanks to Campbell for the suggestion.
Antony Riakiotakis
noreply at git.blender.org
Fri Nov 14 14:06:50 CET 2014
Commit: 8d5d6de7615c79a79a0ab3fa95319650ebe89206
Author: Antony Riakiotakis
Date: Fri Nov 14 14:06:29 2014 +0100
Branches: master
https://developer.blender.org/rB8d5d6de7615c79a79a0ab3fa95319650ebe89206
Reuse local view for UVs for previous commit, thanks to Campbell for the
suggestion.
Also minor compile fix after viewport patch
===================================================================
M intern/ghost/intern/GHOST_WindowX11.h
M release/scripts/startup/bl_ui/space_image.py
M source/blender/editors/space_image/space_image.c
M source/blender/editors/uvedit/uvedit_draw.c
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h
index cd98b39..7bb9a85 100644
--- a/intern/ghost/intern/GHOST_WindowX11.h
+++ b/intern/ghost/intern/GHOST_WindowX11.h
@@ -35,6 +35,7 @@
#include "GHOST_Window.h"
#include <X11/Xlib.h>
+#include <X11/Xutil.h>
// For tablets
#ifdef WITH_X11_XINPUT
# include <X11/extensions/XInput.h>
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 1e3a743..56c0bda 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -82,7 +82,7 @@ class IMAGE_MT_view(Menu):
layout.prop(uv, "show_other_objects")
if paint.brush and (context.image_paint_object or sima.mode == 'PAINT'):
layout.prop(uv, "show_texpaint")
- layout.prop(uv, "texpaint_filter_mat")
+ layout.prop(toolsettings, "show_uv_local_view", text="Show same material")
layout.separator()
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 770582f..5dc9af2 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -33,6 +33,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "DNA_image_types.h"
#include "MEM_guardedalloc.h"
@@ -807,7 +808,7 @@ static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion *
if (wmn->data == ND_SHADING_LINKS) {
SpaceImage *sima = sa->spacedata.first;
- if (sima->flag & SI_TEXPAINT_FILTER_MATERIAL)
+ if (sima->iuser.scene && (sima->iuser.scene->toolsettings->uv_flag & UV_SHOW_SAME_IMAGE))
ED_region_tag_redraw(ar);
}
break;
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 7b674e7..4c93cfa 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -506,7 +506,7 @@ static void draw_uvs_texpaint(SpaceImage *sima, Scene *scene, Object *ob)
mloopuv_base = mloopuv;
for (a = me->totpoly; a > 0; a--, mpoly++) {
- if ((sima->flag & SI_TEXPAINT_FILTER_MATERIAL) && mpoly->mat_nr != ob->actcol - 1)
+ if ((scene->toolsettings->uv_flag & UV_SHOW_SAME_IMAGE) && mpoly->mat_nr != ob->actcol - 1)
continue;
glBegin(GL_LINE_LOOP);
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 41b302e..a8fe8ce 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -810,8 +810,6 @@ typedef enum eSpaceImage_Flag {
SI_COLOR_CORRECTION = (1 << 24),
SI_NO_DRAW_TEXPAINT = (1 << 25),
- /* filter texpaint uvs based on active material */
- SI_TEXPAINT_FILTER_MATERIAL = (1 << 26)
} eSpaceImage_Flag;
/* Text Editor ============================================ */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8788a72..68173eb 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1523,11 +1523,6 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Draw Texture Paint UVs", "Draw overlay of texture paint uv layer");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
- prop = RNA_def_property(srna, "texpaint_filter_mat", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_TEXPAINT_FILTER_MATERIAL);
- RNA_def_property_ui_text(prop, "Same Material UVs", "Only draw UVs of faces with active material");
- RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
-
prop = RNA_def_property(srna, "show_normalized_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
RNA_def_property_ui_text(prop, "Normalized Coordinates",
More information about the Bf-blender-cvs
mailing list