Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Werner <stefan.werner@tangent-animation.com>2019-03-05 17:25:36 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2019-03-05 17:29:50 +0300
commit304a89eccfff0b2f8132013c2c4ccca60ec69fbd (patch)
tree5564954a727774834565b9c293638d0ceefda3c4 /intern/cycles/app
parentdb7f9a70b0addd17a2f8a8d87c0b4d77d78b536e (diff)
Cycles: Changed standalone XML parser to read UV as float2
Diffstat (limited to 'intern/cycles/app')
-rw-r--r--intern/cycles/app/cycles_xml.cpp8
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;
}