Commit: d4154584656a7613e00e15a2309ab25c779ae784
Author: Martin Felke
Date:   Tue Aug 7 13:53:39 2018 +0200
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rBd4154584656a7613e00e15a2309ab25c779ae784

some compile fixes

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

M       source/blender/blenkernel/BKE_fracture.h
M       source/blender/blenkernel/BKE_rigidbody.h
M       source/blender/blenkernel/intern/fracture.c
M       source/blender/blenkernel/intern/fracture_automerge.c
M       source/blender/blenkernel/intern/fracture_constraints.c
M       source/blender/blenkernel/intern/fracture_external.c
M       source/blender/blenkernel/intern/fracture_prefractured.c
M       source/blender/blenkernel/intern/pointcache.c
M       source/blender/blenkernel/intern/rigidbody.c
M       source/blender/depsgraph/DEG_depsgraph_query.h
M       source/blender/depsgraph/intern/depsgraph_query_iter.cc
M       source/blender/editors/object/object_modifier.c
M       source/blender/editors/physics/rigidbody_constraint.c
M       source/blender/editors/physics/rigidbody_object.c
M       source/blender/editors/transform/transform_conversions.c
M       source/blender/makesdna/DNA_modifier_types.h
M       source/blender/makesdna/DNA_rigidbody_types.h
M       source/blender/makesrna/intern/rna_fracture.c
M       source/blender/makesrna/intern/rna_fracture_api.c
M       source/blender/makesrna/intern/rna_rigidbody.c
M       source/blender/modifiers/intern/MOD_fracture.c

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

diff --git a/source/blender/blenkernel/BKE_fracture.h 
b/source/blender/blenkernel/BKE_fracture.h
index 4f6db021a5a..3af2df0dbdd 100644
--- a/source/blender/blenkernel/BKE_fracture.h
+++ b/source/blender/blenkernel/BKE_fracture.h
@@ -56,6 +56,8 @@ struct MEdge;
 struct BMesh;
 struct CustomData;
 struct Scene;
+struct Main;
+struct KDTree;
 
 typedef int ShardID;
 
@@ -109,7 +111,7 @@ void BKE_match_vertex_coords(struct MeshIsland* mi, struct 
MeshIsland *par, stru
 bool BKE_lookup_mesh_state(struct FractureModifierData *fmd, int frame, int 
do_lookup);
 void BKE_get_prev_entries(struct FractureModifierData *fmd);
 void BKE_get_next_entries(struct FractureModifierData *fmd);
-void BKE_free_constraints(struct FractureModifierData *fmd, struct Scene 
*scene);
+void BKE_fracture_constraints_free(struct FractureModifierData *fmd, struct 
Scene *scene);
 struct Shard* BKE_create_initial_shard(struct Mesh *dm);
 void BKE_copy_customdata_layers(struct CustomData* dest, struct CustomData 
*src, int type, int count);
 
@@ -140,10 +142,12 @@ void BKE_read_animated_loc_rot(struct 
FractureModifierData *fmd, struct Object *
                                struct Depsgraph* depsgraph);
 
 
-void BKE_fracture_free(struct FractureModifierData *fmd, bool 
do_free_sequence, bool do_free_rigidbody);
-void BKE_fracture_dynamic_free(struct FractureModifierData *fmd, bool 
do_free_sequence, bool do_free_rigidbody);
+void BKE_fracture_dynamic_free(struct FractureModifierData *fmd,
+                               bool do_free_sequence, bool do_free_rigidbody);
+
+struct Mesh* BKE_fracture_prefractured_apply(struct FractureModifierData *fmd, 
struct Object *ob, struct Mesh *mesh,
+                                             struct Depsgraph *depsgraph);
 
-struct Mesh* BKE_fracture_prefractured_apply(struct FractureModifierData *fmd, 
struct Object *ob, struct Mesh *mesh);
 struct Mesh* BKE_fracture_dynamic_apply(struct FractureModifierData *fmd, 
struct Object *ob, struct Mesh *mesh);
 struct Mesh* BKE_fracture_external_apply(struct FractureModifierData *fmd, 
struct Object* ob, struct Mesh* mesh,
                                          struct Mesh *derivedData, struct 
Scene *scene);
@@ -154,7 +158,7 @@ void BKE_fracture_dynamic_initialize(struct 
FractureModifierData* fmd, struct Ob
                                      struct Mesh* mesh, char (*names)[66]);
 
 void BKE_fracture_initialize(struct FractureModifierData* fmd, struct Object 
*ob,
-                                     struct Mesh* mesh);
+                                     struct Mesh* mesh, struct Depsgraph 
*depsgraph);
 
 void BKE_fracture_autohide_refresh(struct FractureModifierData* fmd, struct 
Object *ob);
 void BKE_fracture_automerge_refresh(struct FractureModifierData* fmd);
