Categories
Blog Post free software tutorial

Blender new developer quick start guide

Welcome, you are wanted here.

*Note that there have been some changes as the development moved to Gitea

You might be here because you like Blender and want to make it better. You might be a programmer who found a bug to fix or you are an artist who wants to learn to make an addon to improve your workflow. No matter who you are, the question we get all the time is “Where do I start?”

Here! You start here, as this page is created to help you get started quickly and find your way to writing code. We know it can be very hard to get started so we hope these resources will help.

Before we get started, we are excited you are here because the future of Animation could be in your hands…watch the video below to find out how.

Start here

***Note that some things will look different as you explore the code as they have moved to Gitea software.

“Today Blender development is moving to a new platform, hosted on projects.blender.org. The move has been announced and documented in several articles and documents, so here we will focus on the expected results of the move.

projects.blender.org is the new platform for bug reporting, task management and code review.

  • Bug reports and design tasks have been migrated to projects.blender.org. This includes task status, priority, labels and subscribers.
  • User accounts have been migrated to Blender ID. If you had a Blender ID account, the username is now set to the one from the profile there. If you did not, a new Blender ID account was created. Please contact Blender ID support in case of any problems, or reach out through the dedicated chat channel.
  • Code reviews and pastes have not been migrated but archived. Pending code reviews need to be resubmitted as pull requests.
  • Workboards and project descriptions will be manually recreated by the modules.

This is where you will find how to build/compile Blender on your system and it is what you will need to do to test your code and create patches to submit Blender code. “

New Developer Introduction

Building Blender

Steps to build Blender from scratch for each operating system. from Building Blender

Getting started with Blender development

Beginning developer workshop *class

This workshop is meant to demystify Blender’s code base by walking participants through setting up their development environment, making a small change to Blender, and compiling their own build.

Beginning developer workshop
While the core of Blender development takes place with the Blender Foundation/Studio, a substantial amount of development happens with coders who are either independent or affiliated with another organization or studio.
The amount of developer energy and interest in Blender is large and growing. Unfortunately, Blender’s source code is enormous and Blender’s development pipeline is not something that everyone is familiar with. This workshop is meant to demystify Blender’s code base by walking participants through setting up their development environment, making a small change to Blender, and compiling their own build. In addition, participants will also learn how to submit a patch and navigate the patch review process on Gitea.

Blender Developers Live: Dive into the Graph Editor is a live demo on how to look at and work on the Animation Code in Blender.  Sybren will be diving into the Graph Editor code. The purpose is to figure out how it works, make some modifications, and show the patch submission process.

*Links from the stream: Be sure to check out the description at the video for links to setup files and other resources.

Check out Blunder blog https://blunder.training/ to follow some tips from our friend Nate about his first steps in getting started helping fix code in Blender.

Also recommended Some anti-patterns

Hello fellow devs,

While reviewing code, there are some patterns that I frequently stumble upon. To me, they are clear anti-patterns, but the fact that I see them so often suggests people have different ideas about this. I would like to have a discussion about two of those (from my perspective) anti-patterns.”
Read the document to see how to improve this.

Here are some additional tips on development from Dr. Sybren.

Git & development

I’ll answer some of AresDeveaux ‘s questions about Git & development here as well, instead of in a thread, because I think it might help others here as well.

dr.sybren03:52

I’ll answer some of AresDeveaux ‘s questions about Git & development here as well, instead of in a thread, because I think it might help others here as well.

Would I be unable to commit to the main Blender by mistake?

Unless you are in one of the teams that have commit access, you cannot, so don’t worry.

As a rule of thumb, do not use your own main branch. It’s easiest to treat branches as ‘global’, so the main branch should only be the one from the official Blender repository. All your stuff you should do in a separate branch. That’ll keep your mind a bit more sane.

The other question is: when it is a good time to submit a pull request? 

If you want to know you’re on the right path, by all means create a PR. It always helps when the descrption is clear, and especially in a case like this where you have specific questions for the reviewer(s), just write them down. If the reviewers should only be looking at X and not at Y, just say so ?

by the way, the reason I'm using pull is to be up to date with the code, is that what I should be doing? 

