Fix #146252: Grease Pencil: Tag ID update after convert from text

Same situation as in #138793, so same solution as 1cb20d444e

Converting from text (via legacy curves) to grease pencil with "Keep
Original" option enabled can cause the new grease pencil ID to not be
evaluated, leading to an situation where a evaluated grease pencil
object would point to the original legacy curve ID as its object data.
This fix added a depsgraph tag so it ensures the COW ID is the latest.

Pull Request: https://projects.blender.org/blender/blender/pulls/146314
This commit is contained in:
Philipp Oeser
2025-09-16 09:05:51 +02:00
committed by Philipp Oeser
parent c3688e9d05
commit d980cea379

View File

@@ -3757,6 +3757,11 @@ static Object *convert_font_to_grease_pencil(Base &base,
/* We don't need the intermediate font/curve data ID any more. */
BKE_id_delete(info.bmain, legacy_curve_id);
/* For some reason this must be called, otherwise evaluated id_cow will still be the original
* curves id (and that seems to only happen if "Keep Original" is enabled, and only with this
* specific conversion combination), not sure why. Ref: #138793 / #146252 */
DEG_id_tag_update(&grease_pencil->id, ID_RECALC_GEOMETRY);
BKE_id_free(nullptr, curves_nomain);
return curve_ob;
@@ -3864,7 +3869,7 @@ static Object *convert_curves_legacy_to_grease_pencil(Base &base,
/* For some reason this must be called, otherwise evaluated id_cow will still be the original
* curves id (and that seems to only happen if "Keep Original" is enabled, and only with this
* specific conversion combination), not sure why. Ref: #138793 */
* specific conversion combination), not sure why. Ref: #138793 / #146252 */
DEG_id_tag_update(&grease_pencil->id, ID_RECALC_GEOMETRY);
BKE_id_free(nullptr, curves_nomain);