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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-11-12 19:21:21 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-11-12 19:33:07 +0300
commit111e2f5abacc0d93b83de66d1cde8f37e60f1395 (patch)
treeeea07469b2dc972262b9009e691cd029eaa36f48 /intern/cycles/app/cycles_xml.cpp
parentb5a58507f2b01be86af63815f6e784b7952903c3 (diff)
Fix T49904: Cycles standalone missing default generated texture coordinates.
Diffstat (limited to 'intern/cycles/app/cycles_xml.cpp')
-rw-r--r--intern/cycles/app/cycles_xml.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index b3be07fce48..29a68bf272e 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -395,7 +395,7 @@ static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node)
int shader = 0;
bool smooth = state.smooth;
- /* read vertices and polygons, RIB style */
+ /* read vertices and polygons */
vector<float3> P;
vector<float> UV;
vector<int> verts, nverts;
@@ -521,8 +521,12 @@ static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node)
sdparams.objecttoworld = state.tfm;
}
- /* temporary for test compatibility */
- mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
+ /* we don't yet support arbitrary attributes, for now add vertex
+ * coordinates as generated coordinates if requested */
+ if (mesh->need_attribute(state.scene, ATTR_STD_GENERATED)) {
+ Attribute *attr = mesh->attributes.add(ATTR_STD_GENERATED);
+ memcpy(attr->data_float3(), mesh->verts.data(), sizeof(float3)*mesh->verts.size());
+ }
}
/* Light */