Commit: 3f703f2acf02d660103d5087f3967b1989641a7d
Author: Martin Felke
Date:   Wed Aug 8 16:08:43 2018 +0200
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rB3f703f2acf02d660103d5087f3967b1989641a7d

intial fracturing ok, CoW makes trouble

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

M       release/scripts/startup/bl_ui/properties_physics_fracture.py
M       release/scripts/startup/bl_ui/properties_physics_rigidbody.py
M       source/blender/blenkernel/BKE_fracture.h
M       source/blender/blenkernel/CMakeLists.txt
M       source/blender/blenkernel/intern/fracture.c
M       source/blender/blenkernel/intern/fracture_prefractured.c
M       source/blender/blenkernel/intern/rigidbody.c
M       source/blender/editors/object/object_modifier.c
M       source/blender/makesdna/DNA_modifier_types.h
M       source/blender/modifiers/intern/MOD_fracture.c

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

diff --git a/release/scripts/startup/bl_ui/properties_physics_fracture.py 
b/release/scripts/startup/bl_ui/properties_physics_fracture.py
index f6b8faac586..cfabb8b9230 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fracture.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fracture.py
@@ -40,7 +40,8 @@ class PhysicButtonsPanel():
         return ob and (ob.type == 'MESH') and context.fracture
 
 class PHYSICS_PT_fracture_anim_mesh(PhysicButtonsPanel, Panel):
-    bl_label = "Fracture Animated Mesh Settings"
+    bl_label = "Animated Mesh Settings"
+    bl_parent_id = 'PHYSICS_PT_fracture'
 
     def draw(self, context):
         layout = self.layout
@@ -57,7 +58,7 @@ class PHYSICS_PT_fracture_anim_mesh(PhysicButtonsPanel, 
Panel):
         row.operator("object.fracture_anim_bind", text="Bind", 
icon="UV_VERTEXSEL")
 
 class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
-    bl_label = "Fracture Settings"
+    bl_label = "Fracture"
 
     def icon(self, bool):
         if bool:
@@ -166,12 +167,6 @@ class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
             box.label("Inner Vertex Group:")
             box.prop_search(md, "inner_vertex_group", ob, "vertex_groups", 
text = "")
             box.prop(md, "inner_crease")
