FCurve: only calculate single axis length

Was calculating all 3
This commit is contained in:
Campbell Barton 2018-03-02 12:43:41 +11:00
parent 341ab45f7b
commit 7e4c23e4d7
Notes: blender-bot 2023-07-10 10:12:37 +02:00
Referenced by issue #54240, Node editor: replacing connection to principled BSDF clearcoat normal sends old connection to clearcoat weight
1 changed files with 3 additions and 5 deletions

View File

@ -1590,11 +1590,9 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
return 0.0f;
}
else if (dtar->transChan >= DTAR_TRANSCHAN_SCALEX) {
/* extract scale, and choose the right axis */
float scale[3];
mat4_to_size(scale, mat);
return scale[dtar->transChan - DTAR_TRANSCHAN_SCALEX];
/* Extract scale, and choose the right axis,
* inline 'mat4_to_size'. */
return len_v3(mat[dtar->transChan - DTAR_TRANSCHAN_SCALEX]);
}
else if (dtar->transChan >= DTAR_TRANSCHAN_ROTX) {
/* extract rotation as eulers (if needed)