Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object.c
| Show First 20 Lines • Show All 3,032 Lines • ▼ Show 20 Lines | if (ob->recalc & OB_RECALC_DATA) { | ||||
| if (!(ob->shapeflag & OB_SHAPE_LOCK)) | if (!(ob->shapeflag & OB_SHAPE_LOCK)) | ||||
| BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS); | BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS); | ||||
| } | } | ||||
| /* includes all keys and modifiers */ | /* includes all keys and modifiers */ | ||||
| switch (ob->type) { | switch (ob->type) { | ||||
| case OB_MESH: | case OB_MESH: | ||||
| { | { | ||||
| if (eval_ctx->mode == DAG_EVAL_RENDER && | |||||
| (DAG_get_eval_flags_for_object(scene, ob) & DAG_EVAL_NEED_DM_FOR_RENDER) == 0) | |||||
| { | |||||
| /* Do nothing, derivedFinal is not needed by rendered object itself, | |||||
| * plus it's not gonna to be needed by any other modifier/constraint. | |||||
campbellbarton: Would be good to have some debuging way to know if the derivedFinal *is* used by the render… | |||||
| */ | |||||
| } | |||||
| else { | |||||
| BMEditMesh *em = (ob == scene->obedit) ? BKE_editmesh_from_object(ob) : NULL; | BMEditMesh *em = (ob == scene->obedit) ? BKE_editmesh_from_object(ob) : NULL; | ||||
| uint64_t data_mask = scene->customdata_mask | CD_MASK_BAREMESH; | uint64_t data_mask = scene->customdata_mask | CD_MASK_BAREMESH; | ||||
| #ifdef WITH_FREESTYLE | #ifdef WITH_FREESTYLE | ||||
| /* make sure Freestyle edge/face marks appear in DM for render (see T40315) */ | /* make sure Freestyle edge/face marks appear in DM for render (see T40315) */ | ||||
| if (eval_ctx->mode != DAG_EVAL_VIEWPORT) { | if (eval_ctx->mode != DAG_EVAL_VIEWPORT) { | ||||
| data_mask |= CD_MASK_FREESTYLE_EDGE | CD_MASK_FREESTYLE_FACE; | data_mask |= CD_MASK_FREESTYLE_EDGE | CD_MASK_FREESTYLE_FACE; | ||||
| } | } | ||||
| #endif | #endif | ||||
| if (em) { | if (em) { | ||||
| makeDerivedMesh(scene, ob, em, data_mask, 0); /* was CD_MASK_BAREMESH */ | makeDerivedMesh(scene, ob, em, data_mask, 0); /* was CD_MASK_BAREMESH */ | ||||
| } | } | ||||
| else { | else { | ||||
| makeDerivedMesh(scene, ob, NULL, data_mask, 0); | makeDerivedMesh(scene, ob, NULL, data_mask, 0); | ||||
| } | } | ||||
| } | |||||
| break; | break; | ||||
| } | } | ||||
| case OB_ARMATURE: | case OB_ARMATURE: | ||||
| if (ob->id.lib && ob->proxy_from) { | if (ob->id.lib && ob->proxy_from) { | ||||
| if (BKE_pose_copy_result(ob->pose, ob->proxy_from->pose) == false) { | if (BKE_pose_copy_result(ob->pose, ob->proxy_from->pose) == false) { | ||||
| printf("Proxy copy error, lib Object: %s proxy Object: %s\n", | printf("Proxy copy error, lib Object: %s proxy Object: %s\n", | ||||
| ob->id.name + 2, ob->proxy_from->id.name + 2); | ob->id.name + 2, ob->proxy_from->id.name + 2); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 926 Lines • Show Last 20 Lines | |||||
Would be good to have some debuging way to know if the derivedFinal *is* used by the render (pink cube or so :D...).
Issue is this could fail and be annoying to track down each time.