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:
authorJanne Karhu <jhkarh@gmail.com>2009-08-02 23:39:33 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-08-02 23:39:33 +0400
commitdc75023f6ff54d1b7c99360260fa3e70a4e42005 (patch)
treed445af308df4ad8612d0cdd352b48d98b0705a47 /release
parent7b123ff13c21984c36a44962b5e48d8ae8b69c6e (diff)
Softbody now uses the new pointcache code.
Note: Rna access to softbody point cache is through softbody modifier although the point cache is in softbody settings. This is to make it similar to cloth. Bugfix: Softbody rna was trying to get "ob->soft->softflag" instead of the correct "ob->softflag".
Diffstat (limited to 'release')
-rw-r--r--release/ui/buttons_physics_softbody.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/release/ui/buttons_physics_softbody.py b/release/ui/buttons_physics_softbody.py
index 80e11f92d6b..bff9b13f464 100644
--- a/release/ui/buttons_physics_softbody.py
+++ b/release/ui/buttons_physics_softbody.py
@@ -51,7 +51,54 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
col.itemL(text="Simulation:")
col.itemR(softbody, "gravity")
col.itemR(softbody, "speed")
+
+class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
+ __label__ = "Soft Body Cache"
+ __default_closed__ = True
+
+ def poll(self, context):
+ return (context.soft_body)
+
+ def draw(self, context):
+ layout = self.layout
+
+ cache = context.soft_body.point_cache
+
+ row = layout.row()
+ row.itemR(cache, "name")
+
+ row = layout.row()
+ row.itemR(cache, "start_frame")
+ row.itemR(cache, "end_frame")
+
+ row = layout.row()
+
+ if cache.baked == True:
+ row.itemO("ptcache.free_bake_softbody", text="Free Bake")
+ else:
+ row.item_booleanO("ptcache.cache_softbody", "bake", True, text="Bake")
+
+ sub = row.row()
+ sub.enabled = cache.frames_skipped or cache.outdated
+ sub.itemO("ptcache.cache_softbody", text="Calculate to Current Frame")
+
+ row = layout.row()
+ row.itemO("ptcache.bake_from_softbody_cache", text="Current Cache to Bake")
+ row.itemR(cache, "step");
+ row = layout.row()
+ row.itemR(cache, "quick_cache")
+ row.itemR(cache, "disk_cache")
+
+ layout.itemL(text=cache.info)
+
+ layout.itemS()
+
+ row = layout.row()
+ row.itemO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("ptcache.free_bake_all", text="Free All Bakes")
+ layout.itemO("ptcache.bake_all", text="Update All Dynamics to current frame")
+
class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
__label__ = "Soft Body Goal"
@@ -211,6 +258,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
layout.itemR(softbody, "diagnose")
bpy.types.register(PHYSICS_PT_softbody)
+bpy.types.register(PHYSICS_PT_softbody_cache)
bpy.types.register(PHYSICS_PT_softbody_goal)
bpy.types.register(PHYSICS_PT_softbody_edge)
bpy.types.register(PHYSICS_PT_softbody_collision)