Oject mode - "all faces" -- can we retrieve this through python

Hi, I’m sure you know that when in Object and wireframe modes if you disable the option “All faces” you don’t see all the mesh’s edges.

Wireframe with “All faces”:

Without “All faces”:

So, what I would like to know is if it’s possible to (in python) know which verts/are being drawn when “all faces” is disabled. This is because I have a method to identify them but because I’m making a script with Abidos to optimise meshes it would be wonderful if we could just get a list from blender with the verts or edges indices (because blender must already know which ones is drawing) so that we could make a faster script without wasting time calculating this kind of redundant things.

Summing up: If blender is only drawing certain edges then it must know which ones is drawing, so, there should be a way to retrieve this data.


dont know if this helps …
i made this short thing one time, because i needed
the list with the selected vertices in editmode.
It writes the list into a new text-“object” in the texteditor in blender.
Together with with mesh-object data (the locations of all vertices)
this list can be used to manipulate only these.

# test-dr, print selected verts-indices in editmode
import Blender
from Blender import *

scn = Scene.GetCurrent()
obj = scn.objects.active
print obj.name
mesh = obj.getData(mesh=True)
print len(mesh.verts)
print mesh.verts[0].sel
editmode = Window.EditMode()
if editmode: Window.EditMode(0)
print "selected verts in editmode are:"
k = 0
text = Text.New()
text.write( "		[" )
for i in mesh.verts:
	if i.sel:
		text.write ("%d,"%i.index)
		k += 1
		if k > 9:
			k = 0
text.write("		]
print mesh.verts[0].sel
if editmode: Window.EditMode(1)

Thanks test-dr but my problem is that I don’t know which verts are the ones that are rendered with “all faces” disabled :s

uuups, sorry
thought you did write:
“This is because I have a method to identify…”
… how do you identify the vertices … if you can select them, then you can query the sel-state of the vertices with python-api.

Yeah but our script focuses heavily in performance so all steps we can eliminate… :frowning:

To identify them i use some calculations - I want to avoid this and get their indices straight from the program :frowning: