Blender Studio
  • Films
  • Training
  • Characters
  • Pipeline
  • Blog
  • Sign in
  • 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.

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

Introduction & copy-pasting

Aug. 16th, 2017

info License: CC-BY Free
Download (33.7 MB)
Download English Subtitles
Report Problem
Sybren A. Stüvel
Sybren A. Stüvel Publisher

After introducing himself and this training course, Sybren shows how to start scripting Blender.

  • Introduction
  • Computers are stupid
  • Using the Python console
  • Copying stuff from Blender's user interface
  • Changing properties of objects
  • Sources of information

Links from the video

  • Blender's Python API documentation. This link is for daily builds, so it may be for a newer version of Blender than you're currently using. If you want the documentation for your version of Blender, go to Help → Python API Reference in Blender itself.
  • Python Standard Library. Here you can find lots of information about Python itself.

The Slides

Slides are only visible to Blender Cloud susbcribers

Join to comment publicly.

37 comments

Marjorie Chan
Marjorie Chan Feb. 9th, 2020

For those using it for 2.81, UV Sphere now uses the radius key instead of size

bpy.ops.mesh.primitive_uv_sphere_add(radius=0.1, location=(1, 1, 1))

Luis Felipe Peredo Noguez
Luis Felipe Peredo Noguez Feb. 11th, 2021

@mclifeisagame Thank you

Neil Brown
Neil Brown May 7th, 2020

Using Blender version 2.82 out of the box the python code doesn't show, I had to tick Python Tooltips in menu Edit > Preferences > Interface

dangnhattoan
dangnhattoan May 18th, 2020

*@Neil Brown* Thanks.

Jimmy Gunawan
Jimmy Gunawan Aug. 22nd, 2017

Copy paste while hovering on command is handy indeed. Cool~

Luciano A. Muñoz Sessarego
Luciano A. Muñoz Sessarego Aug. 21st, 2017

Really great, i also love that you put the slides!, it makes easy to go back and check stuff for reference!, good job sir!

Ludwig Heijden
Ludwig Heijden Dec. 24th, 2020

You made me buy a cloud account. Grrrrrr Sybren!

(thank you)

Jim Conrad
Jim Conrad April 14th, 2021

Autocomplete hotkey is TAB in Blender 2.8+

Julian Darley
Julian Darley Nov. 5th, 2020

at 4.20: auto-completion now uses tab rather than control space (in B2.90 - not sure about B2.8)

LUKE MORGANE GABIN EWENN
LUKE MORGANE GABIN EWENN Aug. 29th, 2017

I just love this series of video. It's just technical enough not to be boring and still the examples are simple enough to be understandable. Great job. I'm already using all that in my latest project. I'm Done with monkey business !

Sybren A. Stüvel
Sybren A. Stüvel Aug. 29th, 2017

@luke.video: Thanks!

Konrad Welz
Konrad Welz Oct. 8th, 2017

This is so excellent! Great delivery and graphics. Already worth my monthly subscription. More tutorials like this are always welcome. Thank you.

PlumpMath
PlumpMath Feb. 3rd, 2018

Transcript please. (no subtitle)

Gemma María Rull
Gemma María Rull Nov. 9th, 2018

Great!

Björn Strandberg
Björn Strandberg Nov. 21st, 2018

I get this error:

>>> bpy.data.objects("Cube").location.x Traceback (most recent call last): File "<blender_console>", line 1, in <module> TypeError: 'bpy_prop_collection' object is not callable

>>> bpy.data.objects("Cube").location[0] Traceback (most recent call last): File "<blender_console>", line 1, in <module> TypeError: 'bpy_prop_collection' object is not callable

what am i missing? Blender 2.79b MAC

Sybren A. Stüvel
Sybren A. Stüvel Nov. 22nd, 2018

@Björn Strandberg: You're writing a function call objects(...) instead of trying to index a collection objects[...] -- note the use of parentheses for the former, and brackets for the latter.

Show more replies
Björn Strandberg
Björn Strandberg Nov. 25th, 2018

Thanks a bunch!@Sybren A. Stüvel:

Arnar Ómarsson
Arnar Ómarsson March 8th, 2019

Should all of this (and the rest of this course) apply to Blender 2.8 Beta (2019-03-03)? Or should I wait for the official release?

