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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-06-02 14:05:11 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-06-02 14:05:11 +0300
commit33d6e6ed42f3a092355211bc92e84d91d1fcc413 (patch)
treee2b14086b7bdb873dc11a99c068ff40c29d56680 /source/blender/blenkernel
parentf9ec2e706e652d5af5af15883c13122816ba29ad (diff)
Display basic metadata of a cache archive in the cache library input
settings.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/cache_library.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index 1a1672c3e4c..37cc45d7f9e 100644
--- a/source/blender/blenkernel/intern/cache_library.c
+++ b/source/blender/blenkernel/intern/cache_library.c
@@ -371,6 +371,15 @@ static struct PTCReaderArchive *find_active_cache(Scene *scene, CacheLibrary *ca
archive = PTC_open_reader_archive(scene, filename);
}
+ /* get basic archive info */
+ if (cachelib->archive_info)
+ BKE_cache_archive_info_clear(cachelib->archive_info);
+ else
+ cachelib->archive_info = BKE_cache_archive_info_new();
+ BLI_strncpy(cachelib->archive_info->filepath, filename, sizeof(cachelib->archive_info->filepath));
+ if (archive)
+ PTC_get_archive_info(archive, cachelib->archive_info);
+
return archive;
}
@@ -2166,6 +2175,11 @@ void BKE_cache_archive_info_free(CacheArchiveInfo *info)
void BKE_cache_archive_info_clear(CacheArchiveInfo *info)
{
+ info->filepath[0] = '\0';
+ info->app_name[0] = '\0';
+ info->date_written[0] = '\0';
+ info->description[0] = '\0';
+
if (info->root_node) {
cache_archive_info_node_free(info->root_node);
info->root_node = NULL;