[Bf-blender-cvs] [f0b3b6710c6] blender-v2.93-release: Fix T91060: GPencil Time Offset Modifier breaks evaluation time

Philipp Oeser noreply at git.blender.org
Mon Sep 6 09:40:34 CEST 2021


Commit: f0b3b6710c6ae66121deb6d8fd5ee95194b1a643
Author: Philipp Oeser
Date:   Tue Aug 31 11:40:02 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rBf0b3b6710c6ae66121deb6d8fd5ee95194b1a643

Fix T91060: GPencil Time Offset Modifier breaks evaluation time

Caused by {rBf3bf87e5887c}.

When using a GPencil Time Offset Modifier, the bGPDlayer>actframe can be
NULL. This can be determined though, but above optimization commit
skipped getting the active frame in this case entirely (with the
intention to only get it if framenumbers did not match).

Now also call BKE_gpencil_layer_frame_get() if actframe is NULL in order
to fetch a valid one if present.

Maniphest Tasks: T91060

Differential Revision: https://developer.blender.org/D12355

===================================================================

M	source/blender/blenkernel/intern/gpencil_modifier.c

===================================================================

diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 16386cac029..3222689ef57 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -660,7 +660,7 @@ static void gpencil_copy_activeframe_to_eval(
       bGPDframe *gpf_orig = gpl_orig->actframe;
 
       int remap_cfra = gpencil_remap_time_get(depsgraph, scene, ob, gpl_orig);
-      if (gpf_orig && gpf_orig->framenum != remap_cfra) {
+      if ((gpf_orig == NULL) || (gpf_orig && gpf_orig->framenum != remap_cfra)) {
         gpf_orig = BKE_gpencil_layer_frame_get(gpl_orig, remap_cfra, GP_GETFRAME_USE_PREV);
       }



More information about the Bf-blender-cvs mailing list