Cleanup: Use more meaningful names and move calculation into am if statement
This commit is contained in:
parent
a80977cd21
commit
86e0485b2e
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue