Fix T73842: UI: add cloth collision settings to Hair Dynamics panel
Since hair collisions were integrated with the cloth solver (rBd42a7bbd6ea5), there are a couple of relevant settings which were not exposed to the User: - Collision Quality - Minimum Distance (this was reported in T73842, default of 0.015m was still limiting in certain scenarios - this can now be made smaller) - Impulse clamping - Collision collection This will add a 'Collisions' panel to Hair Dynamics with those settings Note: in contrast to 'real' cloth, self-collisions are not supported for hair Maniphest Tasks: T73842 Differential Revision: https://developer.blender.org/D7032
This commit is contained in:
parent
f9c7442479
commit
a9ac87be36
Notes:
blender-bot
2023-02-14 07:18:54 +01:00
Referenced by issue #73842, [2.83] Hair Dynamics: Collision has too much minimum distance from objects and leaves a gap.
|
@ -413,6 +413,38 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
|
|||
box.label(text="Error: %.5f .. %.5f (avg. %.5f)" % (result.min_error, result.max_error, result.avg_error))
|
||||
|
||||
|
||||
class PARTICLE_PT_hair_dynamics_collision(ParticleButtonsPanel, Panel):
|
||||
bl_label = "Collisions"
|
||||
bl_parent_id = "PARTICLE_PT_hair_dynamics"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.particle_system.cloth is not None
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
psys = context.particle_system
|
||||
cloth_md = psys.cloth
|
||||
cloth_collision = cloth_md.collision_settings
|
||||
|
||||
layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False
|
||||
|
||||
layout.use_property_split = True
|
||||
|
||||
col = layout.column()
|
||||
col.prop(cloth_collision, "collision_quality", text="Quality")
|
||||
|
||||
layout.separator()
|
||||
|
||||
col = layout.column()
|
||||
col.prop(cloth_collision, "distance_min", slider=True, text="Distance")
|
||||
col.prop(cloth_collision, "impulse_clamp")
|
||||
col.prop(cloth_collision, "collection")
|
||||
|
||||
|
||||
class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel):
|
||||
bl_label = "Structure"
|
||||
bl_parent_id = "PARTICLE_PT_hair_dynamics"
|
||||
|
@ -1986,6 +2018,7 @@ classes = (
|
|||
PARTICLE_PT_emission,
|
||||
PARTICLE_PT_emission_source,
|
||||
PARTICLE_PT_hair_dynamics,
|
||||
PARTICLE_PT_hair_dynamics_collision,
|
||||
PARTICLE_PT_hair_dynamics_structure,
|
||||
PARTICLE_PT_hair_dynamics_volume,
|
||||
PARTICLE_PT_cache,
|
||||
|
|
Loading…
Reference in New Issue