diff options
author | Dalai Felinto <dalai@blender.org> | 2020-10-15 13:02:56 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2020-10-15 20:59:58 +0300 |
commit | c866075dfbd90888705ad5cd68b25d8605febb4a (patch) | |
tree | c2cf75c07a285f7533b7a84aa174daeecebe11c3 /source/blender/blenkernel/intern/anim_data.c | |
parent | ca55a1b564a6ff32784d7c611b4728be400637e8 (diff) |
Fix T81580: No doversion for Emission Strength
The new parameter made so that previously keyed Alpha values were lost
and instead the new "Emission Strength" was keyed.
Issue introduced with the original commit of Emission Strength: b248ec97769f
Note: Files created since the issue (September 17) that keyframed the
Emission Strength will have to fix their files manually.
Differential Revision: https://developer.blender.org/D9221
Diffstat (limited to 'source/blender/blenkernel/intern/anim_data.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim_data.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c index 4e24fc27be7..a85509b11db 100644 --- a/source/blender/blenkernel/intern/anim_data.c +++ b/source/blender/blenkernel/intern/anim_data.c @@ -1406,13 +1406,30 @@ void BKE_animdata_main_cb(Main *bmain, ID_AnimData_Edit_Callback func, void *use * NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]> * i.e. pose.bones["Bone"] */ -/* TODO: use BKE_animdata_main_cb for looping over all data */ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const char *oldName, const char *newName) { Main *bmain = G.main; /* XXX UGLY! */ + BKE_animdata_fix_paths_rename_all_ex(bmain, ref_id, prefix, oldName, newName, 0, 0, 1); +} + +/* Fix all RNA-Paths throughout the database + * NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]> + * i.e. pose.bones["Bone"] + */ +/* TODO: use BKE_animdata_main_cb for looping over all data */ +void BKE_animdata_fix_paths_rename_all_ex(Main *bmain, + ID *ref_id, + const char *prefix, + const char *oldName, + const char *newName, + const int oldSubscript, + const int newSubscript, + const bool verify_paths) +{ + ID *id; /* macro for less typing @@ -1422,7 +1439,8 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, #define RENAMEFIX_ANIM_IDS(first) \ for (id = first; id; id = id->next) { \ AnimData *adt = BKE_animdata_from_id(id); \ - BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1); \ + BKE_animdata_fix_paths_rename( \ + id, adt, ref_id, prefix, oldName, newName, oldSubscript, newSubscript, verify_paths); \ } \ (void)0 @@ -1433,10 +1451,18 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, NtId_Type *ntp = (NtId_Type *)id; \ if (ntp->nodetree) { \ AnimData *adt2 = BKE_animdata_from_id((ID *)ntp->nodetree); \ - BKE_animdata_fix_paths_rename( \ - (ID *)ntp->nodetree, adt2, ref_id, prefix, oldName, newName, 0, 0, 1); \ + BKE_animdata_fix_paths_rename((ID *)ntp->nodetree, \ + adt2, \ + ref_id, \ + prefix, \ + oldName, \ + newName, \ + oldSubscript, \ + newSubscript, \ + verify_paths); \ } \ - BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1); \ + BKE_animdata_fix_paths_rename( \ + id, adt, ref_id, prefix, oldName, newName, oldSubscript, newSubscript, verify_paths); \ } \ (void)0 |