-            box.label("Acceleration Map:")
-            box.prop_search(md, "acceleration_vertex_group", ob, 
"vertex_groups", text = "")
-            row = box.row(align=True)
-            row.prop(md, "min_acceleration")
-            row.prop(md, "max_acceleration")
-            row.prop(md, "acceleration_fade")
             if (md.frac_algorithm in {'BISECT_FAST', 'BISECT_FAST_FILL', 
'BOOLEAN_FRACTAL'}):
                 box.prop(md, "orthogonality_factor", text="Rectangular 
Alignment")
 
@@ -181,7 +176,8 @@ class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
         row.prop(md, "execute_threaded", text="Threaded (WIP)")
 
 class PHYSICS_PT_fracture_simulation(PhysicButtonsPanel, Panel):
-    bl_label = "Fracture Constraint Settings"
+    bl_label = "Constraints"
+    bl_parent_id = 'PHYSICS_PT_fracture'
 
     @classmethod
     def poll(cls, context):
@@ -278,7 +274,8 @@ class PHYSICS_PT_fracture_simulation(PhysicButtonsPanel, 
Panel):
 
 
 class PHYSICS_PT_fracture_utilities(PhysicButtonsPanel, Panel):
-    bl_label = "Fracture Utilities"
+    bl_label = "Utilities"
+    bl_parent_id = 'PHYSICS_PT_fracture'
 
     @classmethod
     def poll(cls, context):
@@ -309,7 +306,6 @@ class PHYSICS_PT_fracture_utilities(PhysicButtonsPanel, 
Panel):
 
 classes = (
     FRACTURE_MT_presets,
-    #FRACTURE_UL_fracture_settings,
     PHYSICS_PT_fracture,
     PHYSICS_PT_fracture_simulation,
     PHYSICS_PT_fracture_utilities,
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py 
b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
index 9e3e1759653..17cf1ff8113 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
@@ -58,11 +58,6 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, 
Panel):
             if rbo.type == 'ACTIVE':
                 layout.prop(rbo, "mass")
 
-            col = layout.column()
-            if rbo.type == 'ACTIVE':
-                col.prop(rbo, "enabled", text="Dynamic")
-            col.prop(rbo, "kinematic", text="Animated")
-
 
 class PHYSICS_PT_rigid_body_trigger_advanced(PHYSICS_PT_rigidbody_panel, 
Panel):
     bl_label = "Rigid Body Trigger Advanced"
@@ -116,7 +111,7 @@ class 
PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
         if rbo.collision_shape in {'MESH', 'CONVEX_HULL'}:
             layout.prop(rbo, "mesh_source", text="Source")
 
-        if rbo.collision_shape == 'MESH' and rbo.mesh_source in {'DEFORM', 
'FINAL', 'FINAL_SOLID'}:
+        if rbo.collision_shape == 'MESH' and rbo.mesh_source in {'DEFORM', 
'FINAL'}:
             layout.prop(rbo, "use_deform", text="Deforming")
 
 
diff --git a/source/blender/blenkernel/BKE_fracture.h 
b/source/blender/blenkernel/BKE_fracture.h
index fabbcca178e..47897b7d979 100644
--- a/source/blender/blenkernel/BKE_fracture.h
+++ b/source/blender/blenkernel/BKE_fracture.h
@@ -188,6 +188,7 @@ void BKE_fracture_mesh_island_free(struct 
FractureModifierData *rmd, struct Mesh
 short BKE_fracture_collect_materials(struct Main* bmain, struct Object* o, 
struct Object* ob, int matstart, struct GHash** mat_index_map);
 
 struct Mesh *BKE_fracture_prefractured_do(struct FractureModifierData *fmd, 
struct Object *ob, struct Mesh *dm,
-                                          struct Mesh *orig_dm, char names 
[][66], int count, struct Scene* scene);
+                                          struct Mesh *orig_dm, char names 
[][66], int count, struct Scene* scene,
+                                                                               
  struct Depsgraph *depsgraph);
 
 #endif /* BKE_FRACTURE_H */
diff --git a/source/blender/blenkernel/CMakeLists.txt 
b/source/blender/blenkernel/CMakeLists.txt
index ef97fbb21be..b0422aa2a86 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -535,7 +535,6 @@ if(WITH_VORO)
        add_definitions(-DWITH_VORO)
        list(APPEND INC
                ../../../extern/voro++
-               ../../../extern/carve
        )
 endif()
 
diff --git a/source/blender/blenkernel/intern/fracture.c 
b/source/blender/blenkernel/intern/fracture.c
index 9bd6f663918..44ad9115db0 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -115,17 +115,17 @@ static void fracture_shard_add(FracMesh *fm, Shard *s, 
float mat[4][4])
 
 static BMesh* fracture_shard_to_bmesh(Shard *s)
 {
-    Mesh *dm_parent;
+       Mesh *dm_parent;
        BMesh *bm_parent;
        BMIter iter;
        BMFace *f;
 
-    struct BMeshCreateParams bmc = {.use_toolflags = true};
-    struct BMeshFromMeshParams bme = { .calc_face_normal = true};
+       struct BMeshCreateParams bmc = {.use_toolflags = true};
+       struct BMeshFromMeshParams bme = { .calc_face_normal = true};
 
-    bm_parent = BM_mesh_create(&bm_mesh_allocsize_default, &bmc);
-    dm_parent = BKE_fracture_shard_to_mesh(s, true);
-    BM_mesh_bm_from_me(bm_parent, dm_parent, &bme);
+       bm_parent = BM_mesh_create(&bm_mesh_allocsize_default, &bmc);
+       dm_parent = BKE_fracture_shard_to_mesh(s, true);
+       BM_mesh_bm_from_me(bm_parent, dm_parent, &bme);
 
        BM_mesh_elem_table_ensure(bm_parent, BM_VERT | BM_FACE);
 
@@ -134,7 +134,7 @@ static BMesh* fracture_shard_to_bmesh(Shard *s)
                BM_elem_flag_disable(f, BM_ELEM_SELECT);
        }
 
-    BKE_mesh_free(dm_parent);
+       BKE_mesh_free(dm_parent);
        dm_parent = NULL;
 
        return bm_parent;
@@ -175,8 +175,8 @@ static int shard_sortsize(const void *s1, const void *s2, 
void* UNUSED(context))
                return -1;
        }
 
-    fracture_shard_boundbox(*sh1, loc, size1);
-    fracture_shard_boundbox(*sh2, loc, size2);
+       fracture_shard_boundbox(*sh1, loc, size1);
+       fracture_shard_boundbox(*sh2, loc, size2);
 
        //squared diameter
        val_a = size1[0]*size1[0] + size1[1]*size1[1] + size1[2]*size1[2];
