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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-03-04 19:31:36 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-03-06 16:59:02 +0300
commita9ac87be36984b89d95bb6ba6ee095465429400e (patch)
tree1ef907072f5dfcd96a1cd8e36c9b22623c658e86 /release/scripts/startup/bl_ui/properties_particle.py
parentf9c7442479a9969ae8c366270c12cd12306750da (diff)
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
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_particle.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 3384032e332..7eb173c88bb 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -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,