Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index df6534946fd..20107aa41a8 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1409,7 +1409,7 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup
if (scene && (duplis-- > 0) && (ob->transflag & OB_DUPLI)) {
ListBase *lb_dupli_ob;
/* don't update the dupli groups, we only want their pid's */
- if ((lb_dupli_ob = object_duplilist_ex(G.main->eval_ctx, scene, ob, FALSE))) {
+ if ((lb_dupli_ob = object_duplilist_ex(G.main->eval_ctx, scene, ob, false))) {
DupliObject *dob;
for (dob= lb_dupli_ob->first; dob; dob= dob->next) {
if (dob->ob != ob) { /* avoids recursive loops with dupliframes: bug 22988 */
@@ -3039,7 +3039,7 @@ void BKE_ptcache_free_list(ListBase *ptcaches)
}
}
-static PointCache *ptcache_copy(PointCache *cache, int copy_data)
+static PointCache *ptcache_copy(PointCache *cache, bool copy_data)
{
PointCache *ncache;
@@ -3047,7 +3047,7 @@ static PointCache *ptcache_copy(PointCache *cache, int copy_data)
BLI_listbase_clear(&ncache->mem_cache);
- if (copy_data == FALSE) {
+ if (copy_data == false) {
ncache->cached_frames = NULL;
/* flag is a mix of user settings and simulator/baking state */
@@ -3082,7 +3082,7 @@ static PointCache *ptcache_copy(PointCache *cache, int copy_data)
}
/* returns first point cache */
-PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old, int copy_data)
+PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old, bool copy_data)
{
PointCache *cache = ptcaches_old->first;
@@ -3144,7 +3144,8 @@ static void ptcache_dt_to_str(char *str, double dtime)
static void *ptcache_bake_thread(void *ptr)
{
- int use_timer = FALSE, sfra, efra;
+ bool use_timer = false;
+ int sfra, efra;
double stime, ptime, ctime, fetd;
char run[32], cur[32], etd[32];
@@ -3165,7 +3166,7 @@ static void *ptcache_bake_thread(void *ptr)
fetd = (ctime-ptime)*(efra-*data->cfra_ptr)/data->step;
if (use_timer || fetd > 60.0) {
- use_timer = TRUE;
+ use_timer = true;
ptcache_dt_to_str(cur, ctime-ptime);
ptcache_dt_to_str(run, ctime-stime);
@@ -3183,7 +3184,7 @@ static void *ptcache_bake_thread(void *ptr)
printf("\nBake %s %s (%i frames simulated).\n", (data->break_operation ? "canceled after" : "finished in"), run, *data->cfra_ptr-sfra);
}
- data->thread_ended = TRUE;
+ data->thread_ended = true;
return NULL;
}
@@ -3212,7 +3213,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
thread_data.scene = baker->scene;
thread_data.main = baker->main;
- G.is_break = FALSE;
+ G.is_break = false;
/* set caches to baking mode and figure out start frame */
if (pid) {
@@ -3304,8 +3305,8 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
CFRA = startframe;
scene->r.framelen = 1.0;
- thread_data.break_operation = FALSE;
- thread_data.thread_ended = FALSE;
+ thread_data.break_operation = false;
+ thread_data.thread_ended = false;
old_progress = -1;
WM_cursor_wait(1);
@@ -3317,7 +3318,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
BLI_init_threads(&threads, ptcache_bake_thread, 1);
BLI_insert_thread(&threads, (void*)&thread_data);
- while (thread_data.thread_ended == FALSE) {
+ while (thread_data.thread_ended == false) {
if (bake)
progress = (int)(100.0f * (float)(CFRA - startframe)/(float)(thread_data.endframe-startframe));
@@ -3335,7 +3336,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
/* NOTE: breaking baking should leave calculated frames in cache, not clear it */
if (blender_test_break() && !thread_data.break_operation) {
- thread_data.break_operation = TRUE;
+ thread_data.break_operation = true;
if (baker->progressend)
baker->progressend(baker->progresscontext);
WM_cursor_wait(1);