Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object_api.c
| Show First 20 Lines • Show All 524 Lines • ▼ Show 20 Lines | |||||
| /* don't call inside a loop */ | /* don't call inside a loop */ | ||||
| static int mesh_looptri_to_poly_index(Mesh *me_eval, const MLoopTri *lt) | static int mesh_looptri_to_poly_index(Mesh *me_eval, const MLoopTri *lt) | ||||
| { | { | ||||
| const int *index_mp_to_orig = CustomData_get_layer(&me_eval->pdata, CD_ORIGINDEX); | const int *index_mp_to_orig = CustomData_get_layer(&me_eval->pdata, CD_ORIGINDEX); | ||||
| return index_mp_to_orig ? index_mp_to_orig[lt->poly] : lt->poly; | return index_mp_to_orig ? index_mp_to_orig[lt->poly] : lt->poly; | ||||
| } | } | ||||
| /* TOOD(sergey): Make the Python API more clear that evaluation might happen, or requite | /* TODO(sergey): Make the Python API more clear that evaluation might happen, or require | ||||
| * passing fully evaluated depsgraph. */ | * passing fully evaluated depsgraph. */ | ||||
| static Object *eval_object_ensure(Object *ob, | static Object *eval_object_ensure(Object *ob, | ||||
| bContext *C, | bContext *C, | ||||
| ReportList *reports, | ReportList *reports, | ||||
| PointerRNA *rnaptr_depsgraph) | PointerRNA *rnaptr_depsgraph) | ||||
| { | { | ||||
| if (ob->runtime.data_eval == NULL) { | if (ob->runtime.data_eval == NULL) { | ||||
| Object *ob_orig = ob; | Object *ob_orig = ob; | ||||
| ▲ Show 20 Lines • Show All 742 Lines • Show Last 20 Lines | |||||