diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-11-14 15:50:10 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-11-14 15:50:21 +0300 |
commit | fcadf47a917988527641a49f30ceb90c9f0f8bb7 (patch) | |
tree | 6d9dd758f121337f93bd96ff2c5848ad90bfd707 /source/blender/editors/space_image/space_image.c | |
parent | 08974c22e45720bfdc6bba18502175cd3100511f (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/editors/space_image/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 42c1b920f39..770582f4afa 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -791,7 +791,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) #endif } -static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -803,6 +803,14 @@ static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), A if (wmn->action == NA_PAINTING) ED_region_tag_redraw(ar); break; + case NC_MATERIAL: + if (wmn->data == ND_SHADING_LINKS) { + SpaceImage *sima = sa->spacedata.first; + + if (sima->flag & SI_TEXPAINT_FILTER_MATERIAL) + ED_region_tag_redraw(ar); + } + break; } } |