Sybren A. Stüvel
Sybren A. Stüvel March 12th, 2019

*@Arnar Ómarsson* Much of these techniques will work on 2.8 beta, but there have been significant API changes. With that link you should be able to get quite far, though. Soon I'll start preparing to update things for Blender 2.80; not sure in which form or when that will be available on the Cloud though.

李杰
李杰 Nov. 26th, 2019

great!!!

Yule Mayevsky
Yule Mayevsky Jan. 12th, 2020

i am copying exactly like you. and i get an IndentationError: unexpected indent

Sybren A. Stüvel
Sybren A. Stüvel Sept. 27th, 2020

*@Yule Mayevsky* Python is whitespace-sensitive, so make sure that the indentation is correct and that you're not mixing tabs and spaces.

<deleted>
<deleted> Sept. 16th, 2020

Very nice indeed. Especially copying from Blender into the search of (Api)the documemtation, is what I did not know , a feature I will use probably a lot.

And congratulations Sybren to your way to giving lessons: Introduction what you will talk about, the talk, AND a recapulation of what has been shown. Great!

delete Delete
Jenae Renee Jordan
Jenae Renee Jordan Sept. 16th, 2020

Thank you so very much for this course, Mr. Stuvel.

jamesrossbond
jamesrossbond Nov. 4th, 2020

I have blender 2.9.01. is this course something I can do with it?

Sybren A. Stüvel
Sybren A. Stüvel June 3rd, 2021

@jamesrossbond Of course! Apart from a few minor things, Blender still works the same.

Julian Darley
Julian Darley Nov. 5th, 2020

at around 4 minutes, manipulating the scale: is it correct that scale multiplication is always done with respect to the original object? in other words, with this example command bpy.data.objects['Cube'].scale = (0.5, 0.3, 0.2) will it always make the cube the same size, rather than shrinking it from whatever size it is at the moment of executing the command?

Sybren A. Stüvel
Sybren A. Stüvel June 3rd, 2021

@Julian Darley Yup, the scale is always relative to the original size of the object.

Julian Darley
Julian Darley Nov. 5th, 2020

at 6.17, in the Help Menu one can see an Operator Cheat Sheet. clicking on it seems to do nothing, but in fact, a text file has been created and it can be viewed by selecting it in the Text Editor window under the text dropdown (see the text doc icon). if you keep clicking it (as i did before discovering what was happening), you will create more and more copies of the cheat sheet.

Troy Carpenter
Troy Carpenter Dec. 7th, 2021

It seems in more recent versions of blender when you hover over something and press control-c you are copying that fields value and not the the python path. Is there a new hotkey?

Sybren A. Stüvel
Sybren A. Stüvel Jan. 4th, 2022

@Troy Carpenter for editable fields, use ctrl+shift+c to get the data path.

Patrick R Roza
Patrick R Roza April 24th, 2022

Great series and would like to your vscode integation with blender. Maybe some bender python file structure.I want to write scripts that use other 3rd party modules and output to blender for visuals ( web scrap data then blender to give visuals). Also using python to create node configurations.  These are things that could make a new training series.

Johan Tri Handoyo
Johan Tri Handoyo Aug. 21st, 2017

copy and paste doesn't work for me. I'm using Blender 2.78c 64 bit in Ubuntu 16.04. Any idea why?

Sybren A. Stüvel
Sybren A. Stüvel Aug. 22nd, 2017

@johantri: What are you doing exactly? Which buttons are you pressing? Where is your mouse cursor when you press them?

Pete Robie
Pete Robie Dec. 23rd, 2017

Hi Sybren. I've been trying to create a selection box with a file browser and I've had no luck as of yet. I know it's a little more advanced, but would you mind pointing me in the right direction?

Sybren A. Stüvel
Sybren A. Stüvel Dec. 24th, 2017

@Pete Robie: The importance here is to think from the data perspective, and not from the GUI perspective. If you want to have a file selector, the property to store the selected file should have subtype='FILE_PATH'. Blender will draw an appropriate interface for you then.

Show more replies
Pete Robie
Pete Robie Dec. 24th, 2017

@Sybren A. Stüvel: Thank you.

  • Films
  • Training
  • Blog
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

Blender Studio

The creators who share.

Facebook Logo Twitter Logo YouTube Logo
Loading...