forked from bartvdbraak/blender
- 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:
parent
809cb5e478
commit
506db73032
@ -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}
|
||||
};
|
||||
|
@ -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);
|
||||
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)
|
||||
|
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user