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
path: root/source
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-01-14 19:08:22 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-14 19:30:07 +0300
commita560a46f32f6d0e9862bb30dab05296cee98b05b (patch)
treea81e613a7ce1e575bfe6fc7fefe624a7681c9d71 /source
parentd51dcaf1041d2bda093b1a6bc688fd4237da0e61 (diff)
Fix T72625: Outliner visibility keying doesn't carry over from 2.79b
During development of Blender 2.80 the `Object.hide` property was removed, and later reintroduced in rB5e968a996a53 as `Object.hide_viewport`. Of course there are some technical details missing in this summary, but this is the view that's given in the 2.80 release notes. FCurves on `Object.hide` weren't updated in versioning code, resulting in the property no longer being animated. This commit corrects the RNA path of such FCurves.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index ee4e62f19d1..4443c4bb4ad 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1091,6 +1091,18 @@ static void do_version_curvemapping_walker(Main *bmain, void (*callback)(CurveMa
}
}
+static void do_version_fcurve_hide_viewport_fix(struct ID *UNUSED(id),
+ struct FCurve *fcu,
+ void *UNUSED(user_data))
+{
+ if (strcmp(fcu->rna_path, "hide")) {
+ return;
+ }
+
+ MEM_freeN(fcu->rna_path);
+ fcu->rna_path = BLI_strdupn("hide_viewport", 13);
+}
+
void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
{
bool use_collection_compat_28 = true;
@@ -1524,6 +1536,14 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
}
}
}
+
+ {
+ /* During development of Blender 2.80 the "Object.hide" property was
+ * removed, and reintroduced in 5e968a996a53 as "Object.hide_viewport". */
+ LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+ BKE_fcurves_id_cb(&ob->id, do_version_fcurve_hide_viewport_fix, NULL);
+ }
+ }
}
/* NOTE: This version patch is intended for versions < 2.52.2,