
If you have ever wanted to jump right into blender
development and have your own unique fun place to play
with your code right away.
This may be your answer.
That is if you can compile blender form source and you
want a little SPACE_TYPE playground to frolic in. And can
apply a patch.
I made this patch because I need to separate my code
for creating a space type and the work I'm doing for
Match Motion.
I thought it would be an insightful file for those whom
have a bit of background with source code.
Thus, review the code changes in this patch file and you'll
get some idea for what it takes to add a new SPACE_TYPE
in Blender 2.5.
Maybe it will take you less than the X number of days it took me.
(I had to painstakingly
figure it all out by hunting, testing changes, debugging, analyze revision histories... It took a few days really.)
But Lucky you. You can benefit from my time and hard work.
To instantly have a new space in which to write your own
code and make your own dreams a reality. Download and place
my patch in the /blender/ source directory and run:
patch -p0 < NEW_SPACE_TYPE_PATCH.txt
Then compile the source and voila!
Notes about my patch
1
The patch involves changes to 16 files.
M source/blender/blenkernel/intern/context.c
M source/blender/blenkernel/BKE_context.h
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesrna/intern/rna_userdef.c
M source/blender/makesrna/intern/rna_space.c
M source/blender/makesrna/RNA_access.h
M source/blender/windowmanager/WM_types.h
M source/blender/editors/screen/screen_ops.c
M source/blender/editors/screen/area.c
M source/blender/editors/include/ED_space_api.h
M source/blender/editors/include/ED_screen.h
M source/blender/editors/space_api/spacetypes.c
A source/blender/editors/space_matcher
A source/blender/editors/space_matcher/space_matcher.c
A source/blender/editors/space_matcher/space_matcher.h
2
This patch is HACKISH and I don't claim that it's fit for anything
but helping someone to understand what it takes to add a
space type to blender 2.5.
3
The rna code is absent or wrong and there is no save/restore
code.
4
I had to put my name in there sporadically
so I could find all my changes later. It was quite a process
to figure it all out in the first place so I had a lot of changes
I was making and then un-making.
In other news... I got blender to compile with FFMPEG
turns out that if you try to compile with with FFMPEG you need
to compile it with SDL and openAL. So, I spent about 3.5 hours
getting all that to run. Finally, I was able to move on to
studying how to get AR talking to blender. I also managed to
cement in my head how to get Xcode to recognize new libs.
But more on that topic later.
Download the patch: new_space_type_patch