From 0a374e667999e7cbb4fa465f256bda89dce87d03 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 2 Oct 2009 11:15:24 +0000 Subject: [PATCH] Anim Bugfixes: * 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 | 7 ++++++- source/blender/editors/space_graph/graph_utils.c | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 87868eff812..7be763eae9d 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -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; diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 25087441b6a..ee4e371e1f1 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -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; } /* ************************************************************** */