diff options
author | Erik Abrahamsson <erik85> | 2020-12-28 20:17:49 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-28 20:18:52 +0300 |
commit | 6fbeb6e2e05408af448e9409f8e7e11470f82db6 (patch) | |
tree | af7a763798177bb54e61b164bc215ed610983b0c /source/blender/gpencil_modifiers | |
parent | 7f3601e70dd094b6f9162bb03a8a3440d50de47e (diff) |
Add operator to copy a modifier to all selected objects
These two operators (one for grease pencil, one for other objects)
copy a single modifier from the active object to all selected objects.
The operators are exposed in the dropdown menus in modifier headers.
Note that It's currently possible to drag and drop modifiers between
objects in the outliner, but that only works for dragging to one object
at a time. Modifiers can also be copied with the "Make Links" operator,
but that copies *all* modifiers rather than just one. The placement
and scope of these new operators allow for more useful poll messages
and error messages as well.
Every object type that supports modifiers is supported. Although hook
and collision modifiers aren't supported because of an unexplained
comment in `BKE_object_copy_modifier`, other than that, every modifier
type is supported, including particle systems, nodes modifiers, etc.
The new modifiers are set active, which required two small tweaks to
`object.c` and `particle.c`.
Reviewed By: Hans Goudey (with additional edits)
Differential Revision: https://developer.blender.org/D9537
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c index d3ba5bf8b37..05e7a23bc82 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c @@ -270,6 +270,11 @@ static void gpencil_modifier_ops_extra_draw(bContext *C, uiLayout *layout, void ICON_DUPLICATE, "OBJECT_OT_gpencil_modifier_copy"); + uiItemO(layout, + CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy to Selected"), + 0, + "OBJECT_OT_gpencil_modifier_copy_to_selected"); + uiItemS(layout); /* Move to first. */ |