[Bf-blender-cvs] [173bb6314a6] temp-fracture-modifier-2.8: further compile fixes

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


Commit: 173bb6314a6fbe7fc25f65baa16aec4cb2c187c3
Author: Martin Felke
Date:   Wed Aug 8 01:15:09 2018 +0200
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rB173bb6314a6fbe7fc25f65baa16aec4cb2c187c3

further compile fixes

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

M	source/blender/blenkernel/BKE_fracture.h
M	source/blender/blenkernel/intern/fracture.c
M	source/blender/blenkernel/intern/fracture_dynamic.c
M	source/blender/depsgraph/intern/depsgraph_query_iter.cc

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

diff --git a/source/blender/blenkernel/BKE_fracture.h b/source/blender/blenkernel/BKE_fracture.h
index 4fd189af57f..fabbcca178e 100644
--- a/source/blender/blenkernel/BKE_fracture.h
+++ b/source/blender/blenkernel/BKE_fracture.h
@@ -92,7 +92,9 @@ void BKE_fracture_automerge_refresh(struct FractureModifierData* fmd);
 struct Mesh *BKE_fracture_result_mesh(struct FractureModifierData* fmd, struct Mesh *dm, struct Object* ob, bool validMesh,
                                       struct Scene* scene);
 
-FracPointCloud BKE_fracture_points(struct FractureModifierData *fmd, struct Object *ob, struct Mesh* me, ShardID id);
+FracPointCloud BKE_fracture_points_get(struct Depsgraph *depsgraph, struct FractureModifierData *emd,
+                                       struct Object *ob, struct Mesh *fracmesh, ShardID id);
+
 void BKE_fracture_face_calc_center_mean(struct Mesh *dm, struct MPoly *mp, float r_cent[3]);
 
 struct Shard* BKE_fracture_shard_find(struct ListBase *shards, ShardID id);
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 008bfd61f9b..9bd6f663918 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -3595,7 +3595,7 @@ static void points_from_greasepencil(Object **ob, int totobj, FracPointCloud *po
     points->totpoints = pt;
 }
 
-static FracPointCloud get_points_global(Depsgraph *depsgraph, FractureModifierData *emd, Object *ob, Mesh *fracmesh, ShardID id)
+FracPointCloud BKE_fracture_points_get(Depsgraph *depsgraph, FractureModifierData *emd, Object *ob, Mesh *fracmesh, ShardID id)
 {
     FracPointCloud points;
     Scene* scene = DEG_get_input_scene(depsgraph); //do we need the eval one ?
@@ -4113,13 +4113,14 @@ static void cleanup_arrange_shard(FractureModifierData *fmd, Shard* sh, float ce
     }
 }
 
-static void do_fracture_points(FractureModifierData *fmd, Object* obj, Mesh *dm, ShardID id,
+
+void BKE_fracture_points(FractureModifierData *fmd, Object* obj, Mesh *dm, ShardID id,
                                int override_count, Depsgraph* depsgraph, Main *bmain)
 {
     /* dummy point cloud, random */
     FracPointCloud points;
 
-    points = get_points_global(depsgraph, fmd, obj, dm, id);
+    points = BKE_fracture_points_get(depsgraph, fmd, obj, dm, id);
 
     if (points.totpoints > 0 || fmd->use_greasepencil_edges) {
         bool temp = fmd->shards_to_islands;
@@ -4198,7 +4199,7 @@ void BKE_fracture_do(FractureModifierData *fmd, ShardID id, Object *obj, Mesh *d
         for (i = 0; i < count; i++)
         {
             printf("Fracturing Shard ID: %d %d\n", i, ids[i]);
-            do_fracture_points(fmd, obj, dm, ids[i], 0, depsgraph, bmain);
+            BKE_fracture_points(fmd, obj, dm, ids[i], 0, depsgraph, bmain);
         }
 
         fmd->reset_shards = reset;
@@ -4206,7 +4207,7 @@ void BKE_fracture_do(FractureModifierData *fmd, ShardID id, Object *obj, Mesh *d
         MEM_freeN(ids);
     }
     else {
-        do_fracture_points(fmd, obj, dm, id, -1, depsgraph, bmain);
+        BKE_fracture_points(fmd, obj, dm, id, -1, depsgraph, bmain);
     }
 }
 
diff --git a/source/blender/blenkernel/intern/fracture_dynamic.c b/source/blender/blenkernel/intern/fracture_dynamic.c
index e6c67e527aa..1dff3ac9686 100644
--- a/source/blender/blenkernel/intern/fracture_dynamic.c
+++ b/source/blender/blenkernel/intern/fracture_dynamic.c
@@ -91,7 +91,6 @@ static void fracture_dynamic_update(FractureModifierData *fmd, Object* ob, Scene
 
         while(fid) {
             FracPointCloud points;
-            points = BKE_fracture_points(fmd, ob, dm, fid->shardID);
             totpoint += points.totpoints;
             MEM_freeN(points.points);
             points.totpoints = 0;
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index 915f00c3047..f3e5025f6d0 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -151,7 +151,7 @@ bool deg_objects_dupli_iterator_next(BLI_Iterator *iter)
 		iter->current = &data->temp_dupli_object;
 		BLI_assert(
 		        DEG::deg_validate_copy_on_write_datablock(
-		                &data->temp_dupli_object.id));
+		                &data->temp_dupli_object->id));
 		return true;
 	}



More information about the Bf-blender-cvs mailing list