diff options
author | Stefan Werner <stefan.werner@tangent-animation.com> | 2019-03-05 17:25:36 +0300 |
---|---|---|
committer | Stefan Werner <stefan.werner@tangent-animation.com> | 2019-03-05 17:29:50 +0300 |
commit | 304a89eccfff0b2f8132013c2c4ccca60ec69fbd (patch) | |
tree | 5564954a727774834565b9c293638d0ceefda3c4 /intern/cycles | |
parent | db7f9a70b0addd17a2f8a8d87c0b4d77d78b536e (diff) |
Cycles: Changed standalone XML parser to read UV as float2
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/app/cycles_xml.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp index 895a83818df..d4ee284e24b 100644 --- a/intern/cycles/app/cycles_xml.cpp +++ b/intern/cycles/app/cycles_xml.cpp @@ -442,7 +442,7 @@ static void xml_read_mesh(const XMLReadState& state, xml_node node) if(xml_read_float_array(UV, node, "UV")) { ustring name = ustring("UVMap"); Attribute *attr = mesh->attributes.add(ATTR_STD_UV, name); - float3 *fdata = attr->data_float3(); + float2 *fdata = attr->data_float2(); /* loop over the triangles */ index_offset = 0; @@ -456,9 +456,9 @@ static void xml_read_mesh(const XMLReadState& state, xml_node node) assert(v1*2+1 < (int)UV.size()); assert(v2*2+1 < (int)UV.size()); - fdata[0] = make_float3(UV[v0*2], UV[v0*2+1], 0.0); - fdata[1] = make_float3(UV[v1*2], UV[v1*2+1], 0.0); - fdata[2] = make_float3(UV[v2*2], UV[v2*2+1], 0.0); + fdata[0] = make_float2(UV[v0*2], UV[v0*2+1]); + fdata[1] = make_float2(UV[v1*2], UV[v1*2+1]); + fdata[2] = make_float2(UV[v2*2], UV[v2*2+1]); fdata += 3; } |