@@ -173,4 +177,22 @@ void BKE_fracture_shared_verts_free(struct ListBase* lb);
 
 struct Mesh *BKE_fracture_autohide_do(struct FractureModifierData *fmd, struct 
Mesh *dm, struct Object *ob, struct Scene* sc);
 
+struct FracMesh* BKE_fracture_fracmesh_copy(struct FracMesh* fm);
+void BKE_fracture_simulation_free(struct FractureModifierData *fmd, bool 
do_free_seq, bool do_free_rigidbody, struct Scene *scene);
+void BKE_fracture_meshislands_free(struct FractureModifierData* fmd, struct 
ListBase* meshIslands, bool do_free_rigidbody,
+                                   struct Scene* scene);
+
+void BKE_fracture_free(struct FractureModifierData *fmd, bool do_free_seq, 
bool do_free_rigidbody, struct Scene *scene);
+
+void BKE_fracture_do(struct FractureModifierData *fmd, ShardID id, struct 
Object *obj, struct Mesh *dm,
+                     struct Depsgraph *depsgraph, struct Main *bmain);
+
+void BKE_fracture_normal_find(struct Mesh *dm, struct KDTree *tree, float 
co[3], short no[3], short rno[3], float range);
+void BKE_fracture_physics_mesh_normals_fix(struct FractureModifierData *fmd, 
struct Shard* s, struct MeshIsland* mi, int i,
+                                           struct Mesh* orig_dm);
+
+void BKE_fracture_constraints_refresh(struct FractureModifierData *fmd, struct 
Object *ob, struct Scene* scene);
+
+void BKE_fracture_collect_layers(struct Shard* s, struct Mesh *dm, int 
vertstart, int polystart, int loopstart, int edgestart);
+
 #endif /* BKE_FRACTURE_H */
diff --git a/source/blender/blenkernel/BKE_rigidbody.h 
b/source/blender/blenkernel/BKE_rigidbody.h
index 20b32f9ad2f..3648c92ea3a 100644
--- a/source/blender/blenkernel/BKE_rigidbody.h
+++ b/source/blender/blenkernel/BKE_rigidbody.h
@@ -99,8 +99,8 @@ void BKE_rigidbody_calc_center_of_mass(struct Object *ob, 
float r_center[3]);
 struct RigidBodyWorld *BKE_rigidbody_get_world(struct Scene *scene);
 void BKE_rigidbody_remove_object(struct Main *bmain, struct Scene *scene, 
struct Object *ob);
 void BKE_rigidbody_remove_constraint(struct Scene *scene, struct Object *ob);
-float BKE_rigidbody_calc_volume_dm(struct DerivedMesh *dm, struct RigidBodyOb 
*rbo, struct Object *ob);
-void BKE_rigidbody_calc_shard_mass(struct Object* ob, struct MeshIsland* mi, 
struct DerivedMesh* dm);
+float BKE_rigidbody_calc_volume_dm(struct Mesh *dm, struct RigidBodyOb *rbo, 
struct Object *ob);
+void BKE_rigidbody_calc_shard_mass(struct Object* ob, struct MeshIsland* mi, 
struct Mesh *dm);
 void BKE_rigidbody_calc_threshold(float max_con_mass, struct 
FractureModifierData* rmd, struct RigidBodyShardCon *con);
 float BKE_rigidbody_calc_max_con_mass(struct Object* ob);
 float BKE_rigidbody_calc_min_con_dist(struct Object* ob);
