addon Mesh:Extra Tools operator Add Armature is flaky #41775

Closed
opened 2014-09-10 20:05:50 +02:00 by Robert Forsman · 12 comments

Blender Version
Broken: 2.71

Short description of error
meta-andoctro on IRC asked me to help find out what is wrong with the Mesh: Extra Tools Multi Face Extrude / Add Armature tool. I have managed to confuse myself.

Exact steps for others to reproduce the error

start with the default cube.
go to the addons tab in the Tool region and chose Multi Face Extrude from the Multi Extrude Plus panel
Without doing anything else, click the Add Armature button.

The operator will fail with a "Select a face or a vertex where the chain should end..." error message.
According to meta-andoctro this workflow used to work in the past. I'll let him provide more detail.

**Blender Version** Broken: 2.71 **Short description of error** meta-andoctro on IRC asked me to help find out what is wrong with the Mesh: Extra Tools Multi Face Extrude / Add Armature tool. I have managed to confuse myself. **Exact steps for others to reproduce the error** start with the default cube. go to the addons tab in the Tool region and chose Multi Face Extrude from the Multi Extrude Plus panel Without doing anything else, click the Add Armature button. The operator will fail with a "Select a face or a vertex where the chain should end..." error message. According to meta-andoctro this workflow used to work in the past. I'll let him provide more detail.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @mutantbob

Added subscriber: @mutantbob
Author

Since the Add Armature operator requires you to select some faces, I jumped to the conclusion that the Multi Face Extrude should complete its operation leaving the tips of the extrusions selected.

The following patch seems to accomplish that.

diff --git a/mesh_extra_tools/mesh_mextrude_plus.py b/mesh_extra_tools/mesh_mextrude_plus.py
index ed0ab86..c855f07 100644
--- a/mesh_extra_tools/mesh_mextrude_plus.py
+++ b/mesh_extra_tools/mesh_mextrude_plus.py
@@ -131,6 +131,8 @@ class MExtrude(bpy.types.Operator):
         bm.from_mesh(obj.data)
         sel = [f for f in bm.faces if f.select]
 
+        after = []
+
         # faces loop
         for i, of in enumerate(sel):
             rot = vrot(self, i)
@@ -159,9 +161,14 @@ class MExtrude(bpy.types.Operator):
 
                 bm.faces.remove(of)
                 of = nf
+            after.append(of)
 
         for v in bm.verts: v.select = False
         for e in bm.edges: e.select = False
+
+        for f in after:
+            f.select = True
+
         bm.to_mesh(obj.data)
         obj.data.update()
 

Unfortunately, while this alteration does allow the Add Armature button to succeed, something weird is going on with the parameters region for the Add Armature operator. Adjusting any of the parameters (such as Max Bones) resets the mesh to the state before Multi Face Extrude was clicked.

If you do any other operation between Multi Face Extrude and Add Armature (such as toggling to edit mode) then the problem does not exhibit itself.

My grip on how adjustments to these operator parameters are handled in the state and the UI is nonexistent, so I'm going to need some help to create a "boundary" between the two operators.

Since the Add Armature operator requires you to select some faces, I jumped to the conclusion that the Multi Face Extrude should complete its operation leaving the tips of the extrusions selected. The following patch seems to accomplish that. ``` diff --git a/mesh_extra_tools/mesh_mextrude_plus.py b/mesh_extra_tools/mesh_mextrude_plus.py index ed0ab86..c855f07 100644 --- a/mesh_extra_tools/mesh_mextrude_plus.py +++ b/mesh_extra_tools/mesh_mextrude_plus.py @@ -131,6 +131,8 @@ class MExtrude(bpy.types.Operator): bm.from_mesh(obj.data) sel = [f for f in bm.faces if f.select] + after = [] + # faces loop for i, of in enumerate(sel): rot = vrot(self, i) @@ -159,9 +161,14 @@ class MExtrude(bpy.types.Operator): bm.faces.remove(of) of = nf + after.append(of) for v in bm.verts: v.select = False for e in bm.edges: e.select = False + + for f in after: + f.select = True + bm.to_mesh(obj.data) obj.data.update() ``` Unfortunately, while this alteration does allow the Add Armature button to succeed, something weird is going on with the parameters region for the Add Armature operator. Adjusting any of the parameters (such as Max Bones) resets the mesh to the state before Multi Face Extrude was clicked. If you do any other operation between Multi Face Extrude and Add Armature (such as toggling to edit mode) then the problem does not exhibit itself. My grip on how adjustments to these operator parameters are handled in the state and the UI is nonexistent, so I'm going to need some help to create a "boundary" between the two operators.
Brendon Murphy was assigned by Bastien Montagne 2014-09-11 08:18:38 +02:00
Member

hi, I've been aware of this issue & I am trying to fix with little success atm.
It may be that I will have to remove if it cannot be fixed properly within a few weeks.
Thanks mutantbob for the multi extrude fix, I will look at that too.
I',m really not sure what caused these issues as these two addons worked perfectly in 2.63 without the need for selected end face.

Thanks for report & help.

hi, I've been aware of this issue & I am trying to fix with little success atm. It may be that I will have to remove if it cannot be fixed properly within a few weeks. Thanks mutantbob for the multi extrude fix, I will look at that too. I',m really not sure what caused these issues as these two addons worked perfectly in 2.63 without the need for selected end face. Thanks for report & help.
Member

committed part on of the fix, by mutantbob
fix for last face selected thanks purplefrog
blender/blender-addons-contrib@ea70fe1bab

I have a test version of the addon (parent addon mesh_extra tools) with add armature removed.
I'll allow some more time to try to fix before removing add armature & closing this report.

committed part on of the fix, by mutantbob fix for last face selected thanks purplefrog blender/blender-addons-contrib@ea70fe1bab I have a test version of the addon (parent addon mesh_extra tools) with add armature removed. I'll allow some more time to try to fix before removing add armature & closing this report.
Author

The problem with the armature is definitely related to the undo system.

If you do
Multi Face Extrude
Add Armature
Undo
then it undo-s both of the operations, not just the Add Armature.

I'm inclined to blame the undo system for the time being.

The problem with the armature is definitely related to the undo system. If you do Multi Face Extrude Add Armature Undo then it undo-s both of the operations, not just the Add Armature. I'm inclined to blame the undo system for the time being.
Member

hi, the current problem with the armature code is the length of the bones, when the addon was working it followed edge loops nicely, now the bone length is incorrect.

hi, the current problem with the armature code is the length of the bones, when the addon was working it followed edge loops nicely, now the bone length is incorrect.

Added subscriber: @Praful

Added subscriber: @Praful

Added subscriber: @Praharshita

Added subscriber: @Praharshita
Member

hi,
only a few days to go, if anyone can fix the armature length issue, please do, if not, we lose this feature.

hi, only a few days to go, if anyone can fix the armature length issue, please do, if not, we lose this feature.
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

removed armature function from menu.

removed armature function from menu.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#41775
No description provided.