Cleanup: BLO: move validate code into own header.

Does not make sense to keep that with BLO_writefile.h, this can also be
used by read code, and some other parts of Blender (like ed_undo.c
currently)...
This commit is contained in:
2019-01-25 17:31:32 +01:00
parent 693721cc7e
commit 2a7b74c237
7 changed files with 48 additions and 7 deletions

View File

@@ -0,0 +1,41 @@
/*
* ***** 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.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef __BLO_BLEND_VALIDATE_H__
#define __BLO_BLEND_VALIDATE_H__
/** \file BLO_blend_validate.h
* \ingroup blenloader
* \brief Utils ensuring .blend file (i.e. Main) is in valid state during write and/or read process.
*/
struct Main;
struct ReportList;
bool BLO_main_validate_libraries(struct Main *bmain, struct ReportList *reports);
#endif

View File

@@ -44,6 +44,4 @@ extern bool BLO_write_file(
extern bool BLO_write_file_mem(
struct Main *mainvar, struct MemFile *compare, struct MemFile *current, int write_flags);
bool BLO_main_validate_libraries(struct Main *bmain, struct ReportList *reports);
#endif

View File

@@ -64,6 +64,7 @@ set(SRC
intern/writefile.c
BLO_blend_defs.h
BLO_blend_validate.h
BLO_readfile.h
BLO_undofile.h
BLO_writefile.h

View File

@@ -46,8 +46,8 @@
#include "BKE_main.h"
#include "BKE_report.h"
#include "BLO_blend_validate.h"
#include "BLO_readfile.h"
#include "BLO_writefile.h"
#include "readfile.h"

View File

@@ -171,9 +171,9 @@
#include "NOD_common.h"
#include "NOD_socket.h"
#include "BLO_blend_defs.h"
#include "BLO_readfile.h"
#include "BLO_undofile.h"
#include "BLO_blend_defs.h"
#include "RE_engine.h"

View File

@@ -188,10 +188,11 @@
#endif
#include "BLO_writefile.h"
#include "BLO_blend_defs.h"
#include "BLO_blend_validate.h"
#include "BLO_readfile.h"
#include "BLO_undofile.h"
#include "BLO_blend_defs.h"
#include "BLO_writefile.h"
#include "readfile.h"

View File

@@ -56,7 +56,7 @@
#include "BKE_workspace.h"
#include "BKE_paint.h"
#include "BLO_writefile.h"
#include "BLO_blend_validate.h"
#include "ED_gpencil.h"
#include "ED_render.h"