- update bl_run_operators.py for change in blender.

- rename curve delete operator vertices enum to match mesh delete operator.
- add missing NULL checks to view3d_lock_poll() to prevent crashes when called outside a view3d.
This commit is contained in:
Campbell Barton 2013-09-15 01:46:25 +00:00
parent 809cb5e478
commit 506db73032
3 changed files with 10 additions and 5 deletions

View File

@ -6245,7 +6245,7 @@ static int curve_delete_exec(bContext *C, wmOperator *op)
}
static EnumPropertyItem curve_delete_type_items[] = {
{CURVE_VERTEX, "VERTICES", 0, "Vertices", ""},
{CURVE_VERTEX, "VERT", 0, "Vertices", ""},
{CURVE_SEGMENT, "SEGMENT", 0, "Segments", ""},
{0, NULL, 0, NULL, NULL}
};

View File

@ -1012,9 +1012,13 @@ static int view3d_camera_user_poll(bContext *C)
static int view3d_lock_poll(bContext *C)
{
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
return ED_view3d_offset_lock_check(v3d, rv3d);
if (v3d) {
RegionView3D *rv3d = CTX_wm_region_view3d(C);
if (rv3d) {
return ED_view3d_offset_lock_check(v3d, rv3d);
}
}
return false;
}
static int viewrotate_cancel(bContext *C, wmOperator *op)

View File

@ -342,7 +342,8 @@ def ctx_editmode_curves():
def ctx_editmode_curves_empty():
bpy.ops.curve.primitive_nurbs_circle_add()
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.curve.delete(type='ALL')
bpy.ops.curve.select_all(action='SELECT')
bpy.ops.curve.delete(type='VERT')
def ctx_editmode_surface():