[Bf-blender-cvs] [7a9197ea38b] temp-fracture-modifier-2.8: FM is more stable / usable now in 2.8

Martin Felke noreply at git.blender.org
Fri Aug 10 14:00:54 CEST 2018


Commit: 7a9197ea38beb01a2b308dc47c482b222325527a
Author: Martin Felke
Date:   Thu Aug 9 21:15:43 2018 +0200
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rB7a9197ea38beb01a2b308dc47c482b222325527a

FM is more stable / usable now in 2.8

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

M	intern/rigidbody/rb_bullet_api.cpp
M	release/scripts/startup/bl_ui/properties_physics_fracture.py
M	release/scripts/startup/bl_ui/properties_physics_rigidbody.py
M	source/blender/alembic/intern/abc_mball.cc
M	source/blender/blenkernel/BKE_library.h
M	source/blender/blenkernel/BKE_object.h
M	source/blender/blenkernel/intern/fracture.c
M	source/blender/blenkernel/intern/fracture_automerge.c
M	source/blender/blenkernel/intern/fracture_dynamic.c
M	source/blender/blenkernel/intern/fracture_rigidbody.c
M	source/blender/blenkernel/intern/library_remap.c
M	source/blender/blenkernel/intern/modifier.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/rigidbody.c
M	source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/intern/rna_fracture.c
M	source/blender/modifiers/intern/MOD_fracture.c

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

diff --git a/intern/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp
index 844b69d870e..7e21e95e2d2 100644
--- a/intern/rigidbody/rb_bullet_api.cpp
+++ b/intern/rigidbody/rb_bullet_api.cpp
@@ -972,7 +972,8 @@ static void nearCallback(btBroadphasePair &collisionPair, btCollisionDispatcher
 
 				//handle_activation(manifold, rb0, rb1);
 				//handle_activation(manifold, rb1, rb0);
-				((rbFilterCallback*)(rb0->world->filterCallback))->callback(rb0->world->blenderScene, rb0->meshIsland, rb1->meshIsland,
+				((rbFilterCallback*)(rb0->world->filterCallback))->callback(
+							   rb0->world->blenderScene, rb0->meshIsland, rb1->meshIsland,
 							   rb0->blenderOb, rb1->blenderOb, true);
 			}
 		}
diff --git a/release/scripts/startup/bl_ui/properties_physics_fracture.py b/release/scripts/startup/bl_ui/properties_physics_fracture.py
index cfabb8b9230..23295c0fc6b 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 = "Animated Mesh Settings"
+    bl_label = "Animated Mesh"
+    bl_options = {'DEFAULT_CLOSED'}
     bl_parent_id = 'PHYSICS_PT_fracture'
 
     def draw(self, context):
@@ -57,6 +58,49 @@ class PHYSICS_PT_fracture_anim_mesh(PhysicButtonsPanel, Panel):
         row = layout.row()
         row.operator("object.fracture_anim_bind", text="Bind", icon="UV_VERTEXSEL")
 
+class PHYSICS_PT_fracture_advanced(PhysicButtonsPanel, Panel):
+    bl_label = "Advanced Fracture"
+    bl_options = {'DEFAULT_CLOSED'}
+    bl_parent_id = 'PHYSICS_PT_fracture'
+
+    def draw(self, context):
+        layout = self.layout
+        md = context.fracture
+        ob = context.object
+
+        layout.label("Fracture Point Source:")
+        col = layout.column()
+        col.prop(md, "point_source")
+        if 'GRID' in md.point_source:
+            sub = col.split(0.33)
+            sub.prop(md, "grid_resolution")
+            sub.prop(md, "grid_offset")
+            sub.prop(md, "grid_spacing")
+        if 'GREASE_PENCIL' in md.point_source:
+            col.prop(md, "use_greasepencil_edges")
+            col.prop(md, "grease_offset")
+            col.prop(md, "grease_decimate")
+            col.prop(md, "cutter_axis")
+        col.prop(md, "extra_group", text="Helpers")
+        col.prop(md, "dm_group", text="Combination")
+        col.prop(md, "use_constraint_group")
+        col.prop(md, "cutter_group")
+        if (md.cutter_group):
+            col.prop(md, "keep_cutter_shards")
+            col.label("Material Index Offset")
+            row = col.row(align=True)
+            row.prop(md, "material_offset_intersect", text="Intersect")
+            row.prop(md, "material_offset_difference", text="Difference")
+        col.prop(md, "use_particle_birth_coordinates")
+        col.prop(md, "percentage")
+        sub = col.column(align=True)
+        sub.prop_search(md, "thresh_vertex_group", ob, "vertex_groups", text = "Threshold")
+        sub.prop_search(md, "ground_vertex_group", ob, "vertex_groups", text = "Passive")
+        sub.prop_search(md, "inner_vertex_group", ob, "vertex_groups", text = "Inner")
+        sub.prop(md, "inner_crease")
+        if (md.frac_algorithm in {'BISECT_FAST', 'BISECT_FAST_FILL', 'BOOLEAN_FRACTAL'}):
+            col.prop(md, "orthogonality_factor", text="Rectangular Alignment")
+
 class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
     bl_label = "Fracture"
 
@@ -122,61 +166,24 @@ class PHYSICS_PT_fracture(PhysicButtonsPanel, Panel):
             row = col.row(align=True)
             row.prop(md, "fractal_amount")
             row.prop(md, "physics_mesh_scale")
+        row = layout.row(align=True)
+        row.prop(md, "splinter_axis")
+        row = layout.row(align=True)
+        row.prop(md, "splinter_length")
         row = layout.row()
         row.prop(md, "shards_to_islands")
         row.prop(md, "use_smooth")
         row = layout.row()
         row.prop(md, "auto_execute")
-        row = layout.row(align=True)
-        row.prop(md, "splinter_axis")
-        layout.prop(md, "splinter_length")
-
-        box = layout.box()
-        box.prop(md, "use_experimental", text="Advanced Fracture Settings", icon=self.icon(md.use_experimental), emboss = False)
-        if md.use_experimental:
-            box.label("Fracture Point Source:")
-            col = box.column()
-            col.prop(md, "point_source")
-            if 'GRID' in md.point_source:
-                sub = col.split(0.33)
-                sub.prop(md, "grid_resolution")
-                sub.prop(md, "grid_offset")
-                sub.prop(md, "grid_spacing")
-            if 'GREASE_PENCIL' in md.point_source:
-                col.prop(md, "use_greasepencil_edges")
-                col.prop(md, "grease_offset")
-                col.prop(md, "grease_decimate")
-                col.prop(md, "cutter_axis")
-            col.prop(md, "extra_group")
-            col.prop(md, "dm_group")
-            col.prop(md, "use_constraint_group")
-            col.prop(md, "cutter_group")
-            if (md.cutter_group):
-                col.prop(md, "keep_cutter_shards")
-                col.label("Material Index Offset")
-                row = col.row(align=True)
-                row.prop(md, "material_offset_intersect", text="Intersect")
-                row.prop(md, "material_offset_difference", text="Difference")
-            col.prop(md, "use_particle_birth_coordinates")
-
-            box.prop(md, "percentage")
-            box.label("Threshold Vertex Group:")
-            box.prop_search(md, "thresh_vertex_group", ob, "vertex_groups", text = "")
-            box.label("Passive Vertex Group:")
-            box.prop_search(md, "ground_vertex_group", ob, "vertex_groups", text = "")
-            box.label("Inner Vertex Group:")
-            box.prop_search(md, "inner_vertex_group", ob, "vertex_groups", text = "")
-            box.prop(md, "inner_crease")
-            if (md.frac_algorithm in {'BISECT_FAST', 'BISECT_FAST_FILL', 'BOOLEAN_FRACTAL'}):
-                box.prop(md, "orthogonality_factor", text="Rectangular Alignment")
+        row.prop(md, "execute_threaded", text="Threaded (WIP)")
 
         layout.context_pointer_set("modifier", md)
         row = layout.row()
         row.operator("object.fracture_refresh", text="Execute Fracture", icon='MOD_EXPLODE').reset = True
