Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-04-01 10:26:41 +0400
committerJoshua Leung <aligorith@gmail.com>2010-04-01 10:26:41 +0400
commitc46a955ee0e13d812780f8afe78a6a9c34bb84fa (patch)
tree30d4dbcfc9eb107c71235087151ed1dd56b4306b /source/blender/editors
parentceebd182ed2e3310d6b65fa73574b941156aa1b0 (diff)
Assorted animsys fixes/tweaks:
* Fixed all the dangerous code added in 27907. Using the code there, scripters could corrupt animation files in ways which would render them useless, with channels not appearing in any animation editors, and others not getting evaluated at all. * Partial fix of bug 21818, by disabling destructive replacement of keyframes. Will followup this commit with a more comprehensive commit which gets rid of the rest of the problems, by incorporating some requests from Durian team. * Fixed problems with users being able to see+edit the name of the active Keying Set in the Scene buttons. There is still a bug though with the list widget given how the indices are now interpreted...
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/keyframing.c15
-rw-r--r--source/blender/editors/space_nla/nla_edit.c12
2 files changed, 6 insertions, 21 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 8a238566563..55001107715 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -176,16 +176,8 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[],
grp= action_groups_find_named(act, group);
/* no matching groups, so add one */
- if (grp == NULL) {
- /* Add a new group, and make it active */
- grp= MEM_callocN(sizeof(bActionGroup), "bActionGroup");
-
- grp->flag = AGRP_SELECTED;
- strncpy(grp->name, group, sizeof(grp->name));
-
- BLI_addtail(&act->groups, grp);
- BLI_uniquename(&act->groups, grp, "Group", '.', offsetof(bActionGroup, name), sizeof(grp->name));
- }
+ if (grp == NULL)
+ grp= action_groups_add_new(act, group);
/* add F-Curve to group */
action_groups_add_channel(act, grp, fcu);
@@ -226,7 +218,8 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
/* sanity check: 'i' may in rare cases exceed arraylen */
if ((i >= 0) && (i < fcu->totvert)) {
/* take care with the handletypes and other info if the replacement flags are set */
- if (flag & INSERTKEY_REPLACE) {
+ // NOTE: for now, always do non-destructive replace... if everybody likes this, just keep it as default
+ if (1/*flag & INSERTKEY_REPLACE*/) {
BezTriple *dst= (fcu->bezt + i);
float dy= bezt->vec[1][1] - dst->vec[1][1];
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 37961ea4f03..706dcf49c4f 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -903,6 +903,7 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *op)
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
+ int flag = 0;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -914,16 +915,7 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *op)
/* for each AnimData block, bake strips to animdata... */
for (ale= anim_data.first; ale; ale= ale->next) {
- AnimData *adt = (AnimData *)ale->data;
-
- /* if animdata currently has an action, 'push down' this onto the stack first */
- BKE_nla_action_pushdown(adt);
-
- /* temporarily mute the action, and start keying to it */
-
- /* start keying... */
-
- /* unmute the action */
+ //BKE_nla_bake(ac.scene, ale->id, ale->data, flag);
}
/* free temp data */