[Bf-blender-cvs] [6be2aab] fracture_modifier: compile fixes due to merge
Martin Felke
noreply at git.blender.org
Wed Dec 31 14:01:05 CET 2014
Commit: 6be2aab8d6119af26c8b85415e49f605e35150b0
Author: Martin Felke
Date: Wed Dec 31 14:00:22 2014 +0100
Branches: fracture_modifier
https://developer.blender.org/rB6be2aab8d6119af26c8b85415e49f605e35150b0
compile fixes due to merge
===================================================================
M source/blender/blenkernel/intern/fracture.c
M source/blender/blenkernel/intern/rigidbody.c
M source/blender/blenloader/intern/readfile.c
M source/blender/editors/object/object_modifier.c
M source/blender/editors/physics/rigidbody_object.c
M source/blender/modifiers/intern/MOD_fracture.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index dc35850..cd836f6 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -782,7 +782,7 @@ void BKE_fracmesh_free(FracMesh *fm, bool doCustomData)
/* DerivedMesh */
static DerivedMesh *create_dm(FractureModifierData *fmd, bool doCustomData)
{
- int shard_count = fmd->shards_to_islands ? BLI_countlist(&fmd->islandShards) : fmd->frac_mesh->shard_count;
+ int shard_count = fmd->shards_to_islands ? BLI_listbase_count(&fmd->islandShards) : fmd->frac_mesh->shard_count;
ListBase *shardlist;
Shard *shard, *s;
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index ac73ee3..9dbcf18 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -2402,7 +2402,7 @@ static int rigidbody_group_count_items(const ListBase *group, int *r_num_objects
if (isModifierActive(rmd))
{
found_modifiers = true;
- *r_num_shards += BLI_countlist(&rmd->meshIslands);
+ *r_num_shards += BLI_listbase_count(&rmd->meshIslands);
}
}
}
@@ -2652,7 +2652,7 @@ static void rigidbody_update_simulation(Scene *scene, RigidBodyWorld *rbw, bool
if (isModifierActive(rmd)) {
float max_con_mass = 0;
- int count = BLI_countlist(&rmd->meshIslands);
+ int count = BLI_listbase_count(&rmd->meshIslands);
for (mi = rmd->meshIslands.first; mi; mi = mi->next) {
if (mi->rigidbody == NULL) {
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 81ba5aa..718472b 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5056,7 +5056,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
}
link_list(fd, &fmd->meshIslands);
- count = BLI_countlist(&fmd->islandShards);
+ count = BLI_listbase_count(&fmd->islandShards);
if ((fmd->islandShards.first == NULL || count == 0) && fm->shard_count > 0) {
/* oops, a refresh was missing, so disable this flag here better, otherwise
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 9066523..08670dd 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -2522,7 +2522,7 @@ static void convert_modifier_to_objects(ReportList *reports, Scene* scene, Objec
int i = 0;
RigidBodyWorld *rbw = scene->rigidbody_world;
- int count = BLI_countlist(&rmd->meshIslands);
+ int count = BLI_listbase_count(&rmd->meshIslands);
KDTree* objtree = BLI_kdtree_new(count);
Object** objs = MEM_callocN(sizeof(Object*) * count, "convert_objs");
float max_con_mass = 0;
@@ -2745,7 +2745,7 @@ static bool convert_modifier_to_keyframes(FractureModifierData* fmd, Group* gr,
int j = 0;
Object *parent = NULL;
Base *bas = NULL;
- int count = BLI_countlist(&fmd->meshIslands);
+ int count = BLI_listbase_count(&fmd->meshIslands);
const char *name = BLI_strdupcat(ob->id.name, "_p_key");
float diff[3] = {0.0f, 0.0f, 0.0f};
float obloc[3];
@@ -2916,7 +2916,7 @@ static void convert_update(void *customdata)
if ((G.is_break) && (fmd->frac_mesh))
fmd->frac_mesh->cancel = 1;
- progress = (float)(BLI_countlist(&fj->gr->gobject)) / (float)(fj->total_progress);
+ progress = (float)(BLI_listbase_count(&fj->gr->gobject)) / (float)(fj->total_progress);
(*fj->progress) = progress;
}
@@ -2980,7 +2980,7 @@ static int rigidbody_convert_keyframes_exec(bContext *C, wmOperator *op)
}
if (rmd) {
- int count = BLI_countlist(&rmd->meshIslands);
+ int count = BLI_listbase_count(&rmd->meshIslands);
int start = RNA_int_get(op->ptr, "start_frame");
int end = RNA_int_get(op->ptr, "end_frame");
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index 217e208..f4a586e 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -50,6 +50,7 @@
#include "BKE_rigidbody.h"
#include "BKE_DerivedMesh.h"
#include "BKE_cdderivedmesh.h"
+#include "BKE_object.h"
#include "RNA_access.h"
#include "RNA_define.h"
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 9a59a2e..23b51ab 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -1816,7 +1816,7 @@ static int prepareConstraintSearch(FractureModifierData *rmd, MeshIsland ***mesh
MeshIsland *mi;
int i = 0, islands = 0;
- islands = BLI_countlist(&rmd->meshIslands);
+ islands = BLI_listbase_count(&rmd->meshIslands);
*mesh_islands = MEM_reallocN(*mesh_islands, islands * sizeof(MeshIsland *));
for (mi = rmd->meshIslands.first; mi; mi = mi->next) {
(*mesh_islands)[i] = mi;
@@ -1917,7 +1917,7 @@ static DerivedMesh *createCache(FractureModifierData *rmd, Object *ob, DerivedMe
if (rmd->dm && !rmd->shards_to_islands && (rmd->dm->getNumPolys(rmd->dm) > 0)) {
dm = CDDM_copy(rmd->dm);
}
- else if (rmd->visible_mesh && (rmd->visible_mesh->totface > 0) && BLI_countlist(&rmd->meshIslands) > 1) {
+ else if (rmd->visible_mesh && (rmd->visible_mesh->totface > 0) && BLI_listbase_count(&rmd->meshIslands) > 1) {
dm = CDDM_from_bmesh(rmd->visible_mesh, true);
}
@@ -2453,7 +2453,7 @@ static DerivedMesh *doSimulate(FractureModifierData *fmd, Object *ob, DerivedMes
fmd->explo_shared = false;
}
- printf("Islands: %d\n", BLI_countlist(&fmd->meshIslands));
+ printf("Islands: %d\n", BLI_listbase_count(&fmd->meshIslands));
}
start = PIL_check_seconds_timer();
@@ -2530,7 +2530,7 @@ static DerivedMesh *doSimulate(FractureModifierData *fmd, Object *ob, DerivedMes
fmd->refresh_constraints = false;
printf("Building constraints done, %g\n", PIL_check_seconds_timer() - start);
- printf("Constraints: %d\n", BLI_countlist(&fmd->meshConstraints));
+ printf("Constraints: %d\n", BLI_listbase_count(&fmd->meshConstraints));
}
if (fmd->refresh_autohide)
More information about the Bf-blender-cvs
mailing list