bugfix [#25238] Render image window edits UV's
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "ED_util.h"
|
||||
#include "ED_image.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_armature.h"
|
||||
@@ -320,23 +321,12 @@ int ED_operator_posemode(bContext *C)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* wrapper for ED_space_image_show_uvedit */
|
||||
int ED_operator_uvedit(bContext *C)
|
||||
{
|
||||
SpaceImage *sima= CTX_wm_space_image(C);
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
EditMesh *em= NULL;
|
||||
|
||||
if(obedit && obedit->type==OB_MESH)
|
||||
em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
|
||||
|
||||
if(em && (em->faces.first) && (CustomData_has_layer(&em->fdata, CD_MTFACE))) {
|
||||
BKE_mesh_end_editmesh(obedit->data, em);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(obedit)
|
||||
BKE_mesh_end_editmesh(obedit->data, em);
|
||||
return 0;
|
||||
return ED_space_image_show_uvedit(sima, obedit);
|
||||
}
|
||||
|
||||
int ED_operator_uvmap(bContext *C)
|
||||
|
||||
@@ -265,11 +265,9 @@ int ED_space_image_show_paint(SpaceImage *sima)
|
||||
|
||||
int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit)
|
||||
{
|
||||
if(ED_space_image_show_render(sima))
|
||||
if(sima && (ED_space_image_show_render(sima) || ED_space_image_show_paint(sima)))
|
||||
return 0;
|
||||
if(ED_space_image_show_paint(sima))
|
||||
return 0;
|
||||
|
||||
|
||||
if(obedit && obedit->type == OB_MESH) {
|
||||
EditMesh *em = BKE_mesh_get_editmesh(obedit->data);
|
||||
int ret;
|
||||
|
||||
@@ -2444,7 +2444,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
|
||||
EditMesh *em = ((Mesh *)t->obedit->data)->edit_mesh;
|
||||
EditFace *efa;
|
||||
|
||||
if(!ED_uvedit_test(t->obedit)) return;
|
||||
if(!ED_space_image_show_uvedit(sima, t->obedit)) return;
|
||||
|
||||
/* count */
|
||||
for (efa= em->faces.first; efa; efa= efa->next) {
|
||||
|
||||
Reference in New Issue
Block a user