[Bf-blender-cvs] [9eb1d62ba60] blender-v3.4-release: Fix T102638: GPencil: Modifier added on linked object restore its value on reloading the file

Bastien Montagne noreply at git.blender.org
Mon Nov 28 17:11:33 CET 2022


Commit: 9eb1d62ba60a084b5305c39a007f7b74679401c9
Author: Bastien Montagne
Date:   Mon Nov 28 17:10:02 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB9eb1d62ba60a084b5305c39a007f7b74679401c9

Fix T102638: GPencil: Modifier added on linked object restore its value on reloading the file

One line missing in code handling overrides insertions of gpencil
modifiers...

Fix also suitable for 3.3LTS.

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

M	source/blender/makesrna/intern/rna_object.c

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

diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index fc0631c7043..08500a0b984 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -323,6 +323,7 @@ const EnumPropertyItem rna_enum_object_axis_items[] = {
 #  include "BKE_deform.h"
 #  include "BKE_effect.h"
 #  include "BKE_global.h"
+#  include "BKE_gpencil_modifier.h"
 #  include "BKE_key.h"
 #  include "BKE_material.h"
 #  include "BKE_mesh.h"
@@ -1949,6 +1950,8 @@ bool rna_Object_greasepencil_modifiers_override_apply(Main *bmain,
   GpencilModifierData *mod_dst = ED_object_gpencil_modifier_add(
       NULL, bmain, NULL, ob_dst, mod_src->name, mod_src->type);
 
+  BKE_gpencil_modifier_copydata(mod_src, mod_dst);
+
   BLI_remlink(&ob_dst->greasepencil_modifiers, mod_dst);
   /* This handles NULL anchor as expected by adding at head of list. */
   BLI_insertlinkafter(&ob_dst->greasepencil_modifiers, mod_anchor, mod_dst);



More information about the Bf-blender-cvs mailing list