Various stuff in one commit;
authorTon Roosendaal <ton@blender.org>
Sat, 22 Oct 2005 18:47:38 +0000 (18:47 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 22 Oct 2005 18:47:38 +0000 (18:47 +0000)
- Added (BKE_utildefines.h) POINTER_TO_INT(poin) and INT_TO_POINTER(int)
  defines, to help fixing issues with switch to 64 bits systems. This
  assumes that a) not more than 16GB mem is used and b) that address
  space is below the 1<<35 value. The latter has to be confirmed, but it
  seems to conform the current 64 bits generation of OSs (for mallocs).

  Needless to say; use long if you want to store pointers! This is for
  temporal fixing.

- Added editmesh version for mesh-octree lookups, not used yet.

- Fix: ESC on armature posemode restored the actions, should not happen

- Fix: If in NLA an action was 0 frame long, it caused draw error

- Fix: Click on name in Action Window now activates Bones

- Fix: "Snap to" options in Armature editmode now use X-axis mirror edit.

13 files changed:
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/intern/action.c
source/blender/include/BIF_editarmature.h
source/blender/makesdna/DNA_action_types.h
source/blender/src/drawnla.c
source/blender/src/edit.c
source/blender/src/editaction.c
source/blender/src/editarmature.c
source/blender/src/editmesh_mods.c
source/blender/src/meshtools.c
source/blender/src/poseobject.c
source/blender/src/transform_conversions.c
source/blender/src/transform_generics.c

index 8a5af1f7277c4ebaa76a1d264be5b0739ff33d04..a18a43fb7b8e6458b6bed188dd41cfaef9027579 100644 (file)
 #define ELEM7(a, b, c, d, e, f, g, h)   ( ELEM3(a, b, c, d) || ELEM4(a, e, f, g, h) )
 #define ELEM8(a, b, c, d, e, f, g, h, i)        ( ELEM4(a, b, c, d, e) || ELEM4(a, f, g, h, i) )
 
-       
+/* pointer magic, only to be used for the max 16 Gig mem period */
+/* note that  int is signed! */
+#define POINTER_TO_INT(poin)   (int)( ((long)(poin))>>3 )
+#define INT_TO_POINTER(int)            (void *)( ((long)(int))<<3 )
+
 /* string compare */
 #define STREQ(str, a)           ( strcmp((str), (a))==0 )
 #define STREQ2(str, a, b)       ( STREQ(str, a) || STREQ(str, b) )
index 276f5ecdcec5f3122b0eb451af69be23ecf33870..dcb048c5227d1d7307aedbac90944fe2ab918b80 100644 (file)
@@ -862,7 +862,8 @@ void do_all_pose_actions(Object *ob)
        if(ob->type!=OB_ARMATURE || ob->pose==NULL) return;
 
        if(ob->pose->flag & POSE_LOCKED) {  // no actions to execute while transform
-               ;
+               if(ob->pose->flag & POSE_DO_UNLOCK)
+                       ob->pose->flag &= ~(POSE_LOCKED|POSE_DO_UNLOCK);
        }
        else if(ob->action && ((ob->nlaflag & OB_NLA_OVERRIDE)==0 || ob->nlastrips.first==NULL) ) {
                float cframe= (float) G.scene->r.cfra;
index 284ab9dee3fd2db68afe3b24f2da89275b86a7a2..a9cff6ce7ae8f219f08493775c134268e431a54f 100644 (file)
@@ -103,7 +103,6 @@ void        mouse_armature(void);
 void   remake_editArmature(void);
 void   selectconnected_armature(void);
 void   selectconnected_posearmature(void);
-void   select_bone_by_name (struct bArmature *arm, char *name, int select);
 void    unique_editbone_name (char* name);
 
 void auto_align_armature(void);
@@ -120,6 +119,7 @@ void undo_push_armature(char *name);
 void armature_bone_rename(struct bArmature *arm, char *oldname, char *newname);
 void armature_flip_names(void);
 EditBone *armature_bone_get_mirrored(EditBone *ebo);
+void transform_armature_mirror_update(void);
 
 void hide_selected_armature_bones(void);
 void hide_unselected_armature_bones(void);
index 90f8760462b0648965f35d97385ec0dfe4b40753..6c26e86f88ff53c48c44ac73e27e3b9c56f411d9 100644 (file)
@@ -120,6 +120,7 @@ typedef struct SpaceAction {
 
 #define POSE_RECALC            1
 #define POSE_LOCKED            2
+#define POSE_DO_UNLOCK 4
 
 /* PoseChannel (transform) flags */
 enum   {
index 120ce5c3d8d90d540f0dd0a1b77647b4c5945f03..5c8a9ade3d978d77eca8cedb00b4050531ce5f92 100644 (file)
@@ -190,6 +190,7 @@ void map_active_strip(gla2DDrawInfo *di, Object *ob, int restore)
                map= stored;
                map.xmin= get_action_frame(ob, map.xmin);
                map.xmax= get_action_frame(ob, map.xmax);
+               if(map.xmin==map.xmax) map.xmax+= 1.0;
                gla2DSetMap(di, &map);
        }
 }
index 877c0f000fd3f35dc86d54119a85c4a61af6d6d6..bb694b189be8847a511fca09e5539340bcb12cc9 100644 (file)
@@ -760,6 +760,7 @@ static void special_transvert_update(void)
                        }
                }
                else if(G.obedit->type==OB_ARMATURE){
+                       bArmature *arm= G.obedit->data;
                        EditBone *ebo;
                        
                        /* Ensure all bones are correctly adjusted */
@@ -776,6 +777,8 @@ static void special_transvert_update(void)
                                        }
                                }
                        }
+                       if(arm->flag & ARM_MIRROR_EDIT) 
+                               transform_armature_mirror_update();
                }
                else if(G.obedit->type==OB_LATTICE) {
                        if(editLatt->flag & LT_OUTSIDE) outside_lattice(editLatt);
index 8fb1186af1dbc1ad79905af083b8fe52f577d60a..2e56fac2dbd0931e078a21919bee484614b47c02 100644 (file)
@@ -111,21 +111,29 @@ static void bottom_sel_action(void);
 short showsliders = 0;
 short ACTWIDTH = NAMEWIDTH;
 
+/* messy call... */
 static void select_poseelement_by_name (char *name, int select)
 {
-       /* Synchs selection of channels with selection of object elements in posemode */
-
+       /* Syncs selection of channels with selection of object elements in posemode */
        Object *ob= OBACT;
-
-       if (!ob)
+       bPoseChannel *pchan;
+       
+       if (!ob || ob->type!=OB_ARMATURE)
                return;
-
-       switch (ob->type){
-       case OB_ARMATURE:
-               select_bone_by_name ((bArmature*)ob->data, name, select);
-               break;
-       default:
-               break;
+       
+       if(select==2) {
+               for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next)
+                       pchan->bone->flag &= ~(BONE_ACTIVE);
+       }
+       
+       pchan= get_pose_channel(ob->pose, name);
+       if(pchan) {
+               if(select)
+                       pchan->bone->flag |= (BONE_SELECTED);
+               else 
+                       pchan->bone->flag &= ~(BONE_SELECTED);
+               if(select==2)
+                       pchan->bone->flag |= (BONE_ACTIVE);
        }
 }
 
@@ -187,16 +195,16 @@ bAction* bake_action_with_client (bAction *act, Object *armob, float tolerance)
                for (pchan=armob->pose->chanbase.first; pchan; pchan=pchan->next){
 
                        /* Apply to keys */
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_X);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_Y);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_Z);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_QUAT_X);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_QUAT_Y);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_QUAT_Z);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_QUAT_W);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_SIZE_X);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_SIZE_Y);
-                       insertkey(id, ID_AC, pchan->name, NULL, AC_SIZE_Z);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_X);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Y);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Z);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_X);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Y);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Z);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_W);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_X);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Y);
+                       insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Z);
                }
        }
 
@@ -225,6 +233,7 @@ bAction* bake_action_with_client (bAction *act, Object *armob, float tolerance)
 }
 
 /* apparently within active object context */
+/* called extern, like on bone selection */
 void select_actionchannel_by_name (bAction *act, char *name, int select)
 {
        bActionChannel *chan;
@@ -237,12 +246,10 @@ void select_actionchannel_by_name (bAction *act, char *name, int select)
                        if (select){
                                chan->flag |= ACHAN_SELECTED;
                                hilight_channel (act, chan, 1);
-                               select_poseelement_by_name(chan->name, 1);
                        }
                        else{
                                chan->flag &= ~ACHAN_SELECTED;
                                hilight_channel (act, chan, 0);
-                               select_poseelement_by_name(chan->name, 0);
                        }
                        return;
                }
