Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/subdiv_eval.c
| Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| bool BKE_subdiv_eval_refine_from_mesh(Subdiv *subdiv, | bool BKE_subdiv_eval_refine_from_mesh(Subdiv *subdiv, | ||||
| const Mesh *mesh, | const Mesh *mesh, | ||||
| const float (*coarse_vertex_cos)[3]) | const float (*coarse_vertex_cos)[3]) | ||||
| { | { | ||||
| if (subdiv->evaluator == NULL) { | if (subdiv->evaluator == NULL) { | ||||
| /* NOTE: This situation is supposed to be handled by begin(). */ | /* NOTE: This situation is supposed to be handled by begin(). */ | ||||
| BLI_assert(!"Is not supposed to happen"); | BLI_assert_msg(0, "Is not supposed to happen"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* Set coordinates of base mesh vertices. */ | /* Set coordinates of base mesh vertices. */ | ||||
| set_coarse_positions(subdiv, mesh, coarse_vertex_cos); | set_coarse_positions(subdiv, mesh, coarse_vertex_cos); | ||||
| /* Set face-varyign data to UV maps. */ | /* Set face-varyign data to UV maps. */ | ||||
| const int num_uv_layers = CustomData_number_of_layers(&mesh->ldata, CD_MLOOPUV); | const int num_uv_layers = CustomData_number_of_layers(&mesh->ldata, CD_MLOOPUV); | ||||
| for (int layer_index = 0; layer_index < num_uv_layers; layer_index++) { | for (int layer_index = 0; layer_index < num_uv_layers; layer_index++) { | ||||
| const MLoopUV *mloopuv = CustomData_get_layer_n(&mesh->ldata, CD_MLOOPUV, layer_index); | const MLoopUV *mloopuv = CustomData_get_layer_n(&mesh->ldata, CD_MLOOPUV, layer_index); | ||||
| ▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines | |||||