diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-26 14:57:46 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-26 14:58:17 +0300 |
commit | 86e0485b2e5e02bbe5465e051afebea9e7838605 (patch) | |
tree | 27b8a7a301e4240772500769d40104bc4439a178 /source/blender/blenkernel | |
parent | a80977cd213d1a158f4292b9809c85a5b2a7a699 (diff) |
Cleanup: Use more meaningful names and move calculation into am if statement
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 13 |
2 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index aebd564ca58..3bc81a69c86 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -617,9 +617,9 @@ void BKE_pose_eval_bone(EvaluationContext *UNUSED(eval_ctx), /* pass */ } else { - /* TODO(sergey): Use time source node for time. */ - float ctime = BKE_scene_frame_get(scene); /* not accurate... */ if ((pchan->flag & POSE_DONE) == 0) { + /* TODO(sergey): Use time source node for time. */ + float ctime = BKE_scene_frame_get(scene); /* not accurate... */ BKE_pose_where_is_bone(scene, ob, pchan, ctime, 1); } } @@ -641,8 +641,8 @@ void BKE_pose_constraints_evaluate(EvaluationContext *UNUSED(eval_ctx), /* IK are being solved separately/ */ } else { - float ctime = BKE_scene_frame_get(scene); /* not accurate... */ if ((pchan->flag & POSE_DONE) == 0) { + float ctime = BKE_scene_frame_get(scene); /* not accurate... */ BKE_pose_where_is_bone(scene, ob, pchan, ctime, 1); } } diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index e610c56b28f..847884e08b7 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1561,8 +1561,8 @@ static void print_threads_statistics(ThreadedObjectUpdateState *state) tot_thread = BLI_system_thread_count(); for (i = 0; i < tot_thread; i++) { - int total_objects = 0; - double total_time = 0.0; + int thread_total_objects = 0; + double thread_total_time = 0.0; StatisicsEntry *entry; if (state->has_updated_objects) { @@ -1571,11 +1571,14 @@ static void print_threads_statistics(ThreadedObjectUpdateState *state) entry; entry = entry->next) { - total_objects++; - total_time += entry->duration; + thread_total_objects++; + thread_total_time += entry->duration; } - printf("Thread %d: total %d objects in %f sec.\n", i, total_objects, total_time); + printf("Thread %d: total %d objects in %f sec.\n", + i, + thread_total_objects, + thread_total_time); for (entry = state->statistics[i].first; entry; |