diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-03-31 11:33:33 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-03-31 11:33:33 +0300 |
commit | fc1d50f1e7eeeb5fbcb75d1c9c60027374effb23 (patch) | |
tree | 524a8db9e36729e09e621a00d02c079c5aa1370f /release | |
parent | b1a8b9806b6ab7b4087fa0870158663584c65815 (diff) |
Reorganization of file paths and input/output workflow in cache
libraries.
Having a cache archive output in each modifier is not really practical.
Now the cache library has at most 2 file paths. These are used based on
2 associated settings: source mode/path and display mode/path.
* The SOURCE mode determines whether the original scene data is used as
input or a cache archive. If the scene input is used the dupli group
objects will be evaluated as usual with Mesh data, modifiers, proxy
armatures, etc.. With cache input the data stored in a cache is used to
override the scene data instead.
* The DISPLAY mode is essentially a toggle for the whole cache modifier
stack. If it is set to 'source' the respective source data is used
without further modification. If set to 'result' the data from the
output cache archive is used, which can be generated using the bake
operator. During baking the data will be passed through the cache
modifiers to create a variation of the original source data.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_object.py | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 4830f52d0c3..b767492a002 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -319,31 +319,41 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel): row.prop(md, "name", text="") row.operator("cachelibrary.remove_modifier", icon='X', text="", emboss=False) - col = layout.column(align=True) - col.prop(md, "filepath") - col.operator("cachelibrary.bake", text="Bake") - # match enum type to our functions, avoids a lookup table. getattr(self, md.type)(layout, cachelib, md) def draw_cachelib(self, context, layout, ob, cachelib, objects): - col = layout.column(align=True) - colrow = col.row(align=True) - colrow.label("Archive:") - props = colrow.operator("cachelibrary.archive_info", text="", icon='QUESTION') + col = layout.column() + row = col.row() + row.label("Source:") + row.prop(cachelib, "source_mode", text="Source", expand=True) + row = col.row(align=True) + row.enabled = (cachelib.source_mode == 'CACHE') + row.prop(cachelib, "input_filepath", text="") + props = row.operator("cachelibrary.archive_info", text="", icon='QUESTION') + props.filepath = cachelib.input_filepath props.use_stdout = True props.use_popup = True props.use_clipboard = True - col.prop(cachelib, "filepath", text="") + layout.separator() + + col = layout.column() + row = col.row() + row.label("Display:") + row.prop(cachelib, "display_mode", expand=True) row = col.row(align=True) - row.prop(ob, "use_dupli_cache_read", text="Read", toggle=True) - row.prop(ob, "use_dupli_cache_write", text="Write", toggle=True) + row.enabled = (cachelib.display_mode == 'RESULT') + row.prop(cachelib, "output_filepath", text="") + props = row.operator("cachelibrary.archive_info", text="", icon='QUESTION') + props.filepath = cachelib.output_filepath + props.use_stdout = True + props.use_popup = True + props.use_clipboard = True + col.operator("cachelibrary.bake") - row = col.row() - row.prop(cachelib, "eval_mode", toggle=True, expand=True) - row = col.row() - row.prop(cachelib, "data_types", icon_only=True, toggle=True) + col.row().prop(cachelib, "eval_mode", toggle=True, expand=True) + col.row().prop(cachelib, "data_types", icon_only=True, toggle=True) row = layout.row(align=True) row.label("Filter:") |