Fix T63399: Obj exporter does not respect "Apply Modifiers" settings

This commit is contained in:
Sergey Sharybin 2019-04-08 21:21:09 +02:00
parent 12417fcbf6
commit df26f28835
Notes: blender-bot 2023-02-14 06:00:51 +01:00
Referenced by issue #63399, Obj exporter does not respect "Apply Modifiers" settings
Referenced by issue #63345, changing scene and applying modifiers
1 changed files with 6 additions and 1 deletions

View File

@ -869,7 +869,7 @@ Mesh *BKE_mesh_new_from_object(
Object *object_input = ob;
Object *object_eval = DEG_get_evaluated_object(depsgraph, object_input);
Object object_for_eval = *object_eval;
Object object_for_eval;
if (object_eval == object_input) {
/* Evaluated mesh contains all modifiers applied already.
@ -882,13 +882,18 @@ Mesh *BKE_mesh_new_from_object(
else {
effective_apply_modifiers = true;
}
object_for_eval = *object_eval;
}
else {
if (apply_modifiers) {
object_for_eval = *object_eval;
if (object_for_eval.runtime.mesh_orig != NULL) {
object_for_eval.data = object_for_eval.runtime.mesh_orig;
}
}
else {
object_for_eval = *object_input;
}
}
const bool cage = !effective_apply_modifiers;