Fix cycles crash with normal map node, issue with tangent sign attribute.

This commit is contained in:
2012-11-06 21:27:59 +00:00
parent 4496b9004c
commit d68981158b
2 changed files with 3 additions and 3 deletions

View File

@@ -302,11 +302,11 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
/* UV tangent */
std = (active_render)? ATTR_STD_UV_TANGENT: ATTR_STD_NONE;
name = ustring((string(name.c_str()) + ".tangent").c_str());
name = ustring((string(l->name().c_str()) + ".tangent").c_str());
if(mesh->need_attribute(scene, name) || mesh->need_attribute(scene, std)) {
std = (active_render)? ATTR_STD_UV_TANGENT_SIGN: ATTR_STD_NONE;
name = ustring((string(name.c_str()) + ".tangent_sign").c_str());
name = ustring((string(l->name().c_str()) + ".tangent_sign").c_str());
bool need_sign = (mesh->need_attribute(scene, name) || mesh->need_attribute(scene, std));
mikk_compute_tangents(b_mesh, *l, mesh, nverts, need_sign, active_render);