Dev:SundayMeetingAgenda/NewDev meetings/2010-03-07th

提供: wiki
移動先: 案内検索

Proposed Topics

  1. Good first projects: This comes up fairly often so it could help to make some lists of good places to start developing, as well as giving feedback if new dev's ideas if they are appropriate for starting.
  2. Getting SVN access, quick topic, maybe people are interested in how devs normally gain svn access, the inclusion of bf-extensions as an external directory means we can have python devs who can only work on their own add-ons.
  3. Debugging basics, how to get a backtrace with gdb, printf, some other tools that can be useful for checking memory and profiling.
  4. Google Summer of Code: Requirements, projects, etc.

Good First Projects

Q: what type of projects does Blender want? A: there are huge numbers of potential projects improvements you can have a look at the gsoc 2010 suggestion list: http://blenderartists.org/forum/showthread.php?p=1581471 there is also the durian wish list there is also the todo list for 2.5 there is also the blenderplanet suggestion list which is ridiculously huge porting scripts are a great first project for pythoners other good projects in C are improving the python api, adding some simple function, mostly useful if your alredy scripting

gtsteel is working in brecht's render25 branch

Q: what is expected to have your work accepted into blender? A: readable code; generally useful patches. Also it doesn't have to have all features and options in the first patch, small increments are better. It's good to keep patches focused on 1 thing, a lot harder to review if patches touch many areas. You need to have a basic knowledge of C, and coding with it. How to inspect variables etc should all be taught in college, in college programming courses :).

How deep your knowledge needs to be depends on the area you are working in. If you are working in UI updates and the drawing code, then you should know OpenGL. For a first project, if you never contributed to blender and are not an experienced dev, I think can be quite small, try make 1,2 very small improvements or fixes. Just to get into the process. Fixes are good because they are more likely to get reviewed. Pick one area that you noticed is a bit neglected and try to make some small fixes there.

Q: I've noticed that a lot of Blender's code is undocumented. Would it be good to add comments to functions then I figure out what they do? A: Yes! that is an excellent first project, and easy patches to submit. Start by reviewing what is there, researching, figuring it out, because it already works.

Q: If we work from the list is there any way of letting other devs know that we are working on it? A: Email bf-committers, and use IRC. Every Sunday mtg has a "Current Projects" topic. Chat there and let people know what you are up to, and kaito will make it part of the minutes so everyone knows.

gtsteel is personally interested in the node based materials in 2.5 or GSOC

Q: Okay, so we just need to make a few patches? And then send it to the mailing list? A: Yes, mailing list & tracker, if your new the ML can be good to let us know that you are working on something... tracker gets neglected more then it should :S

Q: Anyone have a project they intend to start?, or interested in feedback? A: matd> unicode. i would like to know which areas i would need to take a look at appart from BIF_* to make blender fully unicode aware.

Fweeb> I intend on trying to get theme export to to work. I know that the theme attributes (most of them, at least) are all in RNA, so I just need to be pointed in the right direction as to where to go. Q: My assumption is that it should be similar to the hotkey export, correct? A: It should be a lot more simple, can loop over all attributes and write automatic.

Leif> start looking at some bugs first, to familierize myself with the codebase. A: its OK but be careful, some of the bugs are still open because they are really hard to fix. so look at the new bugs A: looking at bugs is a good idea but older ones can be toughy ones, unless you are very experienced at debugging in that case, knock yourself out :D

Q: if I have a question on what a module does, how do I find out who to contact? the author of it. e.g. RNA_types.h A: you could check the svn history of it. there's also the module owner list

Q: is http://wiki.blender.org/index.php/Dev:Source/Blender/Architecture accurate? A: glancing through the docs and they are not all fully up to date with current 2.5; some of it is up to date, while lots of other is not. lots of those were written almost a year ago Link: this is 2.5 specific http://wiki.blender.org/index.php/Dev:2.5/Source/Architecture

Example of neglected area, apart of blender thats not used so much, lattice tools, nurbs perhaps, a simple exporter not ported back

very simple example - get the OFF exporter from 2.4x working based on the 2.5 raw Add-On. its kind of an old format but can add back as an addon for people who have these historic files

Link: this is 2.4 specific http://wiki.blender.org/index.php/Dev:2.4/Source/Architecture

Q: http://wiki.blender.org/index.php/Dev:Source/Blender/Architecture there are links that are not specific, so valid both for 2.4 and 2.5 A: indeed I'm still trying to find a way to place correctly documents that are ok for 25 and 24

Q: the solid wire is that the same as mesh wire modifier? A: this is how Ideasman got involved

link: http://wiki.blender.org/index.php/Dev:Doc/Blender_Source/Files_structure and thinking the scripts should be in sources/blender/blenlib? working on converting the python to modifiers seems like a good place to get to know the code

Q: I think I need to know more about C and C++...

Link: programming: C tut list http://www.programmingtutorials.com/c.aspx Link: programming: cprogramming.com is another good site Link: programming: http://www.programmingtutorials.com/cplusplus.aspx Link: Blender coding: http://wiki.blender.org/index.php/Dev:Doc/Coding_Guides_Tutorials

SVN access and issues

scripts in release/scripts Q: How do I svn an old version? this page: http://www.blender.org/download/source-code/ only has 2.5, and the archives don't have anything newer than 1.46, so what is the folder so I can get 2.49 source code from svn? A: check out an svn branch. pick based on the tag, such as 2.49 all prior versions of blender are in an SVN branch, back till when it was opensourced from http://download.blender.org/source/

Debugging basics

Link: programming theory - http://local.wasp.uwa.edu.au/~pbourke/dataformats/

Backtrace

Q: What is a backtrace? A: backtrace will point you to what line crashed, sometimes this is not in a blender function, it may crash in a library for instance so you normally look at the last line that is apart of blenders source code in the backtrace

Q: Backtrace. how do I do this? so that i can supply a backtrace with a bug report A: build a debug build. ie BF_DEBUG = true in the SCONS config file. Then after compling cd to your blender_debug.exe, and do gdb blender_debug.exe or whatever it is called for your OS. gdb is an execution monitor. Then type run. Do whatever to cause the crash. Then switch to gdb and type bt to BackTrace. then copy and paste to the tracker

Link: gdb tutorial from carnegie-mellon http://www.cs.cmu.edu/~gilpin/tutorial/ Link: nice quick guide to gdb: http://beej.us/guide/bggdb/

but this is only how to get a backtrace, fairly important but also if you develop you want to know a bit more I think?

Breakpoints

you can also set breakpoints using gdb on linux (probably mac) its the same: gdb /path/to/blender on mac you might want to use the graphical tools though instead of command line on windows you might use msvc

>ddd blender

Tool: ddd is so 80's but I still use it on linux. but you can use the same steps as gdb to debug ddd=data-display-debugger, a gdb front-end. see http://www.sapac.edu.au/systems/corvus/docs/sgi-propack3/Porting_Guide/sgi_html/figures/ddd.jpg


youll want to do this before running blender, so you'd type this in.. >gdb ./blender >break somefile.c:123 where 123 is the line number. Choose 123 so that it hopefully triggers before the crash, right, to bracket where it actually occurs? >break creator.c:455 >run ....... then you run blender until this point is hit. once its hit you can switch to the terminal and print variables. when you're done..

Inspecting variables at the break

>p myVariable prints the variable up and down commands take you up and down the the call stack. say if the crash is in a library you may need to type in up a few times to get you into blenders code

continue execution at a break point

>c # for continue

Crashes caused by nulls

and one last thing...simple crashes with pointers are often caused if they are null, so look for that say you have a segfault on a line like this.. mv = me->mverts >p me and the response is zero: 0x0 this means me is invalid and needs to be checked earlier on in the code if (me==NULL) return; // for instance so then its a matter of finding where me should have been set. maybe type 'up' and see where 'me' comes from perhaps its the object data of an empty which wasnt checked to be mesh type for instacne

Link: programming tools: http://cslibrary.stanford.edu/107/UnixProgrammingTools.pdf Link: programming theory: http://cslibrary.stanford.edu/102/PointersAndMemory.pdf

Q: real quick do you need to add the [bf-commiters] when creating a topic on the ML? A: nope, it gets automaticely added

Tools: Unix: really like kdevelop's debugger. to debug I use kdevelop UI, it's very cool because it shows all values while debugging well exposed in columns, like arrays and so

Google Summer of Code (GSCOC)

Its a great way to get indoctrinated to the code and system for Blender. Link: http://code.google.com/soc/ A: basically Google pays students to work on open source during the summer GSOC is a program where google pays student as a summer job to contribute to open source projects Google grants a little money to help fund efforts to improve open source code. any OSS project can put in a proposal, and Blender usually gets a few projects. for various free software projects each student gets a mentor, their are evaluations involved, ... students get 10 weeks to do some project the BF administers the program. You the developer work with an experienced coder as a mentor

Q: is this a full time thing? A: well, yes and no. It is just during the summer, but it's very time-boxed but yes essentially fullish time job during summer, 8hrs a day it's expected that the student will work close to full time and you give a weekly update on your progress at the bf-dev meeting or at least provide work equivalent to full time this sounds really fun, like a sprint it's a way to get paid to learn over the summer, basically, and do something useful for a resume builder you have to be a student, not open to anyone

Q: is there a cost? A: nope, just take the time to do it properly. You need to be accepted, which is free.


Q: How do I start?

A: the process is:

  1. students have to write in proposals. for ideas see http://wiki.blender.org/index.php/Dev:Ref/GSoC/2010/Ideas
  2. Then BF picks a few for application - the BF only can submit a few applications
  3. Then the student and BF refine the proposal into a application that is sent in to Google
  4. Google picks the best and awards the BF the $.
  5. Student completes the assignment,
  6. BF approves the completion/effort and gets paid,
  7. and then student gets paid when complete.

students have a better chance of being accepted if they discuss their projects beforehand on the mailing list or on irc it's also a good way for mentors to pick potential students.

Q: do you have to be a student? A: yes

Link to past succesfful applications - http://wiki.blender.org/index.php/Dev:Ref/GSoC/2009/Ideas Link to a past successful example - http://wiki.blender.org/index.php/User:Brecht/SummerOfCode2005/Inverse_Kinematics_Proposal

Q: So, can I ask how the blender community defins 'thoroughly proficient in c'? A: definitely beyond hello world :) we expect you know how function pointers work, among other things but it depends on what people work on, and you should know the theory or be able to research the topic you should at minimal undestand C data types, pointers, memory allocations, working with strings... you should not be spending your GSOC project time learning C or SVN procedures Q: would submittinig a few patches go a long way in showing you that I know enough C? A: Yes! helps a lot if you show you can make some contribution beforehand GSOCers need to sign up for bf-blender-cvs and bf-commiters mailing lists"

Past GSOCs students: brecht did IK, and Aligorith, and Nicholas Bishop Mentors: theeth was a mentor

Q: did GsOC? What did he do? A: IK -.-

Link: anything for next meeting, just edit http://wiki.blender.org/index.php/Dev:SundayMeetingAgenda/NewDev_meetings/2010-04-04th