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

Sybren Stüvel
Sybren Stüvel Author
  • Free
Download English Subtitles
Download .mp4   151.9 MB
License CC-BY
Report Problem
Videos

Asset Linking

Video Description

Set Building typically starts with linking in available assets from various blend files, instancing those into the scene, and positioning them nicely so that they can be picked up and placed. This is not a fun task, so perfect to automate with some scripting! In this episode of Scripting for Artists Sybren explains how to link data from different blend files, how to instance collections in the scene, and even covers the parsing of JSON files to separate the project-specific information from your add-on.

Links from the video:

  • Source code of the final asset
  • The Settlers project

Contents:

  • The Settlers project: 00:35
  • Manually going through the process: 01:30
  • Linking data with Python: 02:58
  • First step of linking: 05:48
  • Instancing collections into the scene: 08:38
  • Creating a collection if it doesn't exist yet: 10:40
  • Lining up the assets: 12:33
  • From snippet of code to add-on with functions: 13:22
  • Reading project-specifics from a JSON file: 17:27
  • Everything is working: 23:48
  • Cater for future changes: 24:08

Join to leave a comment.

5 comments
Alex Dumproff
Alex Dumproff
Aug. 30th, 2021

Wait ... did I see that correctly that you were able to start the python module from the terminal and get the Blender output like on the console?

Alex Dumproff
Alex Dumproff
Aug. 30th, 2021

@Alex Dumproff This comment system is way too trigger happy to post for my taste. ;) What I meant was: How did you get the system window output directly into the terminal vies of the VS Code window?

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

@Alex Dumproff Just start Blender from the terminal view.

Dan Pool
Dan Pool
May 2nd, 2020

@sybren The main thing I've not been able to wrap my mind around is creating an active tool. It would be great to get a tutorial on this. The template in the text editor "UI Tool Sample" is too simple. Specifically, it would be great to see how to implement a gizmo built with a combination of built-in gizmo shapes (arrow, circle, etc.) that are clicked and dragged on similar to the move tool or extrude tool.

Sybren Stüvel
Sybren Stüvel
May 2nd, 2020

*@Dan Pool* I've answered the same question on twitter ;-)

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