Maniphest T25629

Add torus with autmatic edit mode duplicates mesh after >Aling to View.
Closed, Resolved

Assigned To
Campbell Barton (campbellbarton)
Authored By
Adam Jaworski (jawra)
Jan 14 2011, 12:44 AM
Tags
  • BF Blender
  • Modeling
Subscribers
Adam Jaworski (jawra)
Campbell Barton (campbellbarton)

Description

Reproducing :
Enable 'Enter Edit Mode' in user prefs, add torus (now Blender is in edit mode), change view and enable 'Align to View' - Blender creates new torus aligned to view but doesn't delete previous, not aligned. It only happens immediately after switching to edit mode, when 'Align..' button is pressed for first time.
Also there is no aligning to World after switch off 'Align to view' like in other primitives. Can't use Rotation sliders unless manually disable 'Align to view' - I think it could be done automatically.

Other primitives do not allow using 'Align to view' after adjusting with rotation sliders.

Blender r34298, Ubuntu 10.04 32bit.

Event Timeline

Adam Jaworski (jawra) edited a custom field.Jan 14 2011, 12:44 AM
Campbell Barton (campbellbarton) added a comment.Jan 14 2011, 11:15 AM

This is a bug in blenders operator api caused by a fix I did which was reported previously.
calling:
bpy.ops.mesh.select_all(action='DESELECT')

adds an item to the undo stack when it should not, possibly because this is an editmesh undo, rather then global undo.

Ill look into why this gives an undo push.

Campbell Barton (campbellbarton) added a comment.Jan 14 2011, 11:02 PM

I was wrong about bpy.ops.mesh.select_all(action='DESELECT'),

This is caused by pythons add-object entering editmode with the mesh already created as opposed to entering editmode and then creating the mesh as our C code does. I cant see a simple fix for this without having some editmode hack to start the undo state on a blank mesh even when it enters with a valid mesh.

...or by having some python function to insert a mesh into an existing editmesh.

Campbell Barton (campbellbarton) added a comment.Feb 22 2011, 3:48 AM

fixed r35046.

Campbell Barton (campbellbarton) changed the task status from Unknown Status to Resolved.Feb 22 2011, 3:48 AM