Some people may advocate learning python outside of Blender, and that is good advise for people who are not to visual or who are great at reading technical data without getting bored out of their skull. I am not that way. I had programming experience before learning Python too though. I have learned enough to build a random level generator, and rig a skeleton using Python, along with some good tricks for finding what I need in Python. My advise would be, if you are a visual person, check out some of the python tutorials on youtube, spend time here in this forum, and read code that others have written, it will help you a lot. I have a tutorial on my LinkedIn group site which tackles one of the most frustrating things for newcomers to Blender - context issues - actually I will paste it here:
One of the most common problems that you will run into, is the command prompt will give you an error saying you are “out of context” . . . so your question becomes, "Well, what is IN context? A trick I use to find out is this:
Let’s say you have the code:
original_type = bpy.context.area.type
bpy.context.area.type = “VIEW_3D”
bpy.ops.object.origin_set(type=‘GEOMETRY_ORIGIN’)
bpy.context.area.type = original_type
Which helps you switch context. But that is not what you want . . . you want a list of what contexts are available, so you can find out why you are getting the out of context error . . . . what I do, is just change the second line so that it will error out, and voila, you get your list of contexts:
bpy.context.area.type = “VIE”
Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
TypeError: bpy_struct: item.attr = val: enum “VIE” not found in (‘VIEW_3D’, ‘TIMELINE’, ‘GRAPH_EDITOR’, ‘DOPESHEET_EDITOR’, ‘NLA_EDITOR’, ‘IMAGE_EDITOR’, ‘SEQUENCE_EDITOR’, ‘CLIP_EDITOR’, ‘TEXT_EDITOR’, ‘NODE_EDITOR’, ‘LOGIC_EDITOR’, ‘PROPERTIES’, ‘OUTLINER’, 'USER)
I checked to see if it was available using the help or dir commands . . . . but could not find a thing. That said, the help and dir commands are very useful. You can use these commands to get more information . . .
help(bpy.context.area.type)
or
dir(bpy.context.area.type)
Another thing that is extremely helpful, especially when you do not know what options you have, is use the autocomplete button at the bottom of the console . . . put in the path you are working with, and leave a “.” at the end, then press the autocomplete button . . .
bpy. then press the autocomplete button . . . and it gives . . .
app
context
data
ops
path
props
types
utils
Last but not least, you can get a lot of information from the API, just make sure you are looking at an up-to-date API, as older API’s are nearly worthless.
There are other tutorials on my LinkedIn group, (Blender Open Artist Group) here http://www.linkedin.com/groups?home=&gid=6677523, this is an open group, so anyone can join it. I have open source code there, with a link for a tutorial for building a random level generator in Blender using Python, and some auto-rigging code in Python. There are other non-Python Blender tutorials as well, anyone can post tutorials there.