[Bf-committers] proposal: python interface for object statistics ...
gaia.clary at machinimatrix.org
Thu Mar 8 16:26:58 CET 2012
Blender currently exposes the number of vertices/edges/faces
of the current visible scene. If i want to know the number
of faces actually used for a single object (after modifiers
have been applied!), then currently i have to do this:
- move the object to an empty layer
- switch to this layer
- read the face count of the object in the top menu bar
The above procedure could be automated by creating
a python script which mimics that behaviour.
But this is an ugly solution because i have to find an empty
layer first, then move the object around just to get that number.
I know, i could calculate that number by creating a copy of the
object mesh, apply the modifiers and then examine the resulting
mesh object. But that sounds like very inefficient to me.
A nice alternative would be to provide the values per Object either
as object properties or via a python function. I would be interested
in getting efficient access to:
- number of faces of an object (taking modifiers into account)
- number of vertices of an object (taking modifiers into account)
It would be nice if these values where available in Edit mode and
in object mode.
Furthermore i propose to add a function:
which shall return a dictionary containing the statistics information
that is currently provided as string by bpy.context.scene.statistics()
Would these features be problematic to implement ?
More information about the Bf-committers