本文整理汇总了C++中Transform_Properties函数的典型用法代码示例。如果您正苦于以下问题:C++ Transform_Properties函数的具体用法?C++ Transform_Properties怎么用?C++ Transform_Properties使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Transform_Properties函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TRANSFORM_OT_vert_slide
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: TRANSFORM_OT_tilt
static void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
ot->name = "Tilt";
/* optionals -
* "Tilt selected vertices"
* "Specify an extra axis rotation for selected vertices of 3D curve" */
ot->description = "Tilt selected control vertices of 3D curve";
ot->idname = OP_TILT;
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_editcurve_3d;
prop = RNA_def_float(ot->srna, "value", 0.0, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
RNA_def_property_subtype(prop, PROP_ANGLE);
Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP);
}
示例3: TRANSFORM_OT_skin_resize
static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Skin Resize";
ot->description = "Scale selected vertices' skin radii";
ot->idname = OP_SKIN_RESIZE;
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 = skin_resize_poll;
RNA_def_float_vector(ot->srna, "value", 3, VecOne, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
Transform_Properties(ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_NO_TEXSPACE);
}
示例4: TRANSFORM_OT_translate
static void TRANSFORM_OT_translate(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Translate";
ot->description = "Translate (move) selected items";
ot->idname = OP_TRANSLATION;
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_screenactive;
RNA_def_float_vector_xyz(ot->srna, "value", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
Transform_Properties(ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP | P_OPTIONS | P_GPENCIL_EDIT);
}
示例5: TRANSFORM_OT_vert_slide
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);
}
示例6: TRANSFORM_OT_bend
static void TRANSFORM_OT_bend(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Bend";
ot->description = "Bend selected items between the 3D cursor and the mouse";
ot->idname = OP_BEND;
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
// ot->exec = transform_exec; // unsupported
ot->modal = transform_modal;
ot->cancel = transform_cancel;
ot->poll = ED_operator_region_view3d_active;
RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT);
}
示例7: TRANSFORM_OT_edge_bevelweight
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);
}
示例8: TRANSFORM_OT_trackball
static void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Trackball";
ot->description = "Trackball style rotation of selected items";
ot->idname = OP_TRACKBALL;
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_screenactive;
/* Maybe we could use float_vector_xyz here too? */
RNA_def_float_rotation(ot->srna, "value", 2, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -FLT_MAX, FLT_MAX);
Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT);
}
示例9: TRANSFORM_OT_rotate
static void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
ot->name = "Rotate";
ot->description = "Rotate selected items";
ot->idname = OP_ROTATION;
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_screenactive;
prop = RNA_def_float(ot->srna, "value", 0.0f, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
RNA_def_property_subtype(prop, PROP_ANGLE);
Transform_Properties(ot, P_AXIS | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_GPENCIL_EDIT);
}
示例10: TRANSFORM_OT_edge_slide
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);
}