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:
Diffstat (limited to 'release/scripts/ui/properties_physics_common.py')
-rw-r--r--release/scripts/ui/properties_physics_common.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py
index 025a16894a9..20073c68989 100644
--- a/release/scripts/ui/properties_physics_common.py
+++ b/release/scripts/ui/properties_physics_common.py
@@ -20,6 +20,7 @@
narrowui = 180
+import bpy
def point_cache_ui(self, context, cache, enabled, particles, smoke):
layout = self.layout
@@ -48,12 +49,11 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke):
layout.label(text=cache.info)
else:
layout.prop(cache, "name", text="File Name")
-
+
split = layout.split()
col = split.column(align=True)
-
+
if not particles:
-
col.enabled = enabled
col.prop(cache, "frame_start")
col.prop(cache, "frame_end")
@@ -67,22 +67,24 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke):
sub = col.column()
sub.enabled = enabled
sub.prop(cache, "quick_cache")
- col.prop(cache, "disk_cache")
+
+ sub = col.column()
+ sub.enabled = bpy.data.file_is_saved
+ sub.prop(cache, "disk_cache")
col.label(text=cache.info)
-
layout.separator()
-
+
split = layout.split()
-
+
col = split.column()
-
+
if cache.baked == True:
col.operator("ptcache.free_bake", text="Free Bake")
else:
col.operator("ptcache.bake", text="Bake").bake = True
-
+
sub = col.row()
sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
@@ -90,8 +92,8 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke):
sub = col.column()
sub.enabled = enabled
sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
-
-
+
+
if wide_ui:
col = split.column()
col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True