BlenderDev/New Dev Info

Wikipedia,自由的百科全书

Contents

Introduction

This page is meant to provide new developers with information about how the Blender development process works, where to find info and how to determine which parts of Blender are safe to work on (Blender is currently being slowly refactored and rewritten, and as such some parts are marked off-limits until their rewrite has happened).

You can find additional info at Get Involved.

介绍

本页是为了给新的开发人员一个比较全面的blender开发流程的信息,告诉大家如何找到需要的资料,知道blender的哪一部分可以放心的在动手脚(blender现在正在缓慢的重构和重写当中,很多地方是禁区,直到重写完成以后才能进行工作)

你可以在 这里找到更多的信息。

Get Involved.

Communication Information

Most communication happens on the mailing lists at bf-committers (developers talk), bf-python (python scripts talk) and bf-funboard (new features talk), and on the #blendercoders IRC channel hosted by FreeNode.net.

No spamming or flaming on the list or irc channel is allowed.

Do not send html messages to the mailing lists. Html messages can be contain a variety of security problems (like the common practice of including hidden image tags that link to a special, per-email-address url, and then watching the url to confirm that an email address is "live") and as such tend to be mistrusted by many people.

Sunday IRC Meeting

Every Sunday there is a development meeting in #blendercoders. It takes place at GMT 15:00, see the Sunday Meeting Agenda page for more information (including meeting notes of past meetings).
The sunday meeting is where all the developers bring each other up to speed on their various projects and review pending patches on the blender patch tracker.

During the meeting, stay on topic. If you want to seek approval for project ideas, or contact another developer. Login before the meeting, hang around after or message the developer personaly during meeting time.

联系信息 大多数的联系是发生在邮件列表中如: 在freenode的频道也可以得到相关信息。

请不要在这些地方撒野。

不要在邮件列表中传送html消息(里面有很多的安全隐患)这样会让你失信于其他人。


周末irc会议 每个周末在频道都有开发会议,一般在gmt的下午3点,可以在周末会议摘要中看到更多信息。 周末会议加速大家对各人项目的认识和速度,协调一些补丁的制作。 在会议上面,需要贴近主题的进行讨论。如果需要对自己的项目进行验证,或者找其他开发者,就最好在会议之前,或者知道开会以后跟来谈,也可以单独的跟开发者联系。

Where to Get Started

Checking Out Sources From CVS

Blender development happens on a CVS server; it's generally not a good idea to work on the source downloads available for each release.

The cvs module where main development happens is "bf-blender" (e.g. the cvsroot is "/cvsroot/bf-blender"). "Bf-blender" has two folders: "blender" and "lib." Depending on your platform, you may need to check out part of "lib," (for example, on windows you check out lib/windows, making sure to do so in the directory below "blender"). The "blender" folder is where the actual sources are.


怎样开始 从cvs上面check出代码。 blender的开发是在cvs服务器上面进行的;通常,对所有的发行版本上面工作,并不是一个明智的选择.

cvs模块中,一直主要开发的名字叫bf-blender

Links to Blender-Related CVS Information

GForge CVS Mini Tutorial

Daily CVS Checkouts

Blender3d.org CVS Info Page

TortoiseCVS, a Windows CVS Client

Cervisia, a KDE CVS Client

CvsGUI, has versions for Windows, Gnome/Linux and OSX

Building Blender

The following links are tutorials and information on how to build Blender.

List of External Dependencies (for if you need to obtain them manually)

Building Blender with Scons Mingw/Windows Tutorial (Includes Getting CVS, Installing build tools and debugging using all free tools).

Scons instructions from CVS.

Building Blender With Cygwin

Compiler Tools

Compiling with VC7 - Note that the project files are now vc7.1.

If there are problems compiling, feel free to join #blendercoders on irc.freenode.net for assistance. If someone can help, it's generally standard procedure to switch over to #blendercompilers, so people arn't conducting complex debugging in #blendercoders itself. Please note: use pastebin.com for large error messages, don't paste them into irc!

Intro to the Development Process

