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:
authorNathan Craddock <nzcraddock@gmail.com>2020-09-16 00:14:32 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-09-16 00:29:19 +0300
commit583354e9e989a66a684053e16bcbd950cac91428 (patch)
treefaa99407de6a8f85114ea53166fb45ff00233477 /source/blender/editors/object/object_gpencil_modifier.c
parentf4a2024c448568badb44709b342d4f47002c456b (diff)
Modifiers: Add link and copy functions
Adds functions to copy a modifier between objects, and an ED_ level function for linking modifiers between objects. This will be used in outliner modifier drag and drop. These functions support both regular and grease pencil modifiers. Differential Revision: https://developer.blender.org/D8642
Diffstat (limited to 'source/blender/editors/object/object_gpencil_modifier.c')
-rw-r--r--source/blender/editors/object/object_gpencil_modifier.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_gpencil_modifier.c b/source/blender/editors/object/object_gpencil_modifier.c
index e9b430ee54b..eed3c7f419d 100644
--- a/source/blender/editors/object/object_gpencil_modifier.c
+++ b/source/blender/editors/object/object_gpencil_modifier.c
@@ -322,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)