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:
authorErik Abrahamsson <erik85>2020-12-28 20:17:49 +0300
committerHans Goudey <h.goudey@me.com>2020-12-28 20:18:52 +0300
commit6fbeb6e2e05408af448e9409f8e7e11470f82db6 (patch)
treeaf7a763798177bb54e61b164bc215ed610983b0c /source/blender/editors/object/object_intern.h
parent7f3601e70dd094b6f9162bb03a8a3440d50de47e (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/editors/object/object_intern.h')
-rw-r--r--source/blender/editors/object/object_intern.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 89ade5cc49d..00426e96a81 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -175,6 +175,7 @@ void OBJECT_OT_modifier_apply(struct wmOperatorType *ot);
void OBJECT_OT_modifier_apply_as_shapekey(wmOperatorType *ot);
void OBJECT_OT_modifier_convert(struct wmOperatorType *ot);
void OBJECT_OT_modifier_copy(struct wmOperatorType *ot);
+void OBJECT_OT_modifier_copy_to_selected(struct wmOperatorType *ot);
void OBJECT_OT_modifier_set_active(struct wmOperatorType *ot);
void OBJECT_OT_multires_subdivide(struct wmOperatorType *ot);
void OBJECT_OT_multires_reshape(struct wmOperatorType *ot);
@@ -203,6 +204,7 @@ void OBJECT_OT_gpencil_modifier_move_down(struct wmOperatorType *ot);
void OBJECT_OT_gpencil_modifier_move_to_index(struct wmOperatorType *ot);
void OBJECT_OT_gpencil_modifier_apply(struct wmOperatorType *ot);
void OBJECT_OT_gpencil_modifier_copy(struct wmOperatorType *ot);
+void OBJECT_OT_gpencil_modifier_copy_to_selected(struct wmOperatorType *ot);
/* object_shader_fx.c */
void OBJECT_OT_shaderfx_add(struct wmOperatorType *ot);