@@ -571,7 +578,7 @@ static void mouse_action(int selectmode)
                        
                        chan->flag |= ACHAN_SELECTED;
                        hilight_channel (act, chan, 1);
-                       select_poseelement_by_name(chan->name, 1);
+                       select_poseelement_by_name(chan->name, 2);      /* 2 is activate */
                }
                
                if (conchan)
@@ -586,7 +593,8 @@ static void mouse_action(int selectmode)
                allqueue(REDRAWVIEW3D, 0);
                allqueue(REDRAWACTION, 0);
                allqueue(REDRAWNLA, 0);
-
+               allqueue(REDRAWOOPS, 0);
+               allqueue(REDRAWBUTSALL, 0);
        }
 }
 
@@ -686,7 +694,7 @@ void borderselect_action(void)
                        /* Check action */
                        ymin=ymax-(CHANNELHEIGHT+CHANNELSKIP);
                        if (!((ymax < rectf.ymin) || (ymin > rectf.ymax)))
-          borderselect_ipo_key(chan->ipo, rectf.xmin, rectf.xmax,
+                               borderselect_ipo_key(chan->ipo, rectf.xmin, rectf.xmax,
                                selectmode);
 
                        ymax=ymin;
@@ -1378,7 +1386,7 @@ static int select_constraint_channel(bAction *act,
        return flag;
 }
 
-
+/* lefthand side */
 static void mouse_actionchannels(bAction *act, short *mval,
                                  short *mvalo, int selectmode) {
        /* Select action channels, based on mouse values.
@@ -1455,6 +1463,9 @@ static void mouse_actionchannels(bAction *act, short *mval,
                         */
                        sel = (chan->flag & ACHAN_SELECTED);
                        select_channel(act, chan, selectmode);
+                       /* messy... */
+                       select_poseelement_by_name(chan->name, 2);
+                       
                }
                --clickmin;
                --clickmax;
@@ -1475,6 +1486,8 @@ static void mouse_actionchannels(bAction *act, short *mval,
        allqueue (REDRAWVIEW3D, 0);
        allqueue (REDRAWACTION, 0);
        allqueue (REDRAWNLA, 0);
+       allqueue (REDRAWOOPS, 0);
+       allqueue (REDRAWBUTSALL, 0);
 }
 
 void delete_meshchannel_keys(Key *key)
index 8d53d3b524658b5dc9bd067786b89a002c446e3c..68883e3ed3b4510da5f6ed471e46fd9b58f52094 100644 (file)
@@ -542,38 +542,6 @@ static void *get_nearest_bone (short findunsel)
 /* **************** END PoseMode & EditMode *************************** */
 /* **************** Posemode stuff ********************** */
 
-static int select_bonechildren_by_name (Bone *bone, char *name, int select)
-{
-       Bone *curBone;
-
-       if (!strcmp (bone->name, name)){
-               if (select)
-                       bone->flag |= BONE_SELECTED;
-               else
-                       bone->flag &= ~(BONE_SELECTED|BONE_ACTIVE);
-               return 1;
-       }
-
-       for (curBone=bone->childbase.first; curBone; curBone=curBone->next){
-               if (select_bonechildren_by_name (curBone, name, select))
-                       return 1;
-       }
-
-       return 0;
-}
-
-/* called in editaction.c */
-void select_bone_by_name (bArmature *arm, char *name, int select)
-{
-       Bone *bone;
-       
-       if (!arm)
-               return;
-       
-       for (bone=arm->bonebase.first; bone; bone=bone->next)
-               if (select_bonechildren_by_name (bone, name, select))
-                       break;
-}
 
 static void selectconnected_posebonechildren (Object *ob, Bone *bone)
 {
@@ -2523,3 +2491,35 @@ EditBone *armature_bone_get_mirrored(EditBone *ebo)
        return eboflip;
 }
 
+/* if editbone (partial) selected, copy data */
+/* context; editmode armature, with mirror editing enabled */
+void transform_armature_mirror_update(void)
+{
+       EditBone *ebo, *eboflip;
+       
+       for (ebo=G.edbo.first; ebo; ebo=ebo->next) {
+               if(ebo->flag & (BONE_TIPSEL|BONE_ROOTSEL)) {
+                       
+                       eboflip= armature_bone_get_mirrored(ebo);
+                       
+                       if(eboflip) {
+                               /* we assume X-axis flipping for now */
+                               if(ebo->flag & BONE_TIPSEL) {
+                                       eboflip->tail[0]= -ebo->tail[0];
+                                       eboflip->tail[1]= ebo->tail[1];
+                                       eboflip->tail[2]= ebo->tail[2];
+                                       eboflip->rad_tail= ebo->rad_tail;
+                               }
+                               if(ebo->flag & BONE_ROOTSEL) {
+                                       eboflip->head[0]= -ebo->head[0];
+                                       eboflip->head[1]= ebo->head[1];
+                                       eboflip->head[2]= ebo->head[2];
+                                       eboflip->rad_head= ebo->rad_head;
+                               }
+                               if(ebo->flag & BONE_SELECTED)
+                                       eboflip->dist= ebo->dist;
+                       }
+               }
+       }
+}
+
index 1a6fff07a8d72c3ab03686c165c7167a66ca16c0..61115ba0e342a5971d81c3a31a06a274a474d2b1 100644 (file)
@@ -77,6 +77,7 @@ editmesh_mods.c, UI level access, no geometry changes
 #include "BIF_glutil.h"
 #include "BIF_graphics.h"
 #include "BIF_interface.h"
+#include "BIF_meshtools.h"
 #include "BIF_mywindow.h"
 #include "BIF_resources.h"
 #include "BIF_screen.h"
@@ -99,6 +100,36 @@ editmesh_mods.c, UI level access, no geometry changes
 #include "editmesh.h"
 
 
+/* ****************************** MIRROR **************** */
+
+static EditVert *get_x_mirror_vert(EditVert *eve)
+{
+       int index;
+       
+       index= mesh_get_x_mirror_vert(G.obedit, POINTER_TO_INT(eve));
+       if(index != -1)
+               return INT_TO_POINTER(index);
+       return NULL;
+}
+
+void EM_select_mirrored(void)
+{
+       if(G.scene->selectmode & SCE_SELECT_VERTEX) {
+               EditMesh *em = G.editMesh;
+               EditVert *eve, *v1;
+               
+               for(eve= em->verts.first; eve; eve= eve->next) {
+                       if(eve->f & SELECT) {
+                               v1= get_x_mirror_vert(eve);
+                               if(v1) {
+                                       eve->f &= ~SELECT;
+                                       v1->f |= SELECT;
+                               }
+                       }
+               }
+       }
+}
+
 /* ****************************** SELECTION ROUTINES **************** */
 
 unsigned int em_solidoffs=0, em_wireoffs=0, em_vertoffs=0;     // set in drawobject.c ... for colorindices
index d55df548bfb0c15e16b807be53e89e1fc21f5653..13163703f75b27c5241e8b8d51f733dd8409e1b3 100644 (file)
@@ -84,6 +84,8 @@ void sort_faces(void);
 #include "BDR_editobject.h" 
 #include "BDR_editface.h" 
 
+#include "BLI_editVert.h"
+
 #include "mydevice.h"
 #include "blendef.h"
 
@@ -644,28 +646,6 @@ static void mesh_octree_free_node(MocNode **bt)
        MEM_freeN(*bt);
 }
 
