Films Training Blog
Pipeline and Tools Characters
Pipeline and Tools Characters
search Login Join
favorite

Development Fund

Support Blender Core Development with a monthly contribution.

theaters

Blender Studio

The creators who share. Access production content and knowledge from the Open Movies.

code

Blender Developer Blog

Latest news and updates on Blender development.

people

Get Involved

Join the community and help with design, development, docs and more.

bar_chart

Open Data

A platform to collect and display the Blender Benchmark results.

menu_book

Blender Docs

Documentation on Blender's features, tools and API.

Blender Conference

The yearly event that brings together the Blender community in one place.

download

Get Blender

Download the latest Blender version, or try the beta!

Films
Training
Blog
Pipeline and Tools
Characters
Search
Login
Join

Course

Scripting for Artists
feed Course Overview
feed Blender Versions
Videos keyboard_arrow_down
  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 keyboard_arrow_down
  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

Course

Scripting for Artists
feed Blender Versions
Videos keyboard_arrow_down
  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 keyboard_arrow_down
  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

Videos

For vs. While

27th March 2020

info License: CC-BY Free
Download (43.1 MB)
Download English Subtitles
flag Report Problem

Published by

Sybren A. Stüvel

Loops! Python has multiple ways to loop. In this chapter of Scripting for Artists, Sybren explains how to choose between 'for' and 'while' loops.

  • For and While side-by-side: 00:34
  • Subdividing until there are enough vertices: 1:44
  • Preventing infinite loops: 05:42
  • Converting the While to a For: 7:04

1 Comments

Join to comment publicly.

Samuel Bernou

29th March 2020 - 19:13

Just a suggestion for future tutorial subjects (maybe not the right place): Best ways to handle context error and make context override when an operator fail to run from text editor. I think it might be usefull for a bunch of us ;). Your video are well made and I particularly like the suggestions of code flow like flipping conditions and such. Keep up !

Blender Studio

The Creators Who Share.

Facebook Logo Twitter Logo YouTube Logo
  • Films
  • Blog
  • Training
Pipeline and Tools
  • Cloud Rig
  • Blender Kitsu
  • Contact Sheet Add-on
  • Blender Purge
  • Blender Cloud Services
Characters
  • Einar
  • Security Bot
  • Huginn
  • Pack Bot
Studio
  • Terms & Conditions
  • Privacy Policy
  • Contact
  • Remixing Music
  • Blender.org
Loading...