Commit: 61f8a1cfd773cdedaf9eda4307dd1cbc9ba159fb
Author: Luca Rood
Date:   Thu Jan 19 20:06:58 2017 -0200
Branches: cloth-improvements
https://developer.blender.org/rB61f8a1cfd773cdedaf9eda4307dd1cbc9ba159fb

Remove old repulsion stuff

Repulsions were long unused, and are now more obsolete than ever, with
the more stable collision response.

===================================================================

M       release/scripts/startup/bl_ui/properties_physics_cloth.py
M       source/blender/blenkernel/intern/cloth.c
M       source/blender/blenkernel/intern/collision.c
M       source/blender/makesdna/DNA_cloth_types.h
M       source/blender/makesrna/intern/rna_cloth.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py 
b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index f5f5ce36d7..c83d0e243c 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -235,13 +235,11 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, 
Panel):
         sub = col.column()
         sub.active = cloth.use_collision
         sub.prop(cloth, "friction")
-        sub.prop(cloth, "repel_force", slider=True, text="Repel")
 
         col = split.column()
         col.active = cloth.use_collision
         col.prop(cloth, "collision_quality", text="Quality")
         col.prop(cloth, "distance_min", slider=True, text="Distance")
-        col.prop(cloth, "distance_repel", slider=True, text="Repel Distance")
 
         col = layout.column()
         col.active = cloth.use_collision
diff --git a/source/blender/blenkernel/intern/cloth.c 
b/source/blender/blenkernel/intern/cloth.c
index 2eef11376a..b51c93b298 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -908,7 +908,7 @@ static int cloth_from_object(Object *ob, ClothModifierData 
*clmd, DerivedMesh *d
        if (!first)
                BKE_cloth_solver_set_positions(clmd);
 
-       clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, 
MAX2(clmd->coll_parms->epsilon, clmd->coll_parms->distance_repel) );
+       clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, 
clmd->coll_parms->epsilon );
        
        for (i = 0; i < dm->getNumVerts(dm); i++) {
                maxdist = MAX2(maxdist, clmd->coll_parms->selfepsilon* ( 
cloth->verts[i].avg_spring_len*2.0f));
diff --git a/source/blender/blenkernel/intern/collision.c 
b/source/blender/blenkernel/intern/collision.c
index 43efb95500..fcc535c422 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1384,7 +1384,7 @@ void cloth_find_point_contacts(Object *ob, 
ClothModifierData *clmd, float step,
        ////////////////////////////////////////////////////////////
        
        // create temporary cloth points bvh
-       cloth_bvh = BLI_bvhtree_new(mvert_num, 
max_ff(clmd->coll_parms->epsilon, clmd->coll_parms->distance_repel), 4, 6);
+       cloth_bvh = BLI_bvhtree_new(mvert_num, clmd->coll_parms->epsilon, 4, 6);
        /* fill tree */
        for (i = 0; i < mvert_num; i++) {
                float co[6];
diff --git a/source/blender/makesdna/DNA_cloth_types.h 
b/source/blender/makesdna/DNA_cloth_types.h
index c88c6a0883..767814c832 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -121,7 +121,6 @@ typedef struct ClothCollSettings {
        float   friction;               /* Friction/damping applied on contact 
with other object.*/
        float   damping;        /* Collision restitution on contact with other 
object.*/
        float   selfepsilon;            /* for selfcollision */
-       float repel_force, distance_repel;
        int     flags;                  /* collision flags defined in 
BKE_cloth.h */
        short   self_loop_count;        /* How many iterations for the 
selfcollision loop       */
        short   loop_count;             /* How many iterations for the 
collision loop.          */
diff --git a/source/blender/makesrna/intern/rna_cloth.c 
b/source/blender/makesrna/intern/rna_cloth.c
index 095d90b182..da7cc7d3fc 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -799,21 +799,6 @@ static void rna_def_cloth_collision_settings(BlenderRNA 
*brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
CLOTH_COLLSETTINGS_FLAG_ENABLED);
        RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions 
with other objects");
        RNA_def_property_update(prop, 0, "rna_cloth_update");
-
-       prop = RNA_def_property(srna, "repel_force", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "repel_force");
-       RNA_def_property_range(prop, 0.0f, 20.0f);
-       RNA_def_property_float_default(prop, 1.0f);
-       RNA_def_property_ui_text(prop, "Repulsion Force", "Repulsion force to 
apply on cloth when close to colliding");
-       RNA_def_property_update(prop, 0, "rna_cloth_update");
-
-       prop = RNA_def_property(srna, "distance_repel", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "distance_repel");
-       RNA_def_property_range(prop, 0.001f, 10.0f);
-       RNA_def_property_float_default(prop, 0.005f);
-       RNA_def_property_ui_text(prop, "Repulsion Distance",
-                                "Maximum distance to apply repulsion force, 
must be greater than minimum distance");
-       RNA_def_property_update(prop, 0, "rna_cloth_update");
        
        prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "epsilon");

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to