Fix T63399: Obj exporter does not respect "Apply Modifiers" settings
This commit is contained in:
@@ -869,7 +869,7 @@ Mesh *BKE_mesh_new_from_object(
|
|||||||
|
|
||||||
Object *object_input = ob;
|
Object *object_input = ob;
|
||||||
Object *object_eval = DEG_get_evaluated_object(depsgraph, object_input);
|
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) {
|
if (object_eval == object_input) {
|
||||||
/* Evaluated mesh contains all modifiers applied already.
|
/* Evaluated mesh contains all modifiers applied already.
|
||||||
@@ -882,13 +882,18 @@ Mesh *BKE_mesh_new_from_object(
|
|||||||
else {
|
else {
|
||||||
effective_apply_modifiers = true;
|
effective_apply_modifiers = true;
|
||||||
}
|
}
|
||||||
|
object_for_eval = *object_eval;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (apply_modifiers) {
|
if (apply_modifiers) {
|
||||||
|
object_for_eval = *object_eval;
|
||||||
if (object_for_eval.runtime.mesh_orig != NULL) {
|
if (object_for_eval.runtime.mesh_orig != NULL) {
|
||||||
object_for_eval.data = object_for_eval.runtime.mesh_orig;
|
object_for_eval.data = object_for_eval.runtime.mesh_orig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
object_for_eval = *object_input;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool cage = !effective_apply_modifiers;
|
const bool cage = !effective_apply_modifiers;
|
||||||
|
Reference in New Issue
Block a user