Point Cache: allow baking external smoke caches. This needs to be cleaned up
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 28 Apr 2012 09:00:11 +0000 (09:00 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 28 Apr 2012 09:00:11 +0000 (09:00 +0000)
a bit, I couldn't fully understand how the External setting is supposed to
work to make further changes, but this should make it work at least.

release/scripts/startup/bl_ui/properties_physics_common.py

index f623d9a37ebf95690f771a051c0207d65c9cdee7..4db056e77a2481e1844513bc67fae3293a0d373b 100644 (file)
@@ -94,18 +94,25 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
     if cachetype in {'PSYS', 'HAIR', 'SMOKE'}:
         row.prop(cache, "use_external")
 
-    if cache.use_external:
-        split = layout.split(percentage=0.80)
-        split.prop(cache, "name", text="File Name")
-        split.prop(cache, "index", text="")
-
-        row = layout.row()
-        row.label(text="File Path:")
-        row.prop(cache, "use_library_path", "Use Lib Path")
+        if cachetype == 'SMOKE':
+            row.prop(cache, "use_library_path", "Use Lib Path")
 
-        layout.prop(cache, "filepath", text="")
+    if cache.use_external:
+        split = layout.split(percentage=0.35)
+        col = split.column()
+        col.label(text="File Name:")
+        if cache.use_external:
+            col.label(text="File Path:")
 
-        layout.label(text=cache.info)
+        col = split.column()
+        sub = col.split(percentage=0.70, align=True)
+        sub.prop(cache, "name", text="")
+        sub.prop(cache, "index", text="")
+        col.prop(cache, "filepath", text="")
+
+        cache_info = cache.info
+        if cache_info:
+            layout.label(text=cache_info)
     else:
         if cachetype in {'SMOKE', 'DYNAMIC_PAINT'}:
             if not bpy.data.is_saved:
@@ -117,6 +124,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
         else:
             layout.prop(cache, "name", text="Cache Name")
 
+    if not cache.use_external or cachetype == 'SMOKE':
         row = layout.row(align=True)
 
         if cachetype not in {'PSYS', 'DYNAMIC_PAINT'}: