add access to bevel weight modal operator (only available in the Shift+E edge menu currently)
This commit is contained in:
@@ -1795,6 +1795,11 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("transform.edge_crease")
|
||||
layout.operator("transform.edge_bevelweight")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mesh.mark_seam").clear = False
|
||||
layout.operator("mesh.mark_seam", text="Clear Seam").clear = True
|
||||
|
||||
|
||||
@@ -1016,7 +1016,7 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
|
||||
}
|
||||
|
||||
/* Crease needs edge flag */
|
||||
if (t->mode == TFM_CREASE) {
|
||||
if (ELEM(t->mode, TFM_CREASE, TFM_BWEIGHT)) {
|
||||
t->options |= CTX_EDGE;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ static char OP_TRACKBALL[] = "TRANSFORM_OT_trackball";
|
||||
static char OP_MIRROR[] = "TRANSFORM_OT_mirror";
|
||||
static char OP_EDGE_SLIDE[] = "TRANSFORM_OT_edge_slide";
|
||||
static char OP_EDGE_CREASE[] = "TRANSFORM_OT_edge_crease";
|
||||
static char OP_EDGE_BWEIGHT[] = "TRANSFORM_OT_edge_bevelweight";
|
||||
static char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide";
|
||||
|
||||
void TRANSFORM_OT_translate(struct wmOperatorType *ot);
|
||||
@@ -87,6 +88,7 @@ void TRANSFORM_OT_trackball(struct wmOperatorType *ot);
|
||||
void TRANSFORM_OT_mirror(struct wmOperatorType *ot);
|
||||
void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot);
|
||||
void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot);
|
||||
void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot);
|
||||
void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot);
|
||||
|
||||
static TransformModeItem transform_modes[] =
|
||||
@@ -104,6 +106,7 @@ static TransformModeItem transform_modes[] =
|
||||
{OP_MIRROR, TFM_MIRROR, TRANSFORM_OT_mirror},
|
||||
{OP_EDGE_SLIDE, TFM_EDGE_SLIDE, TRANSFORM_OT_edge_slide},
|
||||
{OP_EDGE_CREASE, TFM_CREASE, TRANSFORM_OT_edge_crease},
|
||||
{OP_EDGE_BWEIGHT, TFM_BWEIGHT, TRANSFORM_OT_edge_bevelweight},
|
||||
{OP_SEQ_SLIDE, TFM_SEQ_SLIDE, TRANSFORM_OT_seq_slide},
|
||||
{NULL, 0}
|
||||
};
|
||||
@@ -764,6 +767,26 @@ void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
|
||||
Transform_Properties(ot, P_SNAP);
|
||||
}
|
||||
|
||||
void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Edge Bevel Weight";
|
||||
ot->description = "Change the bevel weight of edges";
|
||||
ot->idname = OP_EDGE_BWEIGHT;
|
||||
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke = transform_invoke;
|
||||
ot->exec = transform_exec;
|
||||
ot->modal = transform_modal;
|
||||
ot->cancel = transform_cancel;
|
||||
ot->poll = ED_operator_editmesh;
|
||||
|
||||
RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f);
|
||||
|
||||
Transform_Properties(ot, P_SNAP);
|
||||
}
|
||||
|
||||
void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
|
||||
Reference in New Issue
Block a user