[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28534] trunk/blender/release/scripts/ui/ properties_physics_common.py: Tweaked Cache panels to make them clearer, simpler, and added single column UI.
William Reynish
william at reynish.com
Sun May 2 16:34:37 CEST 2010
Revision: 28534
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28534
Author: billrey
Date: 2010-05-02 16:34:37 +0200 (Sun, 02 May 2010)
Log Message:
-----------
Tweaked Cache panels to make them clearer, simpler, and added single column UI.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_physics_common.py
Modified: trunk/blender/release/scripts/ui/properties_physics_common.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_common.py 2010-05-02 13:48:32 UTC (rev 28533)
+++ trunk/blender/release/scripts/ui/properties_physics_common.py 2010-05-02 14:34:37 UTC (rev 28534)
@@ -34,13 +34,12 @@
col.operator("ptcache.remove", icon='ZOOMOUT', text="")
row = layout.row()
- row.label(text="File Name:")
if particles:
row.prop(cache, "external")
if cache.external:
split = layout.split(percentage=0.80)
- split.prop(cache, "name", text="")
+ split.prop(cache, "name", text="File Name")
split.prop(cache, "index", text="")
layout.label(text="File Path:")
@@ -48,46 +47,56 @@
layout.label(text=cache.info)
else:
- layout.prop(cache, "name", text="")
-
+ layout.prop(cache, "name", text="File Name")
+
+ split = layout.split()
+ col = split.column(align=True)
+
if not particles:
- row = layout.row()
- row.enabled = enabled
- row.prop(cache, "frame_start")
- row.prop(cache, "frame_end")
+
+ col.enabled = enabled
+ col.prop(cache, "frame_start")
+ col.prop(cache, "frame_end")
+ if not smoke:
+ col.prop(cache, "step")
- row = layout.row()
+ if wide_ui:
+ col = split.column()
- if cache.baked == True:
- row.operator("ptcache.free_bake", text="Free Bake")
- else:
- row.operator("ptcache.bake", text="Bake").bake = True
-
- sub = row.row()
- sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
- sub.operator("ptcache.bake", text="Calculate to Current Frame").bake = False
-
- row = layout.row()
- row.enabled = enabled
- row.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
if not smoke:
- row.prop(cache, "step")
-
- if not smoke:
- row = layout.row()
- sub = row.row()
+ sub = col.column()
sub.enabled = enabled
sub.prop(cache, "quick_cache")
- row.prop(cache, "disk_cache")
+ col.prop(cache, "disk_cache")
+ col.label(text=cache.info)
- layout.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
- row = layout.row()
- row.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True
- row.operator("ptcache.free_bake_all", text="Free All Bakes")
- layout.operator("ptcache.bake_all", text="Update All Dynamics to current frame").bake = False
+ 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
+ col.operator("ptcache.free_bake_all", text="Free All Bakes")
+ col.operator("ptcache.bake_all", text="Update All To Frame").bake = False
def effector_weights_ui(self, context, weights):
More information about the Bf-blender-cvs
mailing list