-static int mesh_octree_find_index(MocNode **bt, MVert *mvert, float *co)
-{
-       MVert *testvert;
-       int a;
-       
-       if(*bt==NULL)
-               return -1;
-       
-       for(a=0; a<MOC_NODE_RES; a++) {
-               if((*bt)->index[a]) {
-                       testvert= mvert+(*bt)->index[a]-1;
-                       
-                       if(FloatCompare(testvert->co, co, MOC_THRESH))
-                               return (*bt)->index[a]-1;
-               }
-               else return -1;
-       }
-       if( (*bt)->next)
-               return mesh_octree_find_index(&(*bt)->next, mvert, co);
-       
-       return -1;
-}
 
 /* temporal define, just to make nicer code below */
 #define MOC_ADDNODE(vx, vy, vz)        mesh_octree_add_node(basetable + ((vx)*MOC_RES*MOC_RES) + (vy)*MOC_RES + (vz), index)
@@ -711,6 +691,34 @@ static void mesh_octree_add_nodes(MocNode **basetable, float *co, float *offs, f
        
 }
 
+static int mesh_octree_find_index(MocNode **bt, MVert *mvert, float *co)
+{
+       float *vec;
+       int a;
+       
+       if(*bt==NULL)
+               return -1;
+       
+       for(a=0; a<MOC_NODE_RES; a++) {
+               if((*bt)->index[a]) {
+                       /* does mesh verts and editmode, code looks potential dangerous, octree should really be filled OK! */
+                       if(mvert)
+                               vec= (mvert+(*bt)->index[a]-1)->co;
+                       else
+                               vec= ((EditVert *)INT_TO_POINTER((*bt)->index[a]))->co;
+                       
+                       if(FloatCompare(vec, co, MOC_THRESH))
+                               return (*bt)->index[a]-1;
+               }
+               else return -1;
+       }
+       if( (*bt)->next)
+               return mesh_octree_find_index(&(*bt)->next, mvert, co);
+       
+       return -1;
+}
+
+
 /* mode is 's' start, or 'e' end, or 'u' use */
 /* if end, ob can be NULL */
 int mesh_octree_table(Object *ob, float *co, char mode)
