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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-09-20 23:05:46 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:02 +0300
commit491e7493c7f35a0b2d03a9fc6e934e5868c88b10 (patch)
treef3d5b295e104df491250db5701d0a41af3f4d66d /release
parent00bb836e17de349b7e4f9478b1911f8de8e0b334 (diff)
Basic solver result feedback from the mass-spring (cloth/hair) solver.
This returns a general status (success/no-convergence/other) along with basic statistics (min/max/average) for the error value and the number of iterations. It allows some general estimation of the simulation quality and detection of critical settings that could become a problem. Better visualization and extended feedback can follow later.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 8afd2d02170..d725738f506 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -304,6 +304,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
cloth_md = psys.cloth
cloth = cloth_md.settings
+ result = cloth_md.solver_result
layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False
@@ -335,6 +336,24 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
col.prop(cloth_md, "show_debug_data", text="Debug")
+ if result:
+ box = layout.box()
+
+ if not result.status:
+ label = " "
+ icon = 'NONE'
+ elif result.status == {'SUCCESS'}:
+ label = "Success"
+ icon = 'NONE'
+ elif result.status - {'SUCCESS'} == {'NO_CONVERGENCE'}:
+ label = "No Convergence"
+ icon = 'ERROR'
+ else:
+ label = "ERROR"
+ icon = 'ERROR'
+ box.label(label, icon=icon)
+ box.label("Iterations: %d .. %d (avg. %d)" % (result.min_iterations, result.max_iterations, result.avg_iterations))
+ box.label("Error: %.5f .. %.5f (avg. %.5f)" % (result.min_error, result.max_error, result.avg_error))
class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):