Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/anim_path.c
| Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | if (cur_idx == 0) { | ||||
| *r_idx = 0; | *r_idx = 0; | ||||
| *r_frac = goal_len / accum_len_arr[0]; | *r_frac = goal_len / accum_len_arr[0]; | ||||
| return true; | return true; | ||||
| } | } | ||||
| if (UNLIKELY(cur_step == 0)) { | if (UNLIKELY(cur_step == 0)) { | ||||
| /* This should never happen unless there is something horribly wrong. */ | /* This should never happen unless there is something horribly wrong. */ | ||||
| CLOG_ERROR(&LOG, "Couldn't find any valid point on the animation path!"); | CLOG_ERROR(&LOG, "Couldn't find any valid point on the animation path!"); | ||||
| BLI_assert(!"Couldn't find any valid point on the animation path!"); | BLI_assert_msg(0, "Couldn't find any valid point on the animation path!"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| if (left_len < goal_len) { | if (left_len < goal_len) { | ||||
| /* Go to the right. */ | /* Go to the right. */ | ||||
| cur_base = cur_idx + 1; | cur_base = cur_idx + 1; | ||||
| cur_step--; | cur_step--; | ||||
| } /* Else, go to the left. */ | } /* Else, go to the left. */ | ||||
| ▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines | |||||