That’s the main way to get your Git (but nothing else) up to date. Running make update is preferred, as that also updates the pre-built libraries, the unit test files, the add-ons, etc.

make update tries to figure out as well as possible what should be done. So when you’re on a release branch (like blender-v3.5-release) it’ll try and grab the libraries for that release as well. And when you switch your Git branch back to main, just run make update and it’ll switch back the libraries again.

When you’re on your own branch, let’s name it awesome-feature, and just want to sync between computers, then git push and git pull are enough.

Committing often is recommended. It’s on your own branch, so you can do that as much as you like. Until you do git push, those commits just sit locally on your computer anyway. They can be edited, split up into smaller commits, squashed together into bigger commits, whatever you want. Personally I often commit just to set a checkpoint for myself, “I know this works, before doing something risky let’s just commit”

The name "commit" implies I'm sure about the code, is that how commit should be interpreted?

It just means “this is now tracked by Git”. It allows you to write a little explanation of what you changed, and why. And, as I said, it can be as simple as creating a little ‘save game’ for yourself before you start on something else.

Once you’re talking about commits in the main Blender branch, then things are more strict.

I would also recommend creating separate commits for ‘functional changes’ (i.e. actual changes to the functionality) and for ‘non-functional changes’ (code changes that don’t change the actual functionality, like renaming a variable or just moving some code around).

Dr. Sybren

Sharing a fix for everyone, your first patch!

Yay! You are ready to send in a patch with your code, but before you do please review the guidelines and be patient.

How to contribute code https://wiki.blender.org/wiki/Process/Contributing_Code 

Example: Animation & Rigging Module: Code Review

Before submitting a patch, read through Contributing Code.

When a patch is to be reviewed by the Animation & Rigging module, do the following:

  • Make sure the patch description follows the Ingredients of a Patch guideline.
  • Add developers and artists from the Animation & Rigging module as reviewers. Be sure to pick at least one developer (when in doubt, add Sybren) as blocking reviewer. That way artists are free to approve any changes in functionality and user interface, without the patch immediately going to “Approved” state.
  • Tag the patch with the ‘Animation & Rigging’ project. This can only be done after the patch has been created, so you’ll have to edit it after creation.

Note: Some of this process is going to change and be improved as they move to a better patch and code management system called Gitea.

Stay Involved

That is all there is to getting started! If you want to be more involved and come talk with people about your code and or ask about the review status, check out how to stay involved.

Animation Module Chat: This is where we are talking about all things Blender Animation https://blender.chat/channel/animation-module and you will find links to upcoming open meetings to introduce yourself and talk about animation tasks or read about past meetings.

Here is more general information on getting in contact with developers.
Also more information on what is in development in Animation and Rigging

Follow the official Blender development channels for first-hand news, blogs, live streams, and more.

Tips and tricks for new addon developers

Sometimes building and fixing core Blender is too much and you just want to build a small tool to help your workflow.

These are the free chapters of Scripting for Artists, in which Sybren teaches how to automate things in Blender.

The entire Scripting for Artists training series can be found on Blender Cloud at https://cloud.blender.org/p/scripting-for-artists/

Great example of some very simple scripts to help save a huge amount of work in very practical examples, great after you start understanding the basics of scripting. His talk goes great with https://www.braverabbit.com/braverabbit/tools/toolshelf/ to quickly store code and run it in Blender without having to save out and install addons.

Inspiration

Maybe you want to make awesome 2D animation tools for improving Grease Pencil

Maybe you want to make some amazing NPR rendering tech for 3D animation to look like crafted hand drawn work like the team from DillonGoo Studios is doing. If you want to test their build, you will want to know and understand how to compile and build their version of Blender.

You can download it here https://github.com/dillongoostudios/goo-engine

Maybe you want to get more involved in a bigger part of Blender. Check out this behind the scenes look at the development process of Geometry Nodes and to see if it is something you want to take part in.

There are many ways to get involved and we hope this information here helps you get started.

Advanced

Last thing to do is understand the GPL license for your add on

https://orangeturbine.com/posts/how-to-make-your-blender-add-on-gpl-compliant

Our friends at Orange Turbine have published a great post explaining this to help you stay out of trouble with your code.

Bcon 2023 Streamlining Add-On Development

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.