forked from bartvdbraak/blender
edge loop delete, should be a c macro but they cant do settings atm
This commit is contained in:
parent
2072e7c6c7
commit
a0d8d7afe0
@ -139,3 +139,20 @@ class bpy_ops_submodule_op(object):
|
||||
|
||||
import bpy
|
||||
bpy.ops = bpy_ops()
|
||||
|
||||
# TODO, C macro's cant define settings :|
|
||||
|
||||
class MESH_OT_delete_edgeloop(bpy.types.Operator):
|
||||
'''Export a single object as a stanford PLY with normals, colours and texture coordinates.'''
|
||||
__idname__ = "mesh.delete_edgeloop"
|
||||
__label__ = "Export PLY"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.tfm.edge_slide(value=1.0)
|
||||
bpy.ops.mesh.select_more()
|
||||
bpy.ops.mesh.remove_doubles()
|
||||
return ('FINISHED',)
|
||||
|
||||
|
||||
bpy.ops.add(MESH_OT_delete_edgeloop)
|
||||
|
||||
|
@ -1305,8 +1305,12 @@ static int delete_mesh_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
|
||||
int type= RNA_enum_get(op->ptr, "type");
|
||||
|
||||
delete_mesh(obedit, em, op, RNA_enum_get(op->ptr, "type"));
|
||||
if(type==6)
|
||||
return WM_operator_name_call(C, "MESH_OT_delete_edgeloop", WM_OP_EXEC_DEFAULT, NULL);
|
||||
|
||||
delete_mesh(obedit, em, op, type);
|
||||
|
||||
DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
|
||||
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
|
||||
|
Loading…
Reference in New Issue
Block a user