Blender Studio
  • Films
  • Projects
  • Training
  • Characters
  • Tools
  • Blog
  • Join
  • BLENDER.ORG

    • Download

      Get the latest Blender, older versions, or experimental builds.

    • What's New

      Stay up-to-date with the new features in the latest Blender releases.

    LEARNING & RESOURCES

    • Blender Studio

      Access production assets and knowledge from the open movies.

    • Manual

      Documentation on the usage and features in Blender.

    DEVELOPMENT

    • Developers Blog

      Latest development updates, by Blender developers.

    • Documentation

      Guidelines, release notes and development docs.

    • Benchmark

      A platform to collect and share results of the Blender Benchmark.

    • Blender Conference

      The yearly event that brings the community together.

    DONATE

    • Development Fund

      Support core development with a monthly contribution.

    • One-time Donations

      Perform a single donation with more payment options available.

Training Highlights
Stylized Rendering with Brushstrokes
Geometry Nodes from Scratch
Procedural Shading Fundamentals
Stylized Character Workflow

Training types
Course Documentation Production Lesson Workshop

Training categories
Animation Geometry Nodes Lighting Rendering Rigging Shading
Film Highlights
Wing It!
2023
Charge
2022
Sprite Fright
2021
Spring
2019
Project Highlights
Project DogWalk
Interactive
Gold
Showcase
BCON24 Identity
Showcase
Fighting with Grease Pencil
Article
Course
Scripting for Artists
Blender Versions
Videos
  1. 01

    Introduction & copy-pasting

    Free
  2. 02

    Names & Objects

  3. 03

    Stuff on Lists

  4. 04

    Data Types

  5. 05

    Collections: Mass-Rename of Objects

  6. 06

    Blender Collections

    Free
  7. 07

    For vs. While

    Free
  8. 08

    Your Own Operator

    Free
  9. 09

    From Script to Add-on

    Free
  10. 10

    User Interfaces

    Free
  11. 11

    Custom Properties

    Free
  12. 12

    Asset Linking

    Free
  13. 13

    Roast my Add-on

    Free
  14. 14

    The Roast of Nature Clicker

    Free
  15. 15

    Modal Operators

    Free
  16. 16

    Readability & Understandability

Tech
  1. 01

    Updating F-Curves

  2. 02

    Render 10,000 OBJ files

  3. 03

    Mass-Rename Bones & Vertex Groups

  4. 04

    Rendering from 'all' angles

Login to view this content

Join Blender Studio for just €11.50/month and get instant access to all of our training and film assets!

Login Join Blender Studio
Sybren Stüvel
Sybren Stüvel Author
License CC-BY
Report Problem
Videos

Readability & Understandability

Sometimes it can be tricky to get the computer to do exactly what you want, and it's a great victory when things finally work. It's tempting to move on to the next task at hand, but often it's better to look back and improve some things.

In this episode Sybren shows some techniques to reorganise code, with the aim of improving the readability & understandability.

  • 00:00 Intro
  • 01:12 Investigating the Camera Background Image panel code
  • 02:31 Splitting the code that handles an image into a function
  • 05:30 A little analysis of the loop
  • 06:11 Splitting up the code further into functions
  • 07:44 The has_bg mystery and the final flattening
  • 13:55 Cognitive Complexity
  • 15:00 Conclusion

This video was made using Blender 3.0 alpha.

Join to leave a comment.

12 comments
Rune Spaans
Rune Spaans
Jan. 22nd, 2024

Great video! But I am surprised to see someone working in computer graphics who does not know what bg stands for :)

Sybren Stüvel
Sybren Stüvel
Jan. 28th, 2024

@Rune Spaans To me it firmly means "Baldur's Gate".

Rune Spaans
Rune Spaans
March 8th, 2024

@Sybren A. Stüvel :D

Crisp Ness
Crisp Ness
July 9th, 2023

Hi @sybren I have a slightly unrelated question: some video's are free and some aren't. What criterium is used to decide when a video is free or not?

Sybren Stüvel
Sybren Stüvel
Aug. 1st, 2023

@Crisp Ness The intro is free as a teaser/trailer. The other free videos were produced during the first covid lockdown, as a gift to the Blender community now sitting at home.

Marty Fouts
Marty Fouts
Oct. 30th, 2021

I've just finished all 20 videos and I must say as someone who has been developing software professionally since 1973 this is the best introduction to a programming language for non-developers that I've ever seen. That alone is a difficult accomplishment but to also set the introduction in the context of a fairly complex domain, blender/bpy, is a serious achievement.  Well done.

Sybren Stüvel
Sybren Stüvel
Nov. 2nd, 2021

@Marty Fouts Thank you so much!

Steven Goodman
Steven Goodman
Aug. 8th, 2021

I followed along & edited the code in 3.0 Alpha ... It works perfectly (I back up the original ;0)...  I'v gotta say, that was the best python tutorial in refactoring I have ever see in two score years. Well played Dr. Stüvel.

Sybren Stüvel
Sybren Stüvel
Oct. 7th, 2021

@Steven Goodman Thank you so much!

Darío Baldiviezo
Darío Baldiviezo
June 30th, 2021

Cool! +1 for this type of content. Entertaining and useful

Oliver J Post
Oliver J Post
June 11th, 2021

Thanks! Applying these tips and tricks right away!

Miguel Ángel Pedreño Sánchez
Miguel Ángel Pedreño Sánchez
June 4th, 2021

Very interesting and useful video. I'll put this in practise with my addons/scripts ^^ thank you again, Sybren

Films Projects Training Blog Blender Studio for Teams
Pipeline and Tools
  • CloudRig
  • Blender Kitsu
  • Brushstroke Tools Add-on
  • Blender Studio Extensions
Characters
  • Mikassa
  • Whale
  • Ballan Wrasse
  • Snow
Studio
  • Terms & Conditions
  • Privacy Policy
  • Contact
  • Remixing Music
Blender Studio

The creators who share.

Artistic freedom starts with Blender The Free and Open Source 3D Creation Suite