@@ -718,20 +726,21 @@ int mesh_octree_table(Object *ob, float *co, char mode)
        MocNode **bt;
        static MocNode **basetable= NULL;
        static float offs[3], div[3];
-       int a;
        
        if(mode=='u') {         /* use table */
                if(basetable) {
                        Mesh *me= ob->data;
                        bt= basetable + mesh_octree_get_base_offs(co, offs, div);
-                       return mesh_octree_find_index(bt, me->mvert, co);
+                       if(ob==G.obedit)
+                               return mesh_octree_find_index(bt, NULL, co);
+                       else
+                               return mesh_octree_find_index(bt, me->mvert, co);
                }
                return -1;
        }
        else if(mode=='s') {    /* start table */
                Mesh *me= ob->data;
                BoundBox *bb = mesh_get_bb(me);
-               MVert *mvert;
                
                /* for quick unit coordinate calculus */
                VECCOPY(offs, bb->vec[0]);
@@ -746,12 +755,26 @@ int mesh_octree_table(Object *ob, float *co, char mode)
                
                basetable= MEM_callocN(MOC_RES*MOC_RES*MOC_RES*sizeof(void *), "sym table");
                
-               for(a=1, mvert= me->mvert; a<=me->totvert; a++, mvert++) {
-                       mesh_octree_add_nodes(basetable, mvert->co, offs, div, a);
+               if(ob==G.obedit) {
+                       EditVert *eve;
+                       
+                       for(eve= G.editMesh->verts.first; eve; eve= eve->next) {
+                               mesh_octree_add_nodes(basetable, eve->co, offs, div, POINTER_TO_INT(eve));
+                       }
+               }
+               else {          
+                       MVert *mvert;
+                       int a;
+                       
+                       for(a=1, mvert= me->mvert; a<=me->totvert; a++, mvert++) {
+                               mesh_octree_add_nodes(basetable, mvert->co, offs, div, a);
+                       }
                }
        }
        else if(mode=='e') { /* end table */
                if(basetable) {
+                       int a;
+                       
                        for(a=0, bt=basetable; a<MOC_RES*MOC_RES*MOC_RES; a++, bt++) {
                                if(*bt) mesh_octree_free_node(bt);
                        }
index 499c55b688d20dae7bd8917358baa4ab2b27df5d..8d3d776eb91e5bbd88f9e2272fff6fc4fbb0b039 100644 (file)
@@ -540,20 +540,20 @@ void paste_posebuf (int flip)
                                        ID *id= &ob->id;
                                        /* Set keys on pose */
                                        if (chan->flag & POSE_ROT){
-                                               insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_X);
-                                               insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_Y);
-                                               insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_Z);
-                                               insertkey(id, ID_AC, chan->name, NULL, AC_QUAT_W);
+                                               insertkey(id, ID_PO, chan->name, NULL, AC_QUAT_X);
+                                               insertkey(id, ID_PO, chan->name, NULL, AC_QUAT_Y);
+                                               insertkey(id, ID_PO, chan->name, NULL, AC_QUAT_Z);
+                                               insertkey(id, ID_PO, chan->name, NULL, AC_QUAT_W);
                                        }
                                        if (chan->flag & POSE_SIZE){
-                                               insertkey(id, ID_AC, chan->name, NULL, AC_SIZE_X);
-                                               insertkey(id, ID_AC, chan->name, NULL, AC_SIZE_Y);
-                                               insertkey(id, ID_AC, chan->name, NULL, AC_SIZE_Z);
+                                               insertkey(id, ID_PO, chan->name, NULL, AC_SIZE_X);
+                                               insertkey(id, ID_PO, chan->name, NULL, AC_SIZE_Y);
+                                               insertkey(id, ID_PO, chan->name, NULL, AC_SIZE_Z);
                                        }
                                        if (chan->flag & POSE_LOC){
-                                               insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_X);
-                                               insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_Y);
-                                               insertkey(id, ID_AC, pchan->name, NULL, AC_LOC_Z);
+                                               insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_X);
+                                               insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Y);
+                                               insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Z);
                                        }
                                }
                        }
index f50addf9aae063ef1d2df0cd321514f1ed4e7379..3abc2a45cff1fcb5ca5cdb12ba22023c6540d773 100755 (executable)
@@ -1618,11 +1618,10 @@ void special_aftertrans_update(TransInfo *t)
                ob= t->poseobj;
                arm= ob->data;
                
-               ob->pose->flag &= ~POSE_LOCKED;
+               /* this signal does one recalc on pose, then unlocks, so ESC or edit will work */
+               ob->pose->flag |= POSE_DO_UNLOCK;
                
-               if(cancelled)   /* if cancelled we do the update always */
-                       DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
-               else if(G.flags & G_RECORDKEYS) {
+               if(G.flags & G_RECORDKEYS) {
                        act= ob->action;
                        pose= ob->pose;
                        
@@ -1661,7 +1660,8 @@ void special_aftertrans_update(TransInfo *t)
                        DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                        ob->recalc= 0;  // is set on OK position already by recalcData()
                }
-               /* do not call DAG_object_flush_update always, we dont want actions to update, for inserting keys */
+               else 
+                       DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                
                if(t->mode==TFM_BONESIZE || t->mode==TFM_BONE_ENVELOPE)
                        allqueue(REDRAWBUTSEDIT, 0);
index 9ad394a3d601b217a06f3eebfbff590669b1bd8f..2173628a11b476dcba6945449af676eaa33c8e55 100755 (executable)
@@ -122,39 +122,6 @@ void getViewVector(float coord[3], float vec[3])
 
 /* ************************** GENERICS **************************** */
 
-/* if editbone (partial) selected, copy data */
-/* context; editmode armature, with mirror editing enabled */
-static void transform_armature_mirror_update(void)
-{
-       EditBone *ebo, *eboflip;
-       
-       for (ebo=G.edbo.first; ebo; ebo=ebo->next) {
-               if(ebo->flag & (BONE_TIPSEL|BONE_ROOTSEL)) {
-                       
-                       eboflip= armature_bone_get_mirrored(ebo);
-                       
-                       if(eboflip) {
-                               /* we assume X-axis flipping for now */
-                               if(ebo->flag & BONE_TIPSEL) {
-                                       eboflip->tail[0]= -ebo->tail[0];
-                                       eboflip->tail[1]= ebo->tail[1];
-                                       eboflip->tail[2]= ebo->tail[2];
-                                       eboflip->rad_tail= ebo->rad_tail;
-                               }
-                               if(ebo->flag & BONE_ROOTSEL) {
-                                       eboflip->head[0]= -ebo->head[0];
-                                       eboflip->head[1]= ebo->head[1];
-                                       eboflip->head[2]= ebo->head[2];
-                                       eboflip->rad_head= ebo->rad_head;
-                               }
-                               if(ebo->flag & BONE_SELECTED)
-                                       eboflip->dist= ebo->dist;
-                       }
-               }
-       }
-}
-
-
 /* called for objects updating while transform acts, once per redraw */
 void recalcData(TransInfo *t)
 {