soc-2008-mxcurioni: merged changes to revision 15705
[blender.git] / source / blender / src / transform_generics.c
index 6cb7a34d1bc9626c6f483467e7dfbfc863a45e8e..c332fd723ebd7b499d66b00fbaecd81d9e2c8f30 100644 (file)
@@ -278,6 +278,11 @@ void recalcData(TransInfo *t)
                data = get_action_context(&context);
                if (data == NULL) return;
                
+               /* always flush data if gpencil context */
+               if (context == ACTCONT_GPENCIL) {
+                       flushTransGPactionData(t);
+               }
+               
                if (G.saction->lock) {
                        if (context == ACTCONT_ACTION) {
                                if(ob) {
@@ -753,6 +758,10 @@ void postTrans (TransInfo *t)
                if (G.sima->flag & SI_LIVE_UNWRAP)
                        unwrap_lscm_live_end(t->state == TRANS_CANCEL);
        }
+       else if(t->spacetype==SPACE_ACTION) {
+               if (t->customData)
+                       MEM_freeN(t->customData);
+       }
 }
 
 void applyTransObjects(TransInfo *t)