Such thing could be useful. I am beginner who tries to write exporter script by my own. Learning is difficult. Any tips how to navigate better in Blender 2.55 API (and 2.49) reference? There was good tutorial how to write exporter for 2.49 in WikiBooks, but 2.55 is different. I have hard time figuring out how to make anything useful out of these references. So far I have (key parts are from 2.55 OBJ exporter script):
# learning.py
import bpy
def MyMesh():
ob = bpy.context.active_object # Get active object from scene
me = ob.data
print ('New run')
print(ob)
print(type(ob))
print(me)
print(type(me))
me_verts = me.vertices[:]
# Vert
for v in me_verts:
print('v %.6f %.6f %.6f
' % tuple(v.co))
MyMesh()
Any tips how to find things from API and how to learn syntax? I mostly do not know when I can add module after my variable.
EDIT:
I can’t add URL link, so sad. Odd restriction.
EDIT2: With script snippet I can ask question:
mesh = bpy.data.meshes["Cube"]
for v in mesh.vertices:
print(v.co.xyz)
In 2.49 API there is class Mesh, inside it has ‘instanse variables’ verts. Blender 2.55 works with mesh.vertices. Is it example how things have been changed in 2.55?