Discussion:
[Bf-python] Active element / element selection list: cumbersome.
Gert De Roost
2013-08-14 20:10:19 UTC
Permalink
The way mesh element selection lists are handled in Python is really not
mature.

Theres a way of setting the active face but not the active vert/edge...

The only way to manage ordered selection lists is by using bmesh
selection_history, but that functions badly also:
Firstly the already active selection list when creating a bmesh from
edit_mesh is not loaded in the history list.
Also when using Bkey/Akey the list is not populated with the selected
elements.
Also when using bpy.ops.mesh.shortest_path_pick() the history is deleted
and then loaded by the element that was clicked instead it should be added
to.
Also when using bm.select_flush(0) the list is updated but not when
programmatically selecting elements (v.select = 1) and then doing
bm.select_flush()?

As it is clear from using Blender, selecting/deselecting elements, that
Blender keeps a complete and ordered selection list internally, this list
should be accessible from within Python, and be gettable AND settable, so
complete selection states could be saved and restored.



In the hope this issue gets addressed,

Gert De Roost
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-python/attachments/20130814/b9d49bb7/attachment.htm
Gert De Roost
2013-08-15 00:49:15 UTC
Permalink
Sorry, I did not know select_history can be removed from / added to, this
solves some issues, but many remain...
Post by Gert De Roost
The way mesh element selection lists are handled in Python is really not
mature.
Theres a way of setting the active face but not the active vert/edge...
The only way to manage ordered selection lists is by using bmesh
Firstly the already active selection list when creating a bmesh from
edit_mesh is not loaded in the history list.
Also when using Bkey/Akey the list is not populated with the selected
elements.
Also when using bpy.ops.mesh.shortest_path_pick() the history is deleted
and then loaded by the element that was clicked instead it should be added
to.
Also when using bm.select_flush(0) the list is updated but not when
programmatically selecting elements (v.select = 1) and then doing
bm.select_flush()?
As it is clear from using Blender, selecting/deselecting elements, that
Blender keeps a complete and ordered selection list internally, this list
should be accessible from within Python, and be gettable AND settable, so
complete selection states could be saved and restored.
In the hope this issue gets addressed,
Gert De Roost
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-python/attachments/20130815/bb348f2e/attachment.htm
Loading...