forked from bartvdbraak/blender
Fix for part of bug #17506: uv editing with multires is only
allowed at level 1, missed a case.
This commit is contained in:
parent
9b4956ae22
commit
0cf7bf7357
@ -2654,15 +2654,9 @@ void image_changed(SpaceImage *sima, Image *image)
|
|||||||
MTFace *tface;
|
MTFace *tface;
|
||||||
EditMesh *em = G.editMesh;
|
EditMesh *em = G.editMesh;
|
||||||
EditFace *efa;
|
EditFace *efa;
|
||||||
ImBuf *ibuf = NULL;
|
/*ImBuf *ibuf = NULL;*/
|
||||||
short change = 0;
|
short change = 0;
|
||||||
|
|
||||||
if(image==NULL) {
|
|
||||||
sima->flag &= ~SI_DRAWTOOL;
|
|
||||||
} else {
|
|
||||||
ibuf = BKE_image_get_ibuf(image, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(sima->mode!=SI_TEXTURE)
|
if(sima->mode!=SI_TEXTURE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2675,6 +2669,9 @@ void image_changed(SpaceImage *sima, Image *image)
|
|||||||
(G.editMesh->faces.first)
|
(G.editMesh->faces.first)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if(!is_uv_tface_editing_allowed())
|
||||||
|
return;
|
||||||
|
|
||||||
/* Add a UV layer if there is none, editmode only */
|
/* Add a UV layer if there is none, editmode only */
|
||||||
if ( !CustomData_has_layer(&G.editMesh->fdata, CD_MTFACE) ) {
|
if ( !CustomData_has_layer(&G.editMesh->fdata, CD_MTFACE) ) {
|
||||||
EM_add_data_layer(&em->fdata, CD_MTFACE);
|
EM_add_data_layer(&em->fdata, CD_MTFACE);
|
||||||
@ -2686,6 +2683,11 @@ void image_changed(SpaceImage *sima, Image *image)
|
|||||||
allqueue(REDRAWBUTSEDIT, 0);
|
allqueue(REDRAWBUTSEDIT, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if(image)
|
||||||
|
ibuf = BKE_image_get_ibuf(image, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (efa= em->faces.first; efa; efa= efa->next) {
|
for (efa= em->faces.first; efa; efa= efa->next) {
|
||||||
tface = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
|
tface = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
|
||||||
if (efa->h==0 && efa->f & SELECT) {
|
if (efa->h==0 && efa->f & SELECT) {
|
||||||
@ -2714,10 +2716,14 @@ void image_changed(SpaceImage *sima, Image *image)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* change the space image after because simaFaceDraw_Check uses the space image
|
/* change the space image after because simaFaceDraw_Check uses the space image
|
||||||
* to check if the face is displayed in UV-localview */
|
* to check if the face is displayed in UV-localview */
|
||||||
sima->image = image;
|
sima->image = image;
|
||||||
|
|
||||||
|
if(sima->image==NULL)
|
||||||
|
sima->flag &= ~SI_DRAWTOOL;
|
||||||
|
|
||||||
if (change)
|
if (change)
|
||||||
object_uvs_changed(OBACT);
|
object_uvs_changed(OBACT);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user