# Bezier Curve - Edit Mode - how does the Spin menu item work?

When you create a Bezier curve and enter the Edit mode, then you will see a greyed out menu item Spin in the Curve menu in the header.

How do i activate this menu item? How does it work?

• I don't know, but it seems a python-only tool, which maybe in the future will have a working ui entry. maybe. I found a reference to bpy.ops.curve.spin in docs.blender.org/api/blender_python_api_2_78a_release/… – m.ardito May 9 '17 at 10:02
• Well, the same tool also exists for Surface. And here it is not greyed out. It spins the surface curve around the 3d cursor then. I am just curious why it is greyed out for a Bezier curve. – Tiles May 9 '17 at 10:33

The reason Spin is greyed out is because currently the UI file for that menu item is

layout.operator("curve.spin")


Which points to an operator written in C

source/blender/editors/curve/editcurve.c

void CURVE_OT_spin(wmOperatorType *ot)


Inside that operator is a poll to check if the current state of blender warrants showing the menu entry as clickable.

ot->poll = ED_operator_editsurf;


this sets the value of ot->poll to whatever the value of ED_operator_editsurf is,

source/blender/editors/screen/screen_ops.c

int ED_operator_editsurf(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_SURF)
return NULL != ((Curve *)obedit->data)->editnurb;
return 0;
}


this tests if the object is in edit mode, it would be, and also tests the type of the object, which in that case is not OB_SURF, not a surface type curve.