forked from bartvdbraak/blender
Fix T44821: Making warp shortcut fails
Using OBJECT prefix for editmode operators causes shortcuts to go into the wrong keymap.
This commit is contained in:
parent
2c3c477223
commit
de0c269c28
@ -208,8 +208,10 @@ class VIEW3D_MT_transform_base(Menu):
|
||||
layout.operator("transform.shear", text="Shear")
|
||||
layout.operator("transform.bend", text="Bend")
|
||||
layout.operator("transform.push_pull", text="Push/Pull")
|
||||
layout.operator("object.vertex_warp", text="Warp")
|
||||
layout.operator("object.vertex_random", text="Randomize")
|
||||
|
||||
if context.mode != 'OBJECT':
|
||||
layout.operator("transform.vertex_warp", text="Warp")
|
||||
layout.operator("transform.vertex_random", text="Randomize")
|
||||
|
||||
|
||||
# Generic transform menu - geometry types
|
||||
|
@ -315,7 +315,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
|
||||
row.operator("transform.vert_slide", text="Vertex")
|
||||
col.operator("mesh.noise")
|
||||
col.operator("mesh.vertices_smooth")
|
||||
col.operator("object.vertex_random")
|
||||
col.operator("transform.vertex_random")
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Add:")
|
||||
@ -523,7 +523,7 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel):
|
||||
col.operator("curve.extrude_move", text="Extrude")
|
||||
col.operator("curve.subdivide")
|
||||
col.operator("curve.smooth")
|
||||
col.operator("object.vertex_random")
|
||||
col.operator("transform.vertex_random")
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_add_curve_edit(View3DPanel, Panel):
|
||||
@ -578,7 +578,7 @@ class VIEW3D_PT_tools_surfaceedit(View3DPanel, Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Deform:")
|
||||
col.operator("object.vertex_random")
|
||||
col.operator("transform.vertex_random")
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_add_surface_edit(View3DPanel, Panel):
|
||||
@ -655,7 +655,7 @@ class VIEW3D_PT_tools_armatureedit(View3DPanel, Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Deform:")
|
||||
col.operator("object.vertex_random")
|
||||
col.operator("transform.vertex_random")
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_armatureedit_options(View3DPanel, Panel):
|
||||
@ -688,7 +688,7 @@ class VIEW3D_PT_tools_mballedit(View3DPanel, Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Deform:")
|
||||
col.operator("object.vertex_random")
|
||||
col.operator("transform.vertex_random")
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_add_mball_edit(View3DPanel, Panel):
|
||||
@ -726,7 +726,7 @@ class VIEW3D_PT_tools_latticeedit(View3DPanel, Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Deform:")
|
||||
col.operator("object.vertex_random")
|
||||
col.operator("transform.vertex_random")
|
||||
|
||||
|
||||
# ********** default tools for pose-mode ****************
|
||||
|
@ -245,7 +245,7 @@ void OBJECT_OT_vertex_weight_normalize_active_vertex(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_vertex_weight_copy(struct wmOperatorType *ot);
|
||||
|
||||
/* object_warp.c */
|
||||
void OBJECT_OT_vertex_warp(struct wmOperatorType *ot);
|
||||
void TRANSFORM_OT_vertex_warp(struct wmOperatorType *ot);
|
||||
|
||||
/* object_shapekey.c */
|
||||
void OBJECT_OT_shape_key_add(struct wmOperatorType *ot);
|
||||
@ -271,7 +271,7 @@ void OBJECT_OT_lod_add(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_lod_remove(struct wmOperatorType *ot);
|
||||
|
||||
/* object_random.c */
|
||||
void OBJECT_OT_vertex_random(struct wmOperatorType *ot);
|
||||
void TRANSFORM_OT_vertex_random(struct wmOperatorType *ot);
|
||||
|
||||
/* object_transfer_data.c */
|
||||
void OBJECT_OT_data_transfer(struct wmOperatorType *ot);
|
||||
|
@ -200,7 +200,7 @@ void ED_operatortypes_object(void)
|
||||
WM_operatortype_append(OBJECT_OT_vertex_weight_normalize_active_vertex);
|
||||
WM_operatortype_append(OBJECT_OT_vertex_weight_copy);
|
||||
|
||||
WM_operatortype_append(OBJECT_OT_vertex_warp);
|
||||
WM_operatortype_append(TRANSFORM_OT_vertex_warp);
|
||||
|
||||
WM_operatortype_append(OBJECT_OT_game_property_new);
|
||||
WM_operatortype_append(OBJECT_OT_game_property_remove);
|
||||
@ -249,7 +249,7 @@ void ED_operatortypes_object(void)
|
||||
WM_operatortype_append(OBJECT_OT_lod_add);
|
||||
WM_operatortype_append(OBJECT_OT_lod_remove);
|
||||
|
||||
WM_operatortype_append(OBJECT_OT_vertex_random);
|
||||
WM_operatortype_append(TRANSFORM_OT_vertex_random);
|
||||
|
||||
WM_operatortype_append(OBJECT_OT_data_transfer);
|
||||
WM_operatortype_append(OBJECT_OT_datalayout_transfer);
|
||||
|
@ -124,12 +124,12 @@ static int object_rand_verts_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void OBJECT_OT_vertex_random(struct wmOperatorType *ot)
|
||||
void TRANSFORM_OT_vertex_random(struct wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Randomize";
|
||||
ot->description = "Randomize vertices";
|
||||
ot->idname = "OBJECT_OT_vertex_random";
|
||||
ot->idname = "TRANSFORM_OT_vertex_random";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = object_rand_verts_exec;
|
||||
|
@ -275,14 +275,14 @@ static int object_warp_verts_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void OBJECT_OT_vertex_warp(struct wmOperatorType *ot)
|
||||
void TRANSFORM_OT_vertex_warp(struct wmOperatorType *ot)
|
||||
{
|
||||
PropertyRNA *prop;
|
||||
|
||||
/* identifiers */
|
||||
ot->name = "Warp";
|
||||
ot->description = "Warp vertices around the cursor";
|
||||
ot->idname = "OBJECT_OT_vertex_warp";
|
||||
ot->idname = "TRANSFORM_OT_vertex_warp";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = object_warp_verts_exec;
|
||||
|
Loading…
Reference in New Issue
Block a user