Rename operator for better clarity
This commit is contained in:
@@ -226,7 +226,7 @@ void OBJECT_OT_vertex_group_move(struct wmOperatorType *ot);
|
|||||||
void OBJECT_OT_vertex_weight_paste(struct wmOperatorType *ot);
|
void OBJECT_OT_vertex_weight_paste(struct wmOperatorType *ot);
|
||||||
void OBJECT_OT_vertex_weight_delete(struct wmOperatorType *ot);
|
void OBJECT_OT_vertex_weight_delete(struct wmOperatorType *ot);
|
||||||
void OBJECT_OT_vertex_weight_set_active(struct wmOperatorType *ot);
|
void OBJECT_OT_vertex_weight_set_active(struct wmOperatorType *ot);
|
||||||
void OBJECT_OT_vertex_weight_normalize_active(struct wmOperatorType *ot);
|
void OBJECT_OT_vertex_weight_normalize_active_vertex(struct wmOperatorType *ot);
|
||||||
void OBJECT_OT_vertex_weight_copy(struct wmOperatorType *ot);
|
void OBJECT_OT_vertex_weight_copy(struct wmOperatorType *ot);
|
||||||
|
|
||||||
/* object_shapekey.c */
|
/* object_shapekey.c */
|
||||||
|
@@ -198,7 +198,7 @@ void ED_operatortypes_object(void)
|
|||||||
WM_operatortype_append(OBJECT_OT_vertex_weight_paste);
|
WM_operatortype_append(OBJECT_OT_vertex_weight_paste);
|
||||||
WM_operatortype_append(OBJECT_OT_vertex_weight_delete);
|
WM_operatortype_append(OBJECT_OT_vertex_weight_delete);
|
||||||
WM_operatortype_append(OBJECT_OT_vertex_weight_set_active);
|
WM_operatortype_append(OBJECT_OT_vertex_weight_set_active);
|
||||||
WM_operatortype_append(OBJECT_OT_vertex_weight_normalize_active);
|
WM_operatortype_append(OBJECT_OT_vertex_weight_normalize_active_vertex);
|
||||||
WM_operatortype_append(OBJECT_OT_vertex_weight_copy);
|
WM_operatortype_append(OBJECT_OT_vertex_weight_copy);
|
||||||
|
|
||||||
WM_operatortype_append(OBJECT_OT_game_property_new);
|
WM_operatortype_append(OBJECT_OT_game_property_new);
|
||||||
|
@@ -4199,7 +4199,7 @@ void OBJECT_OT_vertex_weight_set_active(wmOperatorType *ot)
|
|||||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vertex_weight_normalize_active(bContext *C, wmOperator *UNUSED(op))
|
static int vertex_weight_normalize_active_vertex(bContext *C, wmOperator *UNUSED(op))
|
||||||
{
|
{
|
||||||
Object *ob = ED_object_context(C);
|
Object *ob = ED_object_context(C);
|
||||||
ToolSettings *ts = CTX_data_tool_settings(C);
|
ToolSettings *ts = CTX_data_tool_settings(C);
|
||||||
@@ -4213,16 +4213,16 @@ static int vertex_weight_normalize_active(bContext *C, wmOperator *UNUSED(op))
|
|||||||
return OPERATOR_FINISHED;
|
return OPERATOR_FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OBJECT_OT_vertex_weight_normalize_active(wmOperatorType *ot)
|
void OBJECT_OT_vertex_weight_normalize_active_vertex(wmOperatorType *ot)
|
||||||
{
|
{
|
||||||
|
|
||||||
ot->name = "Normalize Active";
|
ot->name = "Normalize Active";
|
||||||
ot->idname = "OBJECT_OT_vertex_weight_normalize_active";
|
ot->idname = "OBJECT_OT_vertex_weight_normalize_active_vertex";
|
||||||
ot->description = "Normalize Active Vert Weights";
|
ot->description = "Normalize Active Vert Weights";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->poll = vertex_group_poll;
|
ot->poll = vertex_group_poll;
|
||||||
ot->exec = vertex_weight_normalize_active;
|
ot->exec = vertex_weight_normalize_active_vertex;
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||||
|
@@ -910,7 +910,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
|
|||||||
col = uiLayoutColumn(pa->layout, true);
|
col = uiLayoutColumn(pa->layout, true);
|
||||||
row = uiLayoutRow(col, true);
|
row = uiLayoutRow(col, true);
|
||||||
|
|
||||||
ot = WM_operatortype_find("OBJECT_OT_vertex_weight_normalize_active", 1);
|
ot = WM_operatortype_find("OBJECT_OT_vertex_weight_normalize_active_vertex", 1);
|
||||||
but = uiDefButO_ptr(block, BUT, ot, WM_OP_EXEC_DEFAULT, "Normalize",
|
but = uiDefButO_ptr(block, BUT, ot, WM_OP_EXEC_DEFAULT, "Normalize",
|
||||||
0, yco, UI_UNIT_X * 5, UI_UNIT_Y,
|
0, yco, UI_UNIT_X * 5, UI_UNIT_Y,
|
||||||
TIP_("Normalize weights of active vertex (if affected groups are unlocked"));
|
TIP_("Normalize weights of active vertex (if affected groups are unlocked"));
|
||||||
|
Reference in New Issue
Block a user