- 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:
@@ -6245,7 +6245,7 @@ static int curve_delete_exec(bContext *C, wmOperator *op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static EnumPropertyItem curve_delete_type_items[] = {
|
static EnumPropertyItem curve_delete_type_items[] = {
|
||||||
{CURVE_VERTEX, "VERTICES", 0, "Vertices", ""},
|
{CURVE_VERTEX, "VERT", 0, "Vertices", ""},
|
||||||
{CURVE_SEGMENT, "SEGMENT", 0, "Segments", ""},
|
{CURVE_SEGMENT, "SEGMENT", 0, "Segments", ""},
|
||||||
{0, NULL, 0, NULL, NULL}
|
{0, NULL, 0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
@@ -1012,9 +1012,13 @@ static int view3d_camera_user_poll(bContext *C)
|
|||||||
static int view3d_lock_poll(bContext *C)
|
static int view3d_lock_poll(bContext *C)
|
||||||
{
|
{
|
||||||
View3D *v3d = CTX_wm_view3d(C);
|
View3D *v3d = CTX_wm_view3d(C);
|
||||||
RegionView3D *rv3d = CTX_wm_region_view3d(C);
|
if (v3d) {
|
||||||
|
RegionView3D *rv3d = CTX_wm_region_view3d(C);
|
||||||
return ED_view3d_offset_lock_check(v3d, rv3d);
|
if (rv3d) {
|
||||||
|
return ED_view3d_offset_lock_check(v3d, rv3d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int viewrotate_cancel(bContext *C, wmOperator *op)
|
static int viewrotate_cancel(bContext *C, wmOperator *op)
|
||||||
|
@@ -342,7 +342,8 @@ def ctx_editmode_curves():
|
|||||||
def ctx_editmode_curves_empty():
|
def ctx_editmode_curves_empty():
|
||||||
bpy.ops.curve.primitive_nurbs_circle_add()
|
bpy.ops.curve.primitive_nurbs_circle_add()
|
||||||
bpy.ops.object.mode_set(mode='EDIT')
|
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():
|
def ctx_editmode_surface():
|
||||||
|
Reference in New Issue
Block a user