diff options
-rw-r--r-- | release/scripts/modules/animsys_refactor.py | 9 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/release/scripts/modules/animsys_refactor.py b/release/scripts/modules/animsys_refactor.py index 464df870e87..7a83a1434c5 100644 --- a/release/scripts/modules/animsys_refactor.py +++ b/release/scripts/modules/animsys_refactor.py @@ -170,6 +170,15 @@ def update_data_paths(rna_update): continue for fcurve in anim_data.drivers: + data_path = fcurve.data_path + data_path_new = find_path_new(anim_data_base, data_path, rna_update_dict, rna_update_from_map) + # print(data_path_new) + if data_path_new != data_path: + if not IS_TESTING: + fcurve.data_path = data_path_new + fcurve.driver.is_valid = True; # reset to allow this to work again + print("driver-fcurve (%s): %s -> %s" % (id_data.name, data_path, data_path_new)) + for var in fcurve.driver.variables: if var.type == 'SINGLE_PROP': for tar in var.targets: diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index ad88ece1154..0845014c99e 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1687,7 +1687,16 @@ static int animchannels_enable_exec (bContext *C, wmOperator *UNUSED(op)) /* loop through filtered data and clean curves */ for (ale= anim_data.first; ale; ale= ale->next) { FCurve *fcu = (FCurve *)ale->data; + + /* remove disabled flags from F-Curves */ fcu->flag &= ~FCURVE_DISABLED; + + /* for drivers, let's do the same too */ + if (fcu->driver) + fcu->driver->flag &= ~DRIVER_FLAG_INVALID; + + /* tag everything for updates - in particular, this is needed to get drivers working again */ + ANIM_list_elem_update(ac.scene, ale); } /* free temp data */ |