Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh_tangent.c
| Show First 20 Lines • Show All 718 Lines • ▼ Show 20 Lines | #ifdef USE_LOOPTRI_DETECT_QUADS | ||||
| } | } | ||||
| # undef USE_LOOPTRI_DETECT_QUADS | # undef USE_LOOPTRI_DETECT_QUADS | ||||
| #endif | #endif | ||||
| *tangent_mask_curr_p = tangent_mask_curr; | *tangent_mask_curr_p = tangent_mask_curr; | ||||
| /* Update active layer index */ | /* Update active layer index */ | ||||
| int act_uv_index = CustomData_get_layer_index_n(loopdata, CD_MLOOPUV, act_uv_n); | int act_uv_index = (act_uv_n != -1) ? | ||||
| CustomData_get_layer_index_n(loopdata, CD_MLOOPUV, act_uv_n) : | |||||
| -1; | |||||
| if (act_uv_index != -1) { | if (act_uv_index != -1) { | ||||
| int tan_index = CustomData_get_named_layer_index( | int tan_index = CustomData_get_named_layer_index( | ||||
| loopdata, CD_TANGENT, loopdata->layers[act_uv_index].name); | loopdata, CD_TANGENT, loopdata->layers[act_uv_index].name); | ||||
| CustomData_set_layer_active_index(loopdata, CD_TANGENT, tan_index); | CustomData_set_layer_active_index(loopdata, CD_TANGENT, tan_index); | ||||
| } /* else tangent has been built from orco */ | } /* else tangent has been built from orco */ | ||||
| /* Update render layer index */ | /* Update render layer index */ | ||||
| int ren_uv_index = CustomData_get_layer_index_n(loopdata, CD_MLOOPUV, ren_uv_n); | int ren_uv_index = (ren_uv_n != -1) ? | ||||
| CustomData_get_layer_index_n(loopdata, CD_MLOOPUV, ren_uv_n) : | |||||
| -1; | |||||
| if (ren_uv_index != -1) { | if (ren_uv_index != -1) { | ||||
| int tan_index = CustomData_get_named_layer_index( | int tan_index = CustomData_get_named_layer_index( | ||||
| loopdata, CD_TANGENT, loopdata->layers[ren_uv_index].name); | loopdata, CD_TANGENT, loopdata->layers[ren_uv_index].name); | ||||
| CustomData_set_layer_render_index(loopdata, CD_TANGENT, tan_index); | CustomData_set_layer_render_index(loopdata, CD_TANGENT, tan_index); | ||||
| } /* else tangent has been built from orco */ | } /* else tangent has been built from orco */ | ||||
| } | } | ||||
| } | } | ||||
| Show All 29 Lines | |||||