Bugfix: uv editor transform operators were not working anymore
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 14 Oct 2009 09:08:48 +0000 (09:08 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 14 Oct 2009 09:08:48 +0000 (09:08 +0000)
after the recent retopo/snap commit.

source/blender/editors/transform/transform_generics.c

index 5fe9db3915f66f54c9b0aa7464fe4cb1f900a135..11789651d01903430a32f6468b417c40cf35f10d 100644 (file)
@@ -617,6 +617,17 @@ void recalcData(TransInfo *t)
                        }
                }
        }
+       else if (t->spacetype == SPACE_IMAGE) {
+               if (t->obedit && t->obedit->type == OB_MESH) {
+                       SpaceImage *sima= t->sa->spacedata.first;
+                       
+                       flushTransUVs(t);
+                       if(sima->flag & SI_LIVE_UNWRAP)
+                               ED_uvedit_live_unwrap_re_solve();
+                       
+                       DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);
+               }
+       }
        else if (t->spacetype == SPACE_VIEW3D) {
                
                /* project */
@@ -652,27 +663,17 @@ void recalcData(TransInfo *t)
                                if(la->editlatt->flag & LT_OUTSIDE) outside_lattice(la->editlatt);
                        }
                        else if (t->obedit->type == OB_MESH) {
-                               if(t->spacetype==SPACE_IMAGE) {
-                                       SpaceImage *sima= t->sa->spacedata.first;
-                                       
-                                       flushTransUVs(t);
-                                       if(sima->flag & SI_LIVE_UNWRAP)
-                                               ED_uvedit_live_unwrap_re_solve();
-                                       
-                                       DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);
-                               } else {
-                                       EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh;
-                                       /* mirror modifier clipping? */
-                                       if(t->state != TRANS_CANCEL) {
-                                               clipMirrorModifier(t, t->obedit);
-                                       }
-                                       if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
-                                               editmesh_apply_to_mirror(t);
-                                               
-                                       DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);  /* sets recalc flags */
-                                       
-                                       recalc_editnormals(em);
+                               EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh;
+                               /* mirror modifier clipping? */
+                               if(t->state != TRANS_CANCEL) {
+                                       clipMirrorModifier(t, t->obedit);
                                }
+                               if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
+                                       editmesh_apply_to_mirror(t);
+                                       
+                               DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);  /* sets recalc flags */
+                               
+                               recalc_editnormals(em);
                        }
                        else if(t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */
                                bArmature *arm= t->obedit->data;
@@ -809,7 +810,7 @@ void recalcData(TransInfo *t)
                        }
                }
                
-               if(t->spacetype==SPACE_VIEW3D && ((View3D*)t->view)->drawtype == OB_SHADED)
+               if(((View3D*)t->view)->drawtype == OB_SHADED)
                        reshadeall_displist(t->scene);
        }
 }