Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2020-11-12 11:26:20 +0300
committerSergey Sharybin <sergey@blender.org>2020-11-12 11:26:20 +0300
commitde6cee4fc1913982b0b2bd786bfd813c935bbe73 (patch)
treea726c0c63bbd1d6c47c90c32119ce14c8048cddc /source/blender/editors/object/object_gpencil_modifier.c
parente4d432500a0e2f978fe019da43deb843da405032 (diff)
parent88bb29dea668df8cc46aa7f55895f229748bdbb4 (diff)
Merge branch 'master' into codesign_error_tracker
Diffstat (limited to 'source/blender/editors/object/object_gpencil_modifier.c')
-rw-r--r--source/blender/editors/object/object_gpencil_modifier.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_gpencil_modifier.c b/source/blender/editors/object/object_gpencil_modifier.c
index 575ef38476c..eed3c7f419d 100644
--- a/source/blender/editors/object/object_gpencil_modifier.c
+++ b/source/blender/editors/object/object_gpencil_modifier.c
@@ -228,6 +228,9 @@ bool ED_object_gpencil_modifier_move_to_index(ReportList *reports,
}
}
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
+ WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
+
return true;
}
@@ -319,6 +322,13 @@ int ED_object_gpencil_modifier_copy(ReportList *reports, Object *ob, GpencilModi
return 1;
}
+void ED_object_gpencil_modifier_copy_to_object(Object *ob_dst, GpencilModifierData *md)
+{
+ BKE_object_copy_gpencil_modifier(ob_dst, md);
+ WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob_dst);
+ DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
+}
+
/************************ add modifier operator *********************/
static int gpencil_modifier_add_exec(bContext *C, wmOperator *op)
@@ -674,9 +684,6 @@ static int gpencil_modifier_move_to_index_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
- WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
-
return OPERATOR_FINISHED;
}