Tutorial: Introduction to Blender 2.5 API with Examples


#1

Hello Folks.

Following is a link to my First tutorial for Blender 2.5 focusing on introducing you to the basics of the Python API. Please do suggest improvements and also let me know if you find any inconsistencies. I am working on more tutorials and any ideas for further tutorials are also welcome. Thank You. :-)

Learning Blender 2.5: Introduction to Blender Python API


#2

Very, very awesome.
Been thinking about getting to grips with python for a while now (years, possibly), but I’m a world class procrastinator, so not a lot has come of it so far.
I know Perl fairly well, but hopefully that won’t prove too much of a hindrance, haha.

Very nice walkthrough of the console features, and a very nice primer for the bpy api.
Maybe it’d be a good idea to link some sort of general python primer at the bottom as well, along with the bpy specific stuff, just for convenience?


#3

Thanks for this! I just this week got a request to build a 3d animation of some scienticif data involving particles. With this great introduction I’ve been playing with the API the last day and I’m feeling confident I’m able to produce what the client wants :slight_smile: Now I’m keeping my fingers crossed that my employer will give me the opportunity to take on the job!

Thanks again!


#4

Thank you dAfTiE for your suggestions. I have incorporated them. :slight_smile:

  • Satish

#5

Hello Ayreon.

I am glad that you found the tutorial useful for your immediate work needs. The Blender 2.5 Python API has been designed so nicely to mimic the functionality of Blender that, once you get the basics, the world is the limit.

I am going to be adding more tutorials related to Python in the near future.

  • Satish.

#6

Added one more exercise towards the end of the tutorial. :lightbulb

Check first post for link to tutorial.


#7

Thank you thank you. Very helpful!


#8

Thanks for the new excersise!
I got a problem with the last excersise. I’m getting an error that keyword layer is unrecognized.
Any idea what might be wrong? I’m overlooking something and I have no idea what :slight_smile:

Ayreon


#9

Hello Ayreon.

That error could have come if you typed it as “Layer” instead of “layer”. Python is case sensitive…Let me know if that’s what you overlooked. :slight_smile:

But, thanks for bringing this up, I will add a note in my tutorial about the the case sensitivity of Python language.


#10

Thanks for the hint. I’ve programmed python a couple of years ago, but I’m a bit rusty now. I checked and double checked but layers was written with a small letter ‘l’. Oh well, just restarted and voila it works. Guess I will never know what was wrong, just glad it works now :slight_smile:


#11

One other reason could be that the Python console muddled the indentation momentarily and restarting fixed it. I guess we will only know next time a similar peculiar thing happens :curious:


#12

Nice video.

Blender now has a preset you can click to get 4 viewports. (Ctrl+Alt+Q)

No more having to split viewports. This was one of the things I just couldn’t stand about Blender.


#13

You can also type “Toggle Quad View” in the operator search menu to activate it…


#14

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.