1
$\begingroup$

I want to explore python and MEL for 3d scripting. I have knowledge of blender and Maya (modeling, animation, rigging and a little bit of simulation ), and basic OOP coding knowledge. But I don't know where to start. Will it differ from one software to another? Please refer some courses. Also it would be better if the courses are free :)

$\endgroup$
3
  • $\begingroup$ MEL is obviously off topic on Blender Stack Exchange. $\endgroup$ Mar 13, 2023 at 7:07
  • 1
    $\begingroup$ Aking for tutorials and resources is kind of off-topic as well, but learning Python's API comes up quite a lot here so I think it's valuable for BSE community to have some answers about that. I think we should not close this question. $\endgroup$ Mar 13, 2023 at 7:57
  • $\begingroup$ Hello and welcome. Asking for links to resources about X is considered off topic here, asking directly about X is encouraged though. If you can rephrase your question to focus on the specific difficulties you are encountering, rather than point you to some site, please edit your post so it can be reopened. As it stands it is not a good fit for this site. $\endgroup$ Mar 13, 2023 at 10:50

1 Answer 1

3
$\begingroup$

To learn Blender's Python API, you obviously have to learn Python scripting first. Python.org website provides a lot of resources like the documentation for Python which might look boring and complex, but it is very valuable in learning it. With Python and scripting all resources you need to learn are online so simple Google search will get you started just fine. You will find places like https://www.w3schools.com/python/ which is just one of many brilliant resources for learning. There are also many video tutorials like the ones on Youtube.

Once you have basic knowledge of Python, you need to look into Blender's Python API. You always have the documentation for it as well.

In both cases - Python and Blender's Python API - the docs are actually quite good and video tutorials you will easily find online will get you started. There are so many of them it's hard to recommend any specific ones. It's best for you to choose something you like yourself. Besides that, practice can really speed up learning, so you should open Blender and explore what you can do with it. You will find really great Python examples in the text editor's Templates menu:

enter image description here

Another invaluable tool in exploring bpy in Blender is the Autocomplete feature of the Python Console. That's the Tab button. Just start writing something and see what's available:

enter image description here

Once you have basic understanding, you can also explore thousands of Blender's add-ons that are written in Python(pretty much all of them are and if you can use an add-on, you can also read it's source code). All add-ons that come with Blender are in Blender's install directory(on Windows that's C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons). You can also see the ones you install(on Windows that's %appdata%\Blender Foundation\Blender\3.4\scripts\addons - you can copy/paste that into the address bar of Windows file explorer)

If you get stuck with something, just ask here on Blender Stack Exchange. These days it's getting kind of hard to find unanswered questions if they are formed in a specific and clear manner.

$\endgroup$
1
  • $\begingroup$ Thanks a ton! :D $\endgroup$
    – user147439
    Mar 13, 2023 at 9:10

Not the answer you're looking for? Browse other questions tagged .