Anim Bugfixes:
authorJoshua Leung <aligorith@gmail.com>
Fri, 2 Oct 2009 11:15:24 +0000 (11:15 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 2 Oct 2009 11:15:24 +0000 (11:15 +0000)
* Add F-Modifiers (for Graph Editor) was using a buggy poll() method. Silly typo.
* Bone groups now get duplicated when duplicating an armature object

source/blender/blenkernel/intern/action.c
source/blender/editors/space_graph/graph_utils.c

index 87868eff8124b7328b779fd0ee57faea88949514..7be763eae9d947c2c2df608eca434c9ae8b3cbff 100644 (file)
@@ -511,16 +511,21 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
        outPose= MEM_callocN(sizeof(bPose), "pose");
        
        BLI_duplicatelist(&outPose->chanbase, &src->chanbase);
+       
        outPose->iksolver = src->iksolver;
        outPose->ikdata = NULL;
        outPose->ikparam = MEM_dupallocN(src->ikparam);
-
+       
+       // TODO: rename this argument...
        if (copycon) {
                for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) {
                        copy_constraints(&listb, &pchan->constraints);  // copy_constraints NULLs listb
                        pchan->constraints= listb;
                        pchan->path= NULL;
                }
+               
+               /* for now, duplicate Bone Groups too when doing this */
+               BLI_duplicatelist(&outPose->agroups, &src->agroups);
        }
        
        *dst=outPose;
index 25087441b6a4b55dd203deb8209bf74e2acad5e8..ee4e371e1f13e38ab3d371ec34f3d86e655f2479 100644 (file)
@@ -292,7 +292,6 @@ int graphop_selected_fcurve_poll (bContext *C)
        ListBase anim_data = {NULL, NULL};
        ScrArea *sa= CTX_wm_area(C);
        int filter, items;
-       short found = 0;
        
        /* firstly, check if in Graph Editor */
        // TODO: also check for region?
@@ -311,7 +310,7 @@ int graphop_selected_fcurve_poll (bContext *C)
        
        /* cleanup and return findings */
        BLI_freelistN(&anim_data);
-       return found;
+       return 1;
 }
 
 /* ************************************************************** */