diff options
author | Joseph Eagar <joeedh@gmail.com> | 2010-05-12 00:06:20 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2010-05-12 00:06:20 +0400 |
commit | aaa7c493e40c460a90a1f9bfced5ce7b67e3d81a (patch) | |
tree | 193f6833c87c303b143953859fa1abf27eb939a3 /release | |
parent | 3409eb429ead652c0955ee06af09de31af379276 (diff) |
merge of last commit to trunk
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/properties_particle.py | 3 | ||||
-rw-r--r-- | release/scripts/ui/properties_physics_cloth.py | 2 | ||||
-rw-r--r-- | release/scripts/ui/properties_physics_common.py | 12 | ||||
-rw-r--r-- | release/scripts/ui/properties_physics_smoke.py | 4 | ||||
-rw-r--r-- | release/scripts/ui/properties_physics_softbody.py | 2 |
5 files changed, 11 insertions, 12 deletions
diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index 6ec396bf7a1..a1bc4019c6d 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -269,10 +269,9 @@ class PARTICLE_PT_cache(ParticleButtonsPanel): return psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.hair_dynamics) def draw(self, context): - psys = context.particle_system - point_cache_ui(self, context, psys.point_cache, particle_panel_enabled(context, psys), not psys.hair_dynamics, 0) + point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.hair_dynamics else 'PSYS') class PARTICLE_PT_velocity(ParticleButtonsPanel): diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py index 5aa15fe9403..67fc79eb4d1 100644 --- a/release/scripts/ui/properties_physics_cloth.py +++ b/release/scripts/ui/properties_physics_cloth.py @@ -142,7 +142,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel): def draw(self, context): md = context.cloth - point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 0, 0) + point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH') class PHYSICS_PT_cloth_collision(PhysicButtonsPanel): diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py index cad1229a0de..eac2bc60f35 100644 --- a/release/scripts/ui/properties_physics_common.py +++ b/release/scripts/ui/properties_physics_common.py @@ -22,7 +22,8 @@ narrowui = 180 import bpy -def point_cache_ui(self, context, cache, enabled, particles, smoke): +#cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc +def point_cache_ui(self, context, cache, enabled, cachetype): layout = self.layout wide_ui = context.region.width > narrowui @@ -35,7 +36,7 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke): col.operator("ptcache.remove", icon='ZOOMOUT', text="") row = layout.row() - if particles: + if cachetype in {'PSYS', 'HAIR'}: row.prop(cache, "external") if cache.external: @@ -53,17 +54,17 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke): split = layout.split() col = split.column(align=True) - if not particles: + if cachetype != 'PSYS': col.enabled = enabled col.prop(cache, "frame_start") col.prop(cache, "frame_end") - if not smoke: + if cachetype != 'SMOKE': col.prop(cache, "step") if wide_ui: col = split.column() - if not smoke: + if cachetype != 'SMOKE': sub = col.column() sub.enabled = enabled sub.prop(cache, "quick_cache") @@ -102,7 +103,6 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke): 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): layout = self.layout diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py index b1cec9bb120..d4a40dc6788 100644 --- a/release/scripts/ui/properties_physics_smoke.py +++ b/release/scripts/ui/properties_physics_smoke.py @@ -166,7 +166,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel): md = context.smoke.domain_settings cache = md.point_cache_low - point_cache_ui(self, context, cache, (cache.baked is False), 0, 1) + point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE') class PHYSICS_PT_smoke_highres(PhysicButtonsPanel): @@ -222,7 +222,7 @@ class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel): md = context.smoke.domain_settings cache = md.point_cache_high - point_cache_ui(self, context, cache, (cache.baked is False), 0, 1) + point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE') class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel): diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py index 1cef6291c78..8e685b8a66c 100644 --- a/release/scripts/ui/properties_physics_softbody.py +++ b/release/scripts/ui/properties_physics_softbody.py @@ -97,7 +97,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel): def draw(self, context): md = context.soft_body - point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 0, 0) + point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY') class PHYSICS_PT_softbody_goal(PhysicButtonsPanel): |