Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object_dupli.c
| Show First 20 Lines • Show All 420 Lines • ▼ Show 20 Lines | /* gather mesh info */ | ||||
| /* We do not need any render-specific handling anymore, depsgraph takes care of that. */ | /* We do not need any render-specific handling anymore, depsgraph takes care of that. */ | ||||
| /* NOTE: Do direct access to the evaluated mesh: this function is used | /* NOTE: Do direct access to the evaluated mesh: this function is used | ||||
| * during meta balls evaluation. But even without those all the objects | * during meta balls evaluation. But even without those all the objects | ||||
| * which are needed for correct instancing are already evaluated. */ | * which are needed for correct instancing are already evaluated. */ | ||||
| if (vdd.edit_mesh != NULL) { | if (vdd.edit_mesh != NULL) { | ||||
| vdd.me_eval = vdd.edit_mesh->mesh_eval_cage; | vdd.me_eval = vdd.edit_mesh->mesh_eval_cage; | ||||
| } | } | ||||
| else { | else { | ||||
| vdd.me_eval = parent->runtime.mesh_eval; | vdd.me_eval = BKE_object_get_evaluated_mesh(parent); | ||||
| } | } | ||||
| if (vdd.me_eval == NULL) { | if (vdd.me_eval == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| vdd.orco = CustomData_get_layer(&vdd.me_eval->vdata, CD_ORCO); | vdd.orco = CustomData_get_layer(&vdd.me_eval->vdata, CD_ORCO); | ||||
| vdd.totvert = vdd.me_eval->totvert; | vdd.totvert = vdd.me_eval->totvert; | ||||
| ▲ Show 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | /* gather mesh info */ | ||||
| /* We do not need any render-smecific handling anymore, depsgraph takes care of that. */ | /* We do not need any render-smecific handling anymore, depsgraph takes care of that. */ | ||||
| /* NOTE: Do direct access to the evaluated mesh: this function is used | /* NOTE: Do direct access to the evaluated mesh: this function is used | ||||
| * during meta balls evaluation. But even without those all the objects | * during meta balls evaluation. But even without those all the objects | ||||
| * which are needed for correct instancing are already evaluated. */ | * which are needed for correct instancing are already evaluated. */ | ||||
| if (em != NULL) { | if (em != NULL) { | ||||
| fdd.me_eval = em->mesh_eval_cage; | fdd.me_eval = em->mesh_eval_cage; | ||||
| } | } | ||||
| else { | else { | ||||
| fdd.me_eval = parent->runtime.mesh_eval; | fdd.me_eval = BKE_object_get_evaluated_mesh(parent); | ||||
| } | } | ||||
| if (fdd.me_eval == NULL) { | if (fdd.me_eval == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| fdd.orco = CustomData_get_layer(&fdd.me_eval->vdata, CD_ORCO); | fdd.orco = CustomData_get_layer(&fdd.me_eval->vdata, CD_ORCO); | ||||
| const int uv_idx = CustomData_get_render_layer(&fdd.me_eval->ldata, CD_MLOOPUV); | const int uv_idx = CustomData_get_render_layer(&fdd.me_eval->ldata, CD_MLOOPUV); | ||||
| ▲ Show 20 Lines • Show All 429 Lines • Show Last 20 Lines | |||||