diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-07-23 22:06:29 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-07-23 22:06:41 +0400 |
commit | af162658e1270b7442eb064360d1bec75c621c1a (patch) | |
tree | 638cae16abc9b10dae39763a7df0bd3a9890f228 /source/blender/editors | |
parent | 1f55044617d167e81bc56cc359a1adf886045447 (diff) |
Texture painting:
Add ability to select UV layer from the layer panel.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 1f0b2c80fc4..5c1af41e05d 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3292,7 +3292,7 @@ static void project_paint_begin(ProjPaintState *ps) continue; if (slot != slot_last) { - if (!slot->uvname[0] || !(tf_base = CustomData_get_layer_named(&ps->dm->faceData, CD_MTFACE, slot->uvname))) + if (!slot->uvname || !(tf_base = CustomData_get_layer_named(&ps->dm->faceData, CD_MTFACE, slot->uvname))) tf_base = CustomData_get_layer(&ps->dm->faceData, CD_MTFACE); slot_last = slot; } @@ -3313,7 +3313,7 @@ static void project_paint_begin(ProjPaintState *ps) tf_clone = ps->dm_mtface_clone + face_index; if (slot_clone != slot_last_clone) { - if (!slot_clone->uvname[0] || !(tf_clone_base = CustomData_get_layer_named(&ps->dm->faceData, CD_MTFACE, slot_clone->uvname))) + if (!slot->uvname || !(tf_clone_base = CustomData_get_layer_named(&ps->dm->faceData, CD_MTFACE, slot_clone->uvname))) tf_clone_base = CustomData_get_layer(&ps->dm->faceData, CD_MTFACE); slot_last_clone = slot_clone; } diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index eaa4885572e..0d463172f99 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -312,7 +312,7 @@ static void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, c if (mf.v4) dm->getVert(dm, mf.v4, &mv[3]); - if (!slot->uvname[0] || !(tf_base = CustomData_get_layer_named(&dm->faceData, CD_MTFACE, slot->uvname))) + if (!slot->uvname || !(tf_base = CustomData_get_layer_named(&dm->faceData, CD_MTFACE, slot->uvname))) tf_base = CustomData_get_layer(&dm->faceData, CD_MTFACE); tf = &tf_base[a]; diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 0f605429187..36c96a8d011 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -497,7 +497,7 @@ static void draw_uvs_texpaint(SpaceImage *sima, Scene *scene, Object *ob) MPoly *mpoly = me->mpoly; MLoopUV *mloopuv, *mloopuv_base; int a, b; - if (!(ma && ma->texpaintslot && ma->texpaintslot[ma->paint_active_slot].uvname[0] && + if (!(ma && ma->texpaintslot && ma->texpaintslot[ma->paint_active_slot].uvname && (mloopuv = CustomData_get_layer_named(&me->ldata, CD_MLOOPUV, ma->texpaintslot[ma->paint_active_slot].uvname)))) { mloopuv = me->mloopuv; |