optimized blenloader for loops #106573

Closed
glitchy-virophage wants to merge 31 commits from (deleted):main into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 9 additions and 5 deletions
Showing only changes of commit 2d8d65520b - Show all commits

View File

@ -255,12 +255,16 @@ static void vector_curve_node_remap(bNode *node)
CurveMapping *mapping = node->storage;
mapping->flag &= ~CUMA_DO_CLIP;
for (int curve_index = 0; curve_index < CM_TOT; curve_index++) {
CurveMap *cm = &mapping->cm[curve_index];
int change1;
for (int curve_index = CM_TOT; --curve_index) {
change = (CM_TOT - curve_index);
CurveMap *cm = &mapping->cm[change];
if (cm->curve) {
for (int i = 0; i < cm->totpoint; i++) {
cm->curve[i].x = (cm->curve[i].x * 2.0f) - 1.0f;
cm->curve[i].y = (cm->curve[i].y - 0.5f) * 2.0f;
int change2;
for (int i = cm->totpoint; --i) {
change2 = (cm->totpoint - i);
cm->curve[change].x = (cm->curve[change].x * 2.0f) - 1.0f;
cm->curve[chnage].y = (cm->curve[change].y - 0.5f) * 2.0f;
}
}
}