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.
This commit is contained in:
parent
99c5146e9a
commit
9eb1d62ba6
Notes:
blender-bot
2023-02-14 11:21:40 +01:00
Referenced by issue #102638, GPencil: Modifier added on linked object restore its value on reloading the file
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue