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:
authorMartin Felke <martin.felke@googlemail.com>2018-11-08 17:08:59 +0300
committerMartin Felke <martin.felke@googlemail.com>2018-11-08 17:08:59 +0300
commit7da0f0671a838560748739381ea1ad5ab339acf7 (patch)
treef1c4ff4b8506369bd1bb75f92cbe6114304c6f5a
parent3fa179f341220c8f41b40cae7dce523e647f532b (diff)
crash fix for compound collision + expose constraint rules ui for compound mode
parts of the constraint rules can influence compound simulation behavior too, especially clustering. You can either simulate compounds with our without triggers. First method might be slower than with constraints, but no bending. With triggers its faster, but objects always fall apart entirely (clusters can control this a bit)
-rw-r--r--intern/rigidbody/rb_bullet_api.cpp4
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fracture.py42
2 files changed, 25 insertions, 21 deletions
diff --git a/intern/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp
index a0f22a23b01..ef8a75665d2 100644
--- a/intern/rigidbody/rb_bullet_api.cpp
+++ b/intern/rigidbody/rb_bullet_api.cpp
@@ -761,6 +761,10 @@ struct rbFilterCallback : public btOverlapFilterCallback
(proxy0->m_collisionFilterMask | btBroadphaseProxy::StaticFilter |
btBroadphaseProxy::KinematicFilter));
+ if (!rb0 || !rb1) {
+ return collides;
+ }
+
//no self collisions between kinematic shards in own object allowed
collides = collides && ((!rb0->body->isStaticOrKinematicObject() || !rb1->body->isStaticOrKinematicObject()) ||
((rb0->body->isStaticOrKinematicObject() && rb1->body->isStaticOrKinematicObject()) &&
diff --git a/release/scripts/startup/bl_ui/properties_physics_fracture.py b/release/scripts/startup/bl_ui/properties_physics_fracture.py
index ebae07bb0ad..cd6fd1acf7b 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fracture.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fracture.py
@@ -248,32 +248,32 @@ class PHYSICS_PT_fracture_simulation(PhysicButtonsPanel, Panel):
#col.prop(md, "impulse_dampening")
#col.prop(md, "directional_factor")
col.prop(md, "mass_threshold_factor")
- else:
- layout.label("Constraint Special Breaking Settings")
- col = layout.column(align=True)
- row = col.row(align=True)
- row.prop(md, "breaking_percentage", text="Percentage")
- row.prop(md, "cluster_breaking_percentage", text="Cluster Percentage")
- row = col.row(align=True)
- row.prop(md, "breaking_angle", text="Angle")
- row.prop(md, "cluster_breaking_angle", text="Cluster Angle")
+ layout.label("Constraint Special Breaking Settings")
+ col = layout.column(align=True)
+ row = col.row(align=True)
+ row.prop(md, "breaking_percentage", text="Percentage")
+ row.prop(md, "cluster_breaking_percentage", text="Cluster Percentage")
- row = col.row(align=True)
- row.prop(md, "breaking_distance", text="Distance")
- row.prop(md, "cluster_breaking_distance", text="Cluster Distance")
+ row = col.row(align=True)
+ row.prop(md, "breaking_angle", text="Angle")
+ row.prop(md, "cluster_breaking_angle", text="Cluster Angle")
- col = layout.column(align=True)
- col.prop(md, "solver_iterations_override")
- col.prop(md, "cluster_solver_iterations_override")
+ row = col.row(align=True)
+ row.prop(md, "breaking_distance", text="Distance")
+ row.prop(md, "cluster_breaking_distance", text="Cluster Distance")
- row = layout.row(align=True)
- row.prop(md, "breaking_angle_weighted")
- row.prop(md, "breaking_distance_weighted")
+ col = layout.column(align=True)
+ col.prop(md, "solver_iterations_override")
+ col.prop(md, "cluster_solver_iterations_override")
- row = layout.row(align=True)
- row.prop(md, "breaking_percentage_weighted")
- row.prop(md, "use_mass_dependent_thresholds", text="Mass Dependent Thresholds")
+ row = layout.row(align=True)
+ row.prop(md, "breaking_angle_weighted")
+ row.prop(md, "breaking_distance_weighted")
+
+ row = layout.row(align=True)
+ row.prop(md, "breaking_percentage_weighted")
+ row.prop(md, "use_mass_dependent_thresholds", text="Mass Dependent Thresholds")
if not md.use_compounds:
layout.label("Constraint Deform Settings")