@@ -218,14 +218,14 @@ void BKE_fracture_custom_data_mesh_to_shard(Shard *s, 
Mesh *dm)
        CustomData_reset(&s->polyData);
        CustomData_reset(&s->edgeData);
 
-    CustomData_copy(&dm->vdata, &s->vertData, CD_MASK_MDEFORMVERT, 
CD_DUPLICATE, s->totvert);
-    CustomData_copy(&dm->ldata, &s->loopData, CD_MASK_MLOOPUV, CD_DUPLICATE, 
s->totloop);
-    CustomData_copy(&dm->edata, &s->edgeData, CD_MASK_CREASE | CD_MASK_BWEIGHT 
| CD_MASK_MEDGE, CD_DUPLICATE, s->totedge);
+       CustomData_copy(&dm->vdata, &s->vertData, CD_MASK_MDEFORMVERT, 
CD_DUPLICATE, s->totvert);
+       CustomData_copy(&dm->ldata, &s->loopData, CD_MASK_MLOOPUV, 
CD_DUPLICATE, s->totloop);
+       CustomData_copy(&dm->edata, &s->edgeData, CD_MASK_CREASE | 
CD_MASK_BWEIGHT | CD_MASK_MEDGE, CD_DUPLICATE, s->totedge);
 
        //add velocity vertex layers...
-    check_add_layer(&dm->vdata, &s->vertData, CD_PROP_FLT, s->totvert, "velX");
-    check_add_layer(&dm->vdata, &s->vertData, CD_PROP_FLT, s->totvert, "velY");
-    check_add_layer(&dm->vdata, &s->vertData, CD_PROP_FLT, s->totvert, "velZ");
+       check_add_layer(&dm->vdata, &s->vertData, CD_PROP_FLT, s->totvert, 
"velX");
+       check_add_layer(&dm->vdata, &s->vertData, CD_PROP_FLT, s->totvert, 
"velY");
+       check_add_layer(&dm->vdata, &s->vertData, CD_PROP_FLT, s->totvert, 
"velZ");
 }
 
 /* modified from BKE_mesh_center_median */
@@ -260,8 +260,8 @@ bool BKE_fracture_shard_center_median(Shard *shard, float 
cent[3])
  * \note results will have bias if polygon is non-planar.
  */
 static float mesh_calc_poly_volume_and_weighted_centroid(
-        const MPoly *mpoly, const MLoop *loopstart, const MVert *mvarray,
-        float r_cent[3])
+               const MPoly *mpoly, const MLoop *loopstart, const MVert 
*mvarray,
+               float r_cent[3])
 {
        const float *v_pivot, *v_step1;
        float total_volume = 0.0f;
@@ -334,8 +334,8 @@ bool BKE_fracture_shard_center_centroid(Shard *shard, float 
r_cent[3])
 /* note, results won't be correct if polygon is non-planar */
 /* copied from mesh_evaluate.c */
 static float mesh_calc_poly_planar_area_centroid(
-        const MPoly *mpoly, const MLoop *loopstart, const MVert *mvarray,
-        float r_cent[3])
+               const MPoly *mpoly, const MLoop *loopstart, const MVert 
*mvarray,
+               float r_cent[3])
 {
        int i;
        float tri_area;
@@ -381,7 +381,7 @@ bool BKE_fracture_shard_center_centroid_area(Shard *shard, 
float cent[3])
                BKE_mesh_calc_poly_center(mpoly, shard->mloop + 
mpoly->loopstart, shard->mvert, poly_cent);
 //             poly_area = BKE_mesh_calc_poly_area(mpoly, shard->mloop + 
mpoly->loopstart, shard->mvert);
                poly_area = mesh_calc_poly_planar_area_centroid(mpoly, 
shard->mloop + mpoly->loopstart, shard->mvert,
-                                                               poly_cent);
+                                                                               
                                poly_cent);
                madd_v3_v3fl(cent, poly_cent, poly_area);
                total_area += poly_area;
        }
@@ -434,12 +434,12 @@ float BKE_shard_calc_minmax(Shard *shard)
 {
        float min[3], max[3], diff[3];
        int i;
-       
+
        INIT_MINMAX(min, max);
        for (i = 0; i < shard->totvert; i++) {
                minmax_v3v3_v3(min, max, shard->mvert[i].co);
        }
-       
+
        copy_v3_v3(shard->min, min);
        copy_v3_v3(shard->max, max);
 
@@ -450,9 +450,9 @@ float BKE_shard_calc_minmax(Shard *shard)
 static Shard* fracture_initial_shard_create(Mesh *dm)
 {
        /* cre

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to