Blender development is structured similarly to Python's BDFL model (BDFL stands for Benevolent Dictator For Life). The idea is that the project is managed by one man, in this case Ton Roosendaal, who delegates design decisions to a group of module owners, while still maintaining a veto right of what goes into Blender).

For a list of module owners, see [1].

Your First Project

Once you have blender compiled your probably wondering where to start tinkering. If you are a Blender user then there is probably some niggeling thing you would like to add or change. If you are new to Blender then you will need to take a look and see what you might work on.

There are no hard and fast rules about where to start, so find an area that interests you and start looking onto it.

Some hints for your first projects:

  • An area of interest (even better, and area of Blender you use)
  • Double check it is not already done.
  • It's best not to change Blender's file format (SDNA)
  • Don't choose a project that spans across many files and areas of Blender, since you may get bogged down trying to understand everything at once.
  • Make sure your project doesn't violate code marked for refactoring.

Here are some areas that can give you a foot in.

Small Features

Adding in small features is a good way to start getting your hands dirty, even if you dont make a patch to commit, it can evolve into something more useful, take a new direction, or spark interest in new areas to develop.

Bug Fixing

One of the easiest ways to get involved with coding Blender is by fixing bugs. Bug-fixing lets you focus on a small part of the Blender source rather than trying to understand it all at once. The list of current bugs is here. So pick an area of interest and start fixing! When you have got it, make a patch and submit it to the patch tracker as described here .

Python API

If you have used python and need to access data/functionality that currently not available, then extending the python api can be a good place to start since there is a lot of example code and you can often start by copying functions and modifying them.

Guide to Developing Blender

Development process

Steps for getting a patch into Blender

  1. Find an area in Blender you want to improve upon.
    If you need inspiration, check Requests (barely up do date). You can also scan the forums on blender.org or blenderartists.org and the functionnalities mailing list
    Some people will do simple coding tests, to make sure what they want is feasible; others will do this later.
  2. Determine whether that area of the code is off-limits.
    (see Code Marked for Refactoring for a list of off-limits code).
  3. Find whoever "owns" the code and check if he agrees with your project.
    See the list of module owners to find who owns what. Generally the best idea is to talk to the owner(s) in #blendercoders, but new developers might want to email the mailing list instead.
  4. Post a design document on this wiki.
    (Create a new page linked to BlenderDev/Current_Projects.
    To obtain wiki editing rights, follow instructions on the main page.
  5. Do the actual coding.
    See Coding Blender, below.
  6. Make a patch.
    See Using_Patches
    Making the patch isn't particulary hard, what makes this part annoying is
    a)the wait for the patch to be reviewed, which can take weeks if you push for it and months if you don't, and...
    b) the fact that the module owner may heavily modify your patch :)
    Keep in mind your patch may be rejected; although the reason for all the above steps is to hopefully make sure you never get to the coding stage if it's decided that your project isn't suitable in Blender (miscommunications between module owners and the BDFL can sometimes result in approved projects that should't have been approved, but this is pretty rare).

Hints for getting your patch reviewed and approved

Patches, whether for new features or bugfixes, get reviewed much quicker when they

  • are accompanied by a good description of how they work
  • include a test script or .blend file to demonstrate they actually work. You did test it, right?
  • are readable. Put some useful comments in your code. Code is read much more than it is written. Don't make people struggle to figure out what you are doing.

Coding Blender

There's a lot of information on coding blender out there; see the below links. The most basic introduction to the code is to look at source/blender/src/space.c, which has most of the event handling functions (you can use grep or windows search to find the functions used in space.c). 这里有很多关于Blender编码的信息;查看下面的链接.最基本的代码介绍请查看Source/blender/src/space.c,它有大量消息处理函数(你可以使用Grep(一个Unix工具)或者Windows的查找来找到在Space.c中的相关函数). Blender Development Guides and Standards

The Coding Blender section on Blender3d.org.

Coding Tutorials 1

Coding Tutorials 2

Code Marked For Refactoring

The following areas of Blender's codebase are "off-limits" until their refactoring is completed (this may not be a complete list).

The Event System

Personal tools