forked from bartvdbraak/blender
while looking into [#27057] noticed when the view and the transform center are 0,0,0 it gives NAN values.
This commit is contained in:
parent
e0a81dd1a8
commit
0da889dff5
@ -244,6 +244,12 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
|
||||
sub_v3_v3v3(v, i2, v);
|
||||
|
||||
sub_v3_v3v3(out, i1, t->con.center);
|
||||
|
||||
/* possible some values become nan when
|
||||
* viewpoint and object are both zero */
|
||||
if(!finite(out[0])) out[0]= 0.0f;
|
||||
if(!finite(out[1])) out[1]= 0.0f;
|
||||
if(!finite(out[2])) out[2]= 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user