diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-11 19:31:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-11 19:31:05 +0400 |
commit | 96995926283d99876882950ba05e0a0a01335a0a (patch) | |
tree | 9fb7044fbb9f7e51e314fb279df5c2f3708974ac /release/scripts/startup/bl_ui/properties_physics_common.py | |
parent | 66419dcc121ce23aa0ef34eaf1b3480ea6bf82f5 (diff) |
py api: bpy.data.is_dirty wasn't working like image is dirty, instead is would return if the file was saved or not.
- rename to 'is_saved' (and negated).
- add 'is_dirty' which is true when the files edits are not saved to disk.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_common.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index bd657848996..f7cf8da1840 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -106,7 +106,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): layout.label(text=cache.info) else: if cachetype == 'SMOKE': - if bpy.data.is_dirty: + if not bpy.data.is_saved: layout.label(text="Cache is disabled until the file is saved") layout.enabled = False @@ -129,7 +129,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): if cachetype != 'SMOKE': split = layout.split() - split.enabled = enabled and (not bpy.data.is_dirty) + split.enabled = enabled and bpy.data.is_saved col = split.column() col.prop(cache, "use_disk_cache") @@ -139,7 +139,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): col.prop(cache, "use_library_path", "Use Lib Path") row = layout.row() - row.enabled = enabled and (not bpy.data.is_dirty) + row.enabled = enabled and bpy.data.is_saved row.active = cache.use_disk_cache row.label(text="Compression:") row.prop(cache, "compression", expand=True) |