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

Asset Linking

1st May 2020

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

Published by

Sybren A. Stüvel

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

5 Comments

Join to comment publicly.

Dan Pool

2nd May 2020 - 00:36

@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 A. Stüvel

2nd May 2020 - 13:52

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

Alex Dumproff

30th August 2021 - 17:19

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

30th August 2021 - 17:30

@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 A. Stüvel

7th October 2021 - 10:23

@Alex Dumproff Just start Blender from the terminal view.

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...