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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-03-17 19:05:07 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-03-26 16:13:38 +0300
commit4950ea97dc75c7b11d0e482fdf6bbde2e29c5f68 (patch)
treede70d0598cc5218eeb34863a25644d072e053a98 /source
parent4f91f81e0245a92f37e2024136278b57404b00c6 (diff)
Removed the now redundant "Read" toggle from cache libraries.
At this point the reading is toggled on the side of group duplicators.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/cache_library.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c3
-rw-r--r--source/blender/editors/interface/interface_templates.c14
-rw-r--r--source/blender/editors/io/io_cache_library.c6
-rw-r--r--source/blender/makesdna/DNA_cache_library_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_cache_library.c5
6 files changed, 12 insertions, 23 deletions
diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index 57d4e96fb56..db7bc79d100 100644
--- a/source/blender/blenkernel/intern/cache_library.c
+++ b/source/blender/blenkernel/intern/cache_library.c
@@ -655,8 +655,6 @@ void BKE_cache_archive_path(const char *path, ID *id, Library *lib, char *result
static CacheLibrary *cachelib_skip_read(CacheLibrary *cachelib, eCacheLibrary_EvalMode eval_mode)
{
for (; cachelib; cachelib = cachelib->id.next) {
- if (!(cachelib->flag & CACHE_LIBRARY_READ))
- continue;
if (cachelib->eval_mode != eval_mode)
continue;
break;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 0443c8c144c..96a1073c46d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2007,9 +2007,6 @@ static void direct_link_cache_library(FileData *fd, CacheLibrary *cachelib)
{
link_list(fd, &cachelib->items);
cachelib->items_hash = NULL;
-
- if (cachelib->id.flag & (LIB_EXTERN | LIB_INDIRECT))
- cachelib->flag |= CACHE_LIBRARY_READ;
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 3b877567981..90485ffbc74 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -3767,14 +3767,12 @@ uiLayout *uiTemplateCacheLibraryItem(uiLayout *layout, bContext *C, CacheLibrary
uiItemL(split, name, icon);
/* display read result */
- if (cachelib->flag & CACHE_LIBRARY_READ) {
- split = uiLayoutSplit(row, 0.9f, false);
- if (item && (item->flag & CACHE_ITEM_ENABLED))
- RNA_enum_icon_from_value(cache_library_read_result_items, item->read_result, &icon);
- else
- icon = ICON_NONE;
- uiItemL(split, NULL, icon);
- }
+ split = uiLayoutSplit(row, 0.9f, false);
+ if (item && (item->flag & CACHE_ITEM_ENABLED))
+ RNA_enum_icon_from_value(cache_library_read_result_items, item->read_result, &icon);
+ else
+ icon = ICON_NONE;
+ uiItemL(split, NULL, icon);
return sub;
}
diff --git a/source/blender/editors/io/io_cache_library.c b/source/blender/editors/io/io_cache_library.c
index 28f2fc9b218..bf5a743f31a 100644
--- a/source/blender/editors/io/io_cache_library.c
+++ b/source/blender/editors/io/io_cache_library.c
@@ -275,8 +275,9 @@ static void cache_library_bake_startjob(void *customdata, short *stop, short *do
else {
data->eval_ctx.mode = DAG_EVAL_RENDER;
}
+ // TODO
/* disable reading for the duration of the bake process */
- data->cachelib->flag &= ~CACHE_LIBRARY_READ;
+// data->cachelib->flag |= CACHE_LIBRARY_BAKING;
BKE_cache_archive_path(data->cachelib->filepath, (ID *)data->cachelib, data->cachelib->id.lib, filename, sizeof(filename));
data->archive = PTC_open_writer_archive(scene, filename);
@@ -308,8 +309,9 @@ static void cache_library_bake_endjob(void *customdata)
if (data->archive)
PTC_close_writer_archive(data->archive);
+ // TODO
/* enable reading */
- data->cachelib->flag |= CACHE_LIBRARY_READ;
+// data->cachelib->flag &= ~CACHE_LIBRARY_BAKING;
/* reset scene frame */
scene->r.cfra = data->origfra;
diff --git a/source/blender/makesdna/DNA_cache_library_types.h b/source/blender/makesdna/DNA_cache_library_types.h
index 725dc23bfae..89231129253 100644
--- a/source/blender/makesdna/DNA_cache_library_types.h
+++ b/source/blender/makesdna/DNA_cache_library_types.h
@@ -84,9 +84,8 @@ typedef struct CacheLibrary {
struct GHash *items_hash; /* runtime: cached items hash for fast lookup */
} CacheLibrary;
-typedef enum eCacheLibrary_Flag {
- CACHE_LIBRARY_READ = 1, /* read data from this cache library */
-} eCacheLibrary_Flag;
+//typedef enum eCacheLibrary_Flag {
+//} eCacheLibrary_Flag;
typedef enum eCacheLibrary_EvalMode {
CACHE_LIBRARY_EVAL_VIEWPORT = 0, /* evaluate data with viewport settings */
diff --git a/source/blender/makesrna/intern/rna_cache_library.c b/source/blender/makesrna/intern/rna_cache_library.c
index caaa87bba45..cb7be770604 100644
--- a/source/blender/makesrna/intern/rna_cache_library.c
+++ b/source/blender/makesrna/intern/rna_cache_library.c
@@ -304,11 +304,6 @@ static void rna_def_cache_library(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Cache Library", "Cache Library datablock for constructing an archive of caches");
RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
- prop = RNA_def_property(srna, "read", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CACHE_LIBRARY_READ);
- RNA_def_property_ui_text(prop, "Read", "Apply stored data from this cache library");
- RNA_def_property_update(prop, 0, "rna_CacheLibrary_update");
-
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "filepath");
RNA_def_property_ui_text(prop, "File Path", "Path to cache library storage");