Fix for [#25185] Toggling hair dynamics without deleting cache leaves hair disattached when mesh animation is controlled by deformers - discussed with Jahka on IRC on Sat

This commit is contained in:
2010-12-13 09:39:14 +00:00
parent a4b410af3d
commit 4cd06a6526
3 changed files with 8 additions and 5 deletions

View File

@@ -234,7 +234,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
#part = psys.settings
cloth = psys.cloth.settings
layout.enabled = psys.use_hair_dynamics
layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked == False
split = layout.split()
@@ -274,12 +274,12 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
phystype = psys.settings.physics_type
if phystype == 'NO' or phystype == 'KEYED':
return False
return (psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.use_hair_dynamics)) and engine in cls.COMPAT_ENGINES
return (psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and (psys.use_hair_dynamics or psys.point_cache.is_baked))) and engine in cls.COMPAT_ENGINES
def draw(self, context):
psys = context.particle_system
point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.use_hair_dynamics else 'PSYS')
point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if (psys.settings.type == 'HAIR') else 'PSYS')
class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):