- The export and import scripts are indeed an excellent form of documentation.
- There is a massive amount of documentation. This includes a quickstart and API overview. More importantly it has a good search box (warning: avoid including parenthesis when searching functions).
- Interactively you can use the python console to investigate which properties are available on a given reference. It has a ctrl+space auto-complete (auto reveal).
in the console for instance
>>> obj = bpy.context.object # the current active object
>>> obj = bpy.data.objects['Cube'] # object specified by name
if you type
obj. and hit ctrl+space you'll see all the attributes of the object at that level. This list is long, and you can scroll the sidebar
As you state
me = obj.data, the me named variable is just a convention, it could be called whatever, but it's handy to stick to the convention.
obj.data.<ctrl+space> looks like
If you want to see information about the mesh you might do
# get coordinates of 1st vertex (index=0)
# indices that make up the first polygon in the mesh
Note that the ctrl+space feature will show all attributes starting with the letter v if you do
obj.data.v<ctrl+space> like this:
This becomes useful once you get a mental picture of the API, it can speed up navigation big time.