While SCons building system was serving us really good for ages it's no longer having much attention by the developers and started to become quite a difficult task to maintain. What's even worse -- there started to be quite serious divergence between SCons and CMake which was only accumulating over the releases now. The fact that none of the active developers are really using SCons and that our main studio is also using CMake spotting bugs in the SCons builds became quite a difficult task and we aren't always spotting them in time. Meanwhile CMake became really mature building system which is available on every platform we support and arguably it's also easier and more robust to use. This commit includes: - Removal of actual SCons building system - Removal of SCons git submodule - Removal of documentation which is stored in the sources and covers SCons - Tweaks to the buildbot master to stop using SCons submodule (this change requires deploying to the server) - Tweaks to the install dependencies script to skip installing or mentioning SCons building system - Tweaks to various helper scripts to avoid mention of SCons folders/files as well Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit Reviewed By: campbellbarton, juicyfruit Differential Revision: https://developer.blender.org/D1680
49 lines
1.7 KiB
Plaintext
49 lines
1.7 KiB
Plaintext
The following 4 steps to adding a new image format to blender, its
|
|
probably easiest to look at the png code for a clean clear example,
|
|
animation formats are a bit more complicated but very similar:
|
|
|
|
Step 1:
|
|
create a new file named after the format for example lets say we were
|
|
creating an openexr read/writer use openexr.c
|
|
It should contain functions to match the following prototypes:
|
|
|
|
struct ImBuf *imb_loadopenexr(unsigned char *mem,int size,int flags);
|
|
/* Use one of the following depending on whats easyer for your file format */
|
|
short imb_saveopenexr(struct ImBuf *ibuf, FILE myfile, int flags);
|
|
short imb_saveopenexr(struct ImBuf *ibuf, char *myfile, int flags);
|
|
|
|
/* Used to test if its the correct format
|
|
int IMB_is_openexr(void *buf);
|
|
|
|
Step 2:
|
|
Add your hooks to read and write the image format these go in
|
|
writeimage.c and readimage.c just look at how the others are done
|
|
|
|
Step 3:
|
|
Add in IS_openexr to blender/source/blender/imbuf/IMB_imbuf_types.h
|
|
Add in R_openexr to source/blender/makesdna/DNA_scene_types.h
|
|
|
|
Step 4:
|
|
Add your hooks to the gui.
|
|
source/blender/src/buttons_scene.c
|
|
source/blender/src/toets.c
|
|
source/blender/src/writeimage.c
|
|
|
|
Step 5:
|
|
edit the following files:
|
|
blender/source/blender/imbuf/intern/util.c
|
|
blender/source/blender/src/filesel.c
|
|
blender/source/blender/src/screendump.c
|
|
and add your extension so that your format gets recognized in the thumbnails.
|
|
|
|
Step 6:
|
|
Alter the build process:
|
|
For cmake you need to edit blender/source/blender/imbuf/CMakeLists.txt
|
|
and add in your additional files to source_files.
|
|
If you have any external library info you will also need to add that
|
|
to the various build processes.
|
|
|
|
Step 7:
|
|
Its also good to add your image format to:
|
|
makepicstring in blender/source/blender/blenkernel/intern/image.c
|