Rename operator 'Join Shapes' to 'Transfer Mix'.

The new name is consistent with the 'Transfer Shape' operator.

- Updated the UI descriptions for both transfer operators.
This commit is contained in:
Inês Almeida 2019-06-30 20:05:54 +02:00
parent 7c8bf77e13
commit 741967079c
Notes: blender-bot 2023-04-14 09:18:04 +02:00
Referenced by commit c6d073f6a4, Revert "Rename operator 'Join Shapes' to 'Transfer Mix'."
5 changed files with 16 additions and 17 deletions

View File

@ -312,10 +312,9 @@ class SubdivisionSet(Operator):
class ShapeTransfer(Operator):
"""Copy another selected objects active shape to this one by """ \
"""applying the relative offsets"""
"""Copy the active shape key of another selected object to this one"""
bl_idname = "object.shape_key_transfer"
bl_idname = "object.shape_key_transfer_active"
bl_label = "Transfer Shape Key"
bl_options = {'REGISTER', 'UNDO'}

View File

@ -67,8 +67,8 @@ class MESH_MT_shape_key_context_menu(Menu):
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT').use_topology = False
layout.operator("object.shape_key_mirror", text="Mirror Shape Key (Topology)").use_topology = True
layout.separator()
layout.operator("object.join_shapes")
layout.operator("object.shape_key_transfer")
layout.operator("object.shape_key_transfer_mix")
layout.operator("object.shape_key_transfer_active")
layout.separator()
layout.operator("object.shape_key_remove", icon='X', text="Delete All Shape Keys").all = True
layout.separator()

View File

@ -2782,10 +2782,10 @@ void OBJECT_OT_join(wmOperatorType *ot)
/** \} */
/* -------------------------------------------------------------------- */
/** \name Join as Shape Key Operator
/** \name Transfer Mix Operator for Shape Keys
* \{ */
static bool join_shapes_poll(bContext *C)
static bool shape_key_transfer_mix_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@ -2802,12 +2802,12 @@ static bool join_shapes_poll(bContext *C)
}
}
static int join_shapes_exec(bContext *C, wmOperator *op)
static int shape_key_transfer_mix_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
if (ob->mode & OB_MODE_EDIT) {
BKE_report(op->reports, RPT_ERROR, "This data does not support joining in edit mode");
BKE_report(op->reports, RPT_ERROR, "Shape Keys cannot be transfered in edit mode");
return OPERATOR_CANCELLED;
}
else if (BKE_object_obdata_is_libdata(ob)) {
@ -2822,16 +2822,16 @@ static int join_shapes_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
void OBJECT_OT_join_shapes(wmOperatorType *ot)
void OBJECT_OT_shape_key_transfer_mix(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Join as Shapes";
ot->description = "Merge selected objects to shapes of active object";
ot->idname = "OBJECT_OT_join_shapes";
ot->name = "Transfer Mix";
ot->description = "Copy the current resulting shape of another selected object to this one";
ot->idname = "OBJECT_OT_shape_key_transfer_mix";
/* api callbacks */
ot->exec = join_shapes_exec;
ot->poll = join_shapes_poll;
ot->exec = shape_key_transfer_mix_exec;
ot->poll = shape_key_transfer_mix_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@ -117,7 +117,7 @@ void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot);
void OBJECT_OT_duplicate(struct wmOperatorType *ot);
void OBJECT_OT_delete(struct wmOperatorType *ot);
void OBJECT_OT_join(struct wmOperatorType *ot);
void OBJECT_OT_join_shapes(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_transfer_mix(struct wmOperatorType *ot);
void OBJECT_OT_convert(struct wmOperatorType *ot);
/* object_hook.c */

View File

@ -117,7 +117,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_duplicates_make_real);
WM_operatortype_append(OBJECT_OT_duplicate);
WM_operatortype_append(OBJECT_OT_join);
WM_operatortype_append(OBJECT_OT_join_shapes);
WM_operatortype_append(OBJECT_OT_shape_key_transfer_mix);
WM_operatortype_append(OBJECT_OT_convert);
WM_operatortype_append(OBJECT_OT_modifier_add);