@@ -121,7 +121,8 @@ void BKE_rigidbody_update_ob_array(struct RigidBodyWorld 
*rbw, bool do_bake_corr
 /* -------------- */
 /* Simulation */
 
-void BKE_rigidbody_aftertrans_update(struct Object *ob, float loc[3], float 
rot[3], float quat[4], float rotAxis[3], float rotAngle);
+void BKE_rigidbody_aftertrans_update(struct Object *ob, float loc[3], float 
rot[3],
+                                     float quat[4], float rotAxis[3], float 
rotAngle, struct Depsgraph *depsgraph);
 void BKE_rigidbody_sync_transforms(struct RigidBodyWorld *rbw, struct Object 
*ob, float ctime);
 bool BKE_rigidbody_check_sim_running(struct RigidBodyWorld *rbw, float ctime);
 void BKE_rigidbody_cache_reset(struct RigidBodyWorld *rbw);
diff --git a/source/blender/blenkernel/intern/fracture.c 
b/source/blender/blenkernel/intern/fracture.c
index 67db5aec3e1..aff900af60c 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -92,9 +92,10 @@ static void parse_cell_verts(cell c, MVert *mvert, int 
totvert);
 static void parse_cell_polys(cell c, MPoly *mpoly, int totpoly, int 
*r_totloop);
 static void parse_cell_loops(cell c, MLoop *mloop, int totloop, MPoly *mpoly, 
int totpoly);
 static void parse_cell_neighbors(cell c, int *neighbors, int totpoly);
-static void fracture_collect_layers(Shard *shard, DerivedMesh *result, int 
vertstart, int polystart, int loopstart, int edgestart);
+static void arrange_shard(FractureModifierData *fmd, ShardID id, bool 
do_verts, float cent[3]);
+static void fracture_shard_add(FracMesh *fm, Shard *s, float mat[4][4]);
 
-void BKE_fracture_shard_add(FracMesh *fm, Shard *s, float mat[4][4])
+static void fracture_shard_add(FracMesh *fm, Shard *s, float mat[4][4])
 {
        MVert *mv;
        int i = 0;
@@ -111,7 +112,7 @@ void BKE_fracture_shard_add(FracMesh *fm, Shard *s, float 
mat[4][4])
        fm->shard_count++;
 }
 
-BMesh * BKE_fracture_shard_to_bmesh(Shard *s)
+static BMesh* fracture_shard_to_bmesh(Shard *s)
 {
     Mesh *dm_parent;
        BMesh *bm_parent;
@@ -186,7 +187,7 @@ static int shard_sortsize(const void *s1, const void *s2, 
void* UNUSED(context))
        return 0;
 }
 
-void* check_add_layer(CustomData *src, CustomData *dst, int type, int totelem, 
const char* name)
+static void* check_add_layer(CustomData *src, CustomData *dst, int type, int 
totelem, const char* name)
 {
        void *layer =  CustomData_get_layer_named(dst, type, name);
 
@@ -209,7 +210,7 @@ void* check_add_layer(CustomData *src, CustomData *dst, int 
type, int totelem, c
        }
 }
 
-void *BKE_fracture_custom_data_to_shard(Shard *s, DerivedMesh *dm)
+static void fracture_custom_data_to_shard(Shard *s, DerivedMesh *dm)
 {
        CustomData_reset(&s->vertData);
        CustomData_reset(&s->loopData);
@@ -445,11 +446,11 @@ float BKE_shard_calc_minmax(Shard *shard)
        return len_v3(diff);
 }
 
-Shard* BKE_fracture_initial_shard_create(DerivedMesh *dm)
+static Shard* fracture_initial_shard_create(Mesh *dm)
 {
        /* create temporary shard covering the entire mesh */
-       Shard *s = BKE_create_fracture_shard(dm->getVertArray(dm), 
dm->getPolyArray(dm), dm->getLoopArray(dm), dm->getEdgeArray(dm),
-                                            dm->numVertData, dm->numPolyData, 
dm->numLoopData, dm->numEdgeData, true);
+    Shard *s = BKE_create_fracture_shard(dm->mvert, dm->mpoly, dm->mloop, 
dm->medge,
+                                         dm->totvert, dm->totpoly, 
dm->totloop, dm->totedge, true);
     BKE_custom_data_to_shard(s, dm);
        s->flag = SHARD_INTACT;
        s->shard_id = -2;
@@ -544,7 +545,7 @@ Shard *BKE_create_fracture_shard(MVert *mvert, MPoly 
*mpoly, MLoop *mloop, MEdge
        return shard;
 }
 
-FracMesh *BKE_fracture_fracmesh_create()
+static FracMesh *fracture_fracmesh_create(void)
 {
        FracMesh *fmesh;
        
@@ -668,7 +669,7 @@ static void handle_fast_bisect(FracMesh *fm, int 
expected_shards, int algorithm,
 
                        /* continue splitting if not all expected shards exist 
yet */
                        if ((i + 2) < expected_shards) {
-                *bm_parent = BKE_fracture_shard_to_bmesh((*tempresults)[j]);
+                *bm_parent = fracture_shard_to_bmesh((*tempresults)[j]);
                                copy_v3_v3(centroid, 
(*tempresults)[j]->centroid);
                                sub_v3_v3v3(dim, (*tempresults)[j]->max, 
(*tempresults)[j]->min);
 
@@ -680,9 +681,9 @@ static void handle_fast_bisect(FracMesh *fm, int 
expected_shards, int algorithm,
        }
 }
 
-static void handle_boolean_fractal(Shard* p, Shard* t, int expected_shards, 
DerivedMesh* dm_parent, Object *obj, short inner_material_index,
+static void handle_boolean_fractal(Shard* t, int expected_shards, Mesh* 
dm_parent, Object *obj, short inner_material_index,
                                    int num_cuts, float fractal, int 
num_levels, bool smooth,int parent_id, int* i, Shard ***tempresults,
-                        

@@ 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