Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/cdderivedmesh.c
| Show First 20 Lines • Show All 1,362 Lines • ▼ Show 20 Lines | else if (smoothnormal) { | ||||
| copy_v3_v3_short(&varray[start + 0], mvert[mloop[ltri[0]].v].no); | copy_v3_v3_short(&varray[start + 0], mvert[mloop[ltri[0]].v].no); | ||||
| copy_v3_v3_short(&varray[start + 4], mvert[mloop[ltri[1]].v].no); | copy_v3_v3_short(&varray[start + 4], mvert[mloop[ltri[1]].v].no); | ||||
| copy_v3_v3_short(&varray[start + 8], mvert[mloop[ltri[2]].v].no); | copy_v3_v3_short(&varray[start + 8], mvert[mloop[ltri[2]].v].no); | ||||
| } | } | ||||
| else if (nors) { | else if (nors) { | ||||
| /* copy cached face normal */ | /* copy cached face normal */ | ||||
| short f_no_s[3]; | short f_no_s[3]; | ||||
| normal_float_to_short_v3(f_no_s, nors[i]); | normal_float_to_short_v3(f_no_s, nors[lt->poly]); | ||||
| copy_v3_v3_short(&varray[start + 0], f_no_s); | copy_v3_v3_short(&varray[start + 0], f_no_s); | ||||
| copy_v3_v3_short(&varray[start + 4], f_no_s); | copy_v3_v3_short(&varray[start + 4], f_no_s); | ||||
| copy_v3_v3_short(&varray[start + 8], f_no_s); | copy_v3_v3_short(&varray[start + 8], f_no_s); | ||||
| } | } | ||||
| else { | else { | ||||
| /* calculate face normal */ | /* calculate face normal */ | ||||
| float f_no[3]; | float f_no[3]; | ||||
| ▲ Show 20 Lines • Show All 2,227 Lines • Show Last 20 Lines | |||||