示例#1
0
static void TRANSFORM_OT_vert_slide(struct wmOperatorType *ot)
{
	/* identifiers */
	ot->name   = "Vertex Slide";
	ot->description = "Slide a vertex along a mesh";
	ot->idname = OP_VERT_SLIDE;
	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_region_view3d;

	RNA_def_float_factor(ot->srna, "value", 0, -10.0f, 10.0f, "Factor", "", -1.0f, 1.0f);
	RNA_def_boolean(ot->srna, "use_even", false, "Even",
	                "Make the edge loop match the shape of the adjacent edge loop");
	RNA_def_boolean(ot->srna, "flipped", false, "Flipped",
	                "When Even mode is active, flips between the two adjacent edge loops");
	RNA_def_boolean(ot->srna, "use_clamp", true, "Clamp",
	                "Clamp within the edge extents");

	Transform_Properties(ot, P_MIRROR | P_SNAP | P_CORRECT_UV);
}
示例#2
0
void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
{
	/* identifiers */
	ot->name   = "Edge Crease";
	ot->description= "Change the crease of edges";
	ot->idname = OP_EDGE_CREASE;
	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);
}
示例#3
0
void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
{
	/* identifiers */
	ot->name   = "Edge Slide";
	ot->description= "Slide an edge loop along a mesh"; 
	ot->idname = OP_EDGE_SLIDE;
	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_MIRROR|P_SNAP);
}
示例#4
0
static void TRANSFORM_OT_vert_slide(struct wmOperatorType *ot)
{
	/* identifiers */
	ot->name   = "Vertex Slide";
	ot->description = "Slide a vertex along a mesh";
	ot->idname = OP_VERT_SLIDE;
	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_region_view3d;

	RNA_def_float_factor(ot->srna, "value", 0, -10.0f, 10.0f, "Factor", "", -1.0f, 1.0f);

	Transform_Properties(ot, P_MIRROR | P_SNAP | P_CORRECT_UV);
}
示例#5
0
static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot)
{
	/* identifiers */
	ot->name   = "Edge Bevel Weight";
	ot->description = "Edge Bevel Weight\nChange the bevel weight of edges";
	ot->idname = OP_EDGE_BWEIGHT;
	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;

	/* api callbacks */
	ot->invoke = edge_bevelweight_invoke;
	ot->exec   = edge_bevelweight_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);
}
示例#6
0
void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
{
	/* identifiers */
	ot->name   = "To Sphere";
	//added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()" 
	ot->description= "Move selected vertices outward in a spherical shape around mesh center";
	ot->idname = OP_TOSPHERE;
	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_areaactive;

	RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1);

	Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP);
}
示例#7
0
static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
{
	PropertyRNA *prop;

	/* identifiers */
	ot->name   = "Edge Slide";
	ot->description = "Edge Slide\nSlide an edge loop along a mesh"; 
	ot->idname = OP_EDGE_SLIDE;
	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_region_view3d;

	RNA_def_float_factor(ot->srna, "value", 0, -10.0f, 10.0f, "Factor", "", -1.0f, 1.0f);

	prop = RNA_def_boolean(ot->srna, "single_side", false, "Single Side", "");
	RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);

	Transform_Properties(ot, P_MIRROR | P_SNAP | P_CORRECT_UV);
}