in the geometry panel,there is a spread sheet where user can get verices/face/etc info realtime .
not only current vertices position,but original vertices position, you can even filter selected ones.
for the reason, i’m thinking that get the info by coding.
there are many posts about this theme,but all of them are using bmesh full iteration and no original data.
so in the new version 3++. is there any api to do that? or which part of source code should be dig for developing the tool?
Hi!
For starters, you can get vertex position of a selected object using the depsgraph.
Spreedsheet
Console
Code
import bpy
m = bpy.context.object.evaluated_get(bpy.context.evaluated_depsgraph_get()).to_mesh()
for v in range(0, len(m.vertices)):
print(str(v) + " | " + str(m.vertices[v].co))
Many of the other attribute values you see in the spreedsheet can also be found using the BPY modules.
For example Mesh attributes:
https://docs.blender.org/api/current/bpy.types.Mesh.html
Curve attributes:
https://docs.blender.org/api/current/bpy.types.Curve.html
PointCloud attributes:
https://docs.blender.org/api/current/bpy.types.PointCloud.html
Volumetric [Grids]
https://docs.blender.org/api/current/bpy.types.Volume.html
As can be seen in the Spreedsheet Editor.
1 Like