[Bf-blender-cvs] [56acbca] alembic_pointcache: Removed the now redundant "Read" toggle from cache libraries.
Lukas Tönne
noreply at git.blender.org
Tue Mar 17 17:06:11 CET 2015
Commit: 56acbcaa0e5edd5ea0e9094253de982836989051
Author: Lukas Tönne
Date: Tue Mar 17 17:05:07 2015 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB56acbcaa0e5edd5ea0e9094253de982836989051
Removed the now redundant "Read" toggle from cache libraries.
At this point the reading is toggled on the side of group duplicators.
===================================================================
M release/scripts/startup/bl_ui/properties_scene.py
M source/blender/blenkernel/intern/cache_library.c
M source/blender/blenloader/intern/readfile.c
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/io/io_cache_library.c
M source/blender/makesdna/DNA_cache_library_types.h
M source/blender/makesrna/intern/rna_cache_library.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 10caebc..a2e389b 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -498,9 +498,7 @@ class SCENE_PT_cache_manager(SceneButtonsPanel, Panel):
props.use_clipboard = True
col.prop(cachelib, "filepath", text="")
- colrow = col.row(align=True)
- colrow.prop(cachelib, "read", text="Read", toggle=True)
- colrow.operator("cachelibrary.bake")
+ col.operator("cachelibrary.bake")
col.prop(cachelib, "eval_mode", expand=False)
row = layout.row(align=True)
diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index 57d4e96..db7bc79 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 99da1d2..caf35d5 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2008,9 +2008,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 c533c13..9494cf3 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -3770,14 +3770,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 28f2fc9..bf5a743 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 725dc23..8923112 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 caaa87b..cb7be77 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");
More information about the Bf-blender-cvs
mailing list