diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-10 17:25:35 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-10 17:25:35 +0400 |
commit | b5e1c48ca769bd83434d3686569fa36c50dbd9cb (patch) | |
tree | 6cc8d87bd7941791cf8b4487f3c5d317886e1e56 /source/blender/blenloader | |
parent | f40566e5a4ad1ffd522a597d13d73527f804baf5 (diff) |
startup.blend: add a function BLO_update_defaults_startup_blend to change
default settings in the startup.blend without having to actually save and embed
the file, which can be a tricky process and is problematic in branches and
patches.
This function can be emptied each time a new startup.blend is committed.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 5 | ||||
-rw-r--r-- | source/blender/blenloader/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 42 |
3 files changed, 47 insertions, 1 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 00ff5863e59..58d0cf6d264 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -265,7 +265,10 @@ void BLO_main_expander(void (*expand_doit_func)(void *, struct Main *, void *)); * \param mainvar the Main database to expand */ void BLO_expand_main(void *fdhandle, struct Main *mainvar); - + +/* Update defaults in startup.blend, without having to save and embed it */ +void BLO_update_defaults_startup_blend(struct Main *mainvar); + #ifdef __cplusplus } #endif diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 104c58b1c9e..f865962bac9 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -46,6 +46,7 @@ set(SRC intern/runtime.c intern/undofile.c intern/versioning_250.c + intern/versioning_defaults.c intern/versioning_legacy.c intern/writefile.c diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c new file mode 100644 index 00000000000..beb8d901ab1 --- /dev/null +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -0,0 +1,42 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + * + */ + +/** \file blender/blenloader/intern/versioning_defaults.c + * \ingroup blenloader + */ + +#include "BLI_utildefines.h" + +#include "DNA_scene_types.h" +#include "DNA_userdef_types.h" + +#include "BKE_main.h" + +#include "BLO_readfile.h" + +/* Update defaults in startup.blend, without having to save and embed the file. + * This function can be emptied each time the startup.blend is updated. */ +void BLO_update_defaults_startup_blend(Main *main) +{ +} + |