Revision: 16930
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16930
Author:   aligorith
Date:     2008-10-05 12:48:07 +0200 (Sun, 05 Oct 2008)

Log Message:
-----------
Bugfix:

Reordering Grease-Pencil frames in the Action Editor after transforms was not 
working at all. Seems I forgot to fix this part after changing what the 'Grease 
Pencil' editing mode in Action Editor showed.

Modified Paths:
--------------
    trunk/blender/source/blender/src/transform_conversions.c

Modified: trunk/blender/source/blender/src/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/src/transform_conversions.c    2008-10-05 
09:44:46 UTC (rev 16929)
+++ trunk/blender/source/blender/src/transform_conversions.c    2008-10-05 
10:48:07 UTC (rev 16930)
@@ -2518,6 +2518,7 @@
                 * (these need to be sorted as they are isolated)
                 */
                for (gpf= gpl->frames.first; gpf; gpf= gpfn) {
+                       short added= 0;
                        gpfn= gpf->next;
                        
                        if (gpf->flag & GP_FRAME_SELECT) {
@@ -2531,10 +2532,11 @@
                                        /* if current (gpf) occurs after this 
one in buffer, add! */
                                        if (gfs->framenum < gpf->framenum) {
                                                
BLI_insertlinkafter(&sel_buffer, gfs, gpf);
+                                               added= 1;
                                                break;
                                        }
                                }
-                               if (gfs == NULL)
+                               if (added == 0)
                                        BLI_addhead(&sel_buffer, gpf);
                        }
                }
@@ -2552,12 +2554,9 @@
                }
                
                /* loop 2: remove duplicates of frames in buffers */
-               //gfs= sel_buffer.first;
-               //gfsn= gfs->next;
-               
                for (gpf= gpl->frames.first; gpf && sel_buffer.first; gpf= 
gpfn) {
                        gpfn= gpf->next;
-                        
+                       
                        /* loop through sel_buffer, emptying stuff from front 
of buffer if ok */
                        for (gfs= sel_buffer.first; gfs && gpf; gfs= gfsn) {
                                gfsn= gfs->next;
@@ -3899,7 +3898,17 @@
                        /* remove duplicate frames and also make sure points 
are in order! */
                        if ((cancelled == 0) || (duplicate))
                        {
-                               posttrans_gpd_clean(data);
+                               ScrArea *sa;
+                               
+                               /* BAD... we need to loop over all screen areas 
for current screen...
+                                *      - sync this with 
actdata_filter_gpencil() in editaction.c 
+                                */
+                               for (sa= G.curscreen->areabase.first; sa; sa= 
sa->next) {
+                                       bGPdata *gpd= 
gpencil_data_getactive(sa);
+                                       
+                                       if (gpd) 
+                                               posttrans_gpd_clean(gpd);
+                               }
                        }
                }
                


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to