Fix T103234: GPencil applying armature does not work

The problem was the bake function was using the evaluated
data and must use the original data.

The problem was caused by commit: rBcff6eb65804d: Cleanup: Remove duplicate Bake modifier code.

Fix by Philipp Oeser
This commit is contained in:
Antonio Vazquez
2022-12-15 10:52:58 +01:00
parent ba347d7c9e
commit e0ef5f3602

View File

@@ -118,14 +118,12 @@ static void bakeModifier(Main *UNUSED(bmain),
GpencilModifierData *md,
Object *ob)
{
Object *object_eval = DEG_get_evaluated_object(depsgraph, ob);
ArmatureGpencilModifierData *mmd = (ArmatureGpencilModifierData *)md;
GpencilModifierData *md_eval = BKE_gpencil_modifiers_findby_name(object_eval, md->name);
if (mmd->object == NULL) {
return;
}
generic_bake_deform_stroke(depsgraph, md_eval, object_eval, true, deformStroke);
generic_bake_deform_stroke(depsgraph, md, ob, true, deformStroke);
}
static bool isDisabled(GpencilModifierData *md, int UNUSED(userRenderParams))