Blender programming learning

I am newbie and have a little knowledge of the basics of python. Soon after learning Blender programming, my learning method was to watch the Blender API, analyze the Blender plugin for learning, and watch some video tutorials on YouTube. The textools plugin on the internet is very good, it’s free. There is a lot of code in the analysis plug-in, only 80% of the code and structure can be understood, and the data processing in it is unclear. I don’t know if I should learn that knowledge in order to understand the code in the textools plugin, or if there is a learning path.

You will have to get some sample data you are interested in. Most of the times you can export them automatically from some source but other times you can just type them manually. You place these data into an array or some fake data structure (class) you come up with. Then you can write console tests and test if the results are what you expect. This is like doing unit testing. You can even call blender.exe from command line while passing your script filepath as a parameter and run everything at once.

Then you might focus only on the part you are interested in and and start debugging and changing things in order to see how it works. You might be able to do some extra setup to use an external IDE as well so you can debug things line by line.
(Other IDEs you can check also, such as PyCharm / VisualStudio / etc).

Perhaps at some point Blender as an environment might get in the way, with it’s API quirks and modal operators and crashes etc. So you just use a graphics engine like Pyglet / Bgfx / Raylib and get very quick prototyping on what you want to do, with straight input and debugging and usability etc. However once you are done with the experiments and come up with experience and solution, you can transition immediately back to Blender and save up to 80% of your code. Just do only a few changes to adapt everything to the Blender API.

1 Like