From 7beca3d142853a0d24ab878d5f3b40d62e75f76d Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 26 Mar 2011 23:42:51 +0000 Subject: Bugfixes due to recent RNA renaming: * Driver F-Curves were not getting fixed by the "FCurve/Driver Version Fix" tool. This was causing problems such as shapekey drivers from older (2.56 compatible rigs) failing to run. As well as renaming the paths for these Driver F-Curves, the "disabled" flags also get cleared from these drivers so that they can be run again * "Revive Disabled F-Curves" operator in Animation Editors can now be used to revive disabled drivers too. --- release/scripts/modules/animsys_refactor.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'release/scripts') 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: -- cgit v1.2.3