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:
authorAntony Riakiotakis <kalast@gmail.com>2014-11-14 15:50:10 +0300
committerAntony Riakiotakis <kalast@gmail.com>2014-11-14 15:50:21 +0300
commitfcadf47a917988527641a49f30ceb90c9f0f8bb7 (patch)
tree6d9dd758f121337f93bd96ff2c5848ad90bfd707 /source/blender/makesrna/intern
parent08974c22e45720bfdc6bba18502175cd3100511f (diff)
Fix T42561 (semi feature request/comeback) UVs in image editor can get
too crowded. UVs in the same layer can be used for many images. It used to be possible to filter UV faces based on the image, but this is impossible now due to the way the system works, so I added an option to allow filtering UVs based on active material index. Rationale on using option and not being smart here (options are bad tm) is that for some workflows, such as preserving image space by using the same image for many materials, people might want to turn this off.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_object.c1
-rw-r--r--source/blender/makesrna/intern/rna_space.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 690468a5278..b57c3689d05 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -941,6 +941,7 @@ static void rna_MaterialSlot_name_get(PointerRNA *ptr, char *str)
static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
rna_Object_internal_update(bmain, scene, ptr);
+
WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, ptr->id.data);
WM_main_add_notifier(NC_MATERIAL | ND_SHADING_LINKS, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 68173ebefb4..8788a724f0c 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1523,6 +1523,11 @@ 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",