Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Blender 2.6 Bug Tracker: Browse

[#21893] Attempting to delete multiple edge loops changes selection.

Date:
2010-04-03 07:51
Priority:
3
State:
Closed
Submitted by:
Shane Ambler (sambler)
Assigned to:
Ton Roosendaal (ton)
Category:
Tools
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
 
Summary:
Attempting to delete multiple edge loops changes selection.
Detailed description
r27963 MacOSX 10.5.8 ppc and FreeBSD 8 i386

With say a cube (or plane...) add 3 edge loops (ctrl-R)
with the 3 just created loops still selected try delete edge loop.

The selection expands to include the vertexes on either side of the selection.

In 2.49 this scenario gives an error about loop crosses itself and leaves the selection as is.

I know we have moved most of the feedback displays from under the cursor to the top header but in times of errors like this we may need to show something a bit more noticeable to the user as to why nothing happened.
Maybe we could have a preference setting that chooses between cursor located feedback and info header feedback.

Followup

Message
  • Date: 2010-04-03 19:52
  • Sender: marc chambon
  • rev27975, ubuntu 9.10 32 bit, ati proprietary drivers
    Confirmed
    Regards
  • Date: 2010-04-19 07:46
  • Sender: Matt Ebb
  • I looked into this:

    Delete edge loop is basically an operator that combines 3 other operators (in python):
    bpy.ops.transform.edge_slide(value=1.0)
    bpy.ops.mesh.select_more()
    bpy.ops.mesh.remove_doubles()

    It seems like the code for edge slide within the transform, in createSlideVerts() has plenty of opportunities where it can exit early (returning 0) if the edge selection is invalid for that tool. There are some commented out error messages here too.

    However these reports or 0 return values don't seem to be handled anywhere - createSlideVerts() is just run on its own, inside initEdgeSlide().

    Martin, would it be possible to somehow handle this? Then the edge slide operator could return OPERATOR_CANCELLED, which could be handled in MESH_OT_delete_edgeloop, skipping the select more/remove doubles steps.
  • Date: 2010-11-19 18:34
  • Sender: Shane Ambler
  • My first look at this a few months ago I found it hard to get info back from a failed edge slide to the python operator so I left it for someone else.

    Going back to it now I decided to redo MESH_OT_delete_edgeloop in C and add feedback for a failed edge slide. The two main functions began as copies of MESH_OT_delete - I guess the start and end of each function would be the same and see no need to add different invoke and poll functions.

    The other small changes should be self explanatory. The final part postTrans() is to prevent t->*** allocs being left behind.

    For me this works as expected.
    Mac OSX 10.5.8 ppc 2GB Radeon 9800 Pro 128MB
  • Date: 2010-11-20 19:45
  • Sender: Martin Poirier
  • I've applied the part of the patch that deals with the cancellation of edge slide on invalid selection.

    For the rest, the operator written by Shane (thanks for that) could be used or we could use a macro (like extrude operators), moving the error message into transform, when canceling edge slide (the later would be my preferred solution, this way every cancel gets the proper error)
  • Date: 2010-12-04 14:31
  • Sender: Ton Roosendaal
  • Shane: In C code it's nicer to not have operators call other operators, for that macros have been added.
    To me it seems this option is nicer to code lower level, re-using the calls from loop code in Blender itself.

    Checking...
  • Date: 2010-12-04 14:47
  • Sender: Ton Roosendaal
  • I noticed the python operator could be implmented similarly to your patch, just adding a return check as well.
    This seems for now to be the best solution. Having this py operator is good educational value to keep our system tested. Fix for 'change selection on failure' is in svn now.
 

Attached Files:

Name Date Download
21893 delete_edge_loop.patch 2010-11-19 18:34 Download

Changes:

Field Old Value Date By
ResolutionApproved2010-12-04 14:47ton
close_date2010-12-04 14:472010-12-04 14:47ton
status_idOpen2010-12-04 14:47ton
assigned_totheeth2010-11-19 18:46ton
File Added13685: 21893 delete_edge_loop.patch2010-11-19 18:34sambler
ResolutionNone2010-04-19 07:46broken
assigned_tonone2010-04-19 07:46broken