-        row.prop(md, "execute_threaded", text="Threaded (WIP)")
 
 class PHYSICS_PT_fracture_simulation(PhysicButtonsPanel, Panel):
     bl_label = "Constraints"
+    bl_options = {'DEFAULT_CLOSED'}
     bl_parent_id = 'PHYSICS_PT_fracture'
 
     @classmethod
@@ -275,6 +282,7 @@ class PHYSICS_PT_fracture_simulation(PhysicButtonsPanel, Panel):
 
 class PHYSICS_PT_fracture_utilities(PhysicButtonsPanel, Panel):
     bl_label = "Utilities"
+    bl_options = {'DEFAULT_CLOSED'}
     bl_parent_id = 'PHYSICS_PT_fracture'
 
     @classmethod
@@ -307,6 +315,7 @@ class PHYSICS_PT_fracture_utilities(PhysicButtonsPanel, Panel):
 classes = (
     FRACTURE_MT_presets,
     PHYSICS_PT_fracture,
+    PHYSICS_PT_fracture_advanced,
     PHYSICS_PT_fracture_simulation,
     PHYSICS_PT_fracture_utilities,
     PHYSICS_PT_fracture_anim_mesh,
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
index 17cf1ff8113..17dcaa9c1d8 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
@@ -60,7 +60,8 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
 
 
 class PHYSICS_PT_rigid_body_trigger_advanced(PHYSICS_PT_rigidbody_panel, Panel):
-    bl_label = "Rigid Body Trigger Advanced"
+    bl_label = "Advanced Trigger"
+    bl_options = {'DEFAULT_CLOSED'}
     bl_parent_id = 'PHYSICS_PT_rigid_body'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
 
diff --git a/source/blender/alembic/intern/abc_mball.cc b/source/blender/alembic/intern/abc_mball.cc
index 62ab561274a..04bfb39fcc5 100644
--- a/source/blender/alembic/intern/abc_mball.cc
+++ b/source/blender/alembic/intern/abc_mball.cc
@@ -64,7 +64,7 @@ AbcMBallWriter::AbcMBallWriter(
 AbcMBallWriter::~AbcMBallWriter()
 {
 	delete m_mesh_writer;
-	BKE_object_free(m_mesh_ob);
+	BKE_object_free(m_mesh_ob, 0);
 }
 
 bool AbcMBallWriter::isAnimated() const
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 16e05cd136a..f6f62226302 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -117,6 +117,7 @@ enum {
 
 	LIB_ID_FREE_NO_DEG_TAG         = 1 << 8,  /* Do not tag freed ID for update in depsgraph. */
 	LIB_ID_FREE_NO_UI_USER         = 1 << 9,  /* Do not attempt to remove freed ID from UI data/notifiers/... */
+	LIB_ID_FREE_COPY_ON_WRITE      = 1 << 10, /* Mark this free operation as being triggered by CoW*/
 };
 
 void BKE_id_free_ex(struct Main *bmain, void *idv, int flag, const bool use_flag_from_idtag);
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 7d795c25a04..2ab2b6f985f 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -67,7 +67,7 @@ void BKE_object_free_particlesystems(struct Object *ob);
 void BKE_object_free_softbody(struct Object *ob);
 void BKE_object_free_curve_cache(struct Object *ob);
 
-void BKE_object_free(struct Object *ob);
+void BKE_object_free(struct Object *ob, const int flag);
 void BKE_object_free_derived_caches(struct Object *ob);
 void BKE_object_free_derived_mesh_caches(struct Object *ob);
 void BKE_object_free_caches(struct Object *object);
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 9d332147558..fd19d312002 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -1967,6 +1967,8 @@ void BKE_fracture_shard_by_points(FractureModifi

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list