I have worked with Python in the past and I would like to make my own pluggins. I just would like to know if there is a website where I could learn all the tricks and how to’s related to pluggin scripts for a newbie like me. Thanks.
There is a series of tuts called The Python Workshop by Carsten “Calli” Wartmann and Martin “Strubi” Strubel, but it only covers the basics, and some parts are no longer right.
Since Python is self documentable (docstrings), you can browse the API and learn this way, or look at other people scripts and tear them appart.
Ok, how do I browse the API? Or even more important what API stands for?
There is a docbrowser script, but I don’t know where that is available. Otherwise you could just import modules and view the docstrings like this:
import modulename print dir(modulename)
Where ‘modulename’ is obviously the name of the module you want to investigate like ‘Blender’.
You can then use any of the names in that list to print the documentation string by appending ‘doc’ to the name. A ‘docstring’ is a short description of the function, for example the ‘Blender.Object.Get’ function:
import Blender print Blender.Object.Get.__doc__
Not all functions have a docstring btw, sometimes you wil get ‘none’, which means there is no docstring.
I heard API is a dutch word which means ‘small monkey’
Well, okay, maybe not, it is actually ‘Appplication Programming Interface’
In the BlenderCreator 2.14 documentation:
Definitely your responses have ignited more curiosity in me about the way Blender works with Python. Thanks to all.