[Bf-blender-cvs] [111e2f5] master: Fix T49904: Cycles standalone missing default generated texture coordinates.
Brecht Van Lommel
noreply at git.blender.org
Sat Nov 12 17:33:56 CET 2016
Commit: 111e2f5abacc0d93b83de66d1cde8f37e60f1395
Author: Brecht Van Lommel
Date: Sat Nov 12 17:21:21 2016 +0100
Branches: master
https://developer.blender.org/rB111e2f5abacc0d93b83de66d1cde8f37e60f1395
Fix T49904: Cycles standalone missing default generated texture coordinates.
===================================================================
M intern/cycles/app/cycles_xml.cpp
===================================================================
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index b3be07f..29a68bf 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 */
More information about the Bf-blender-cvs
mailing list