2011-02-18 14:05:18 +01:00
|
|
|
/*
|
2002-10-12 13:37:38 +02:00
|
|
|
* 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
|
2008-04-17 00:40:48 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2002-10-12 13:37:38 +02:00
|
|
|
*
|
|
|
|
* 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,
|
2010-02-12 14:34:04 +01:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-10-12 13:37:38 +02:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
2012-02-17 19:59:41 +01:00
|
|
|
#ifndef __BKE_WORLD_H__
|
|
|
|
#define __BKE_WORLD_H__
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2019-02-17 22:08:12 +01:00
|
|
|
/** \file
|
|
|
|
* \ingroup bke
|
2011-02-18 14:05:18 +01:00
|
|
|
*/
|
|
|
|
|
2018-11-08 15:56:56 +01:00
|
|
|
struct Depsgraph;
|
2013-02-05 13:46:15 +01:00
|
|
|
struct Main;
|
2002-10-12 13:37:38 +02:00
|
|
|
struct World;
|
|
|
|
|
2012-08-29 14:47:42 +02:00
|
|
|
void BKE_world_free(struct World *sc);
|
First step to handle missing libs/datablocks when reading a file.
Idea is, instead of ignoring completely missing linked datablocks, to
create void placeholders for them.
That way, you can work on your file, save it, and find again your missing data once
lib becomes available again. Or you can edit missing lib's path (in Outliner),
save and reload the file, and you are done.
Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon.
Future plans are also to be able to relocate missing libs and reload them at runtime.
Code notes:
- Placeholder ID is just a regular datablock of same type as expected linked one,
with 'default' data, and a LIB_MISSING bitflag set.
- To allow creation of such datablocks, creation of datablocks in BKE was split in two step:
+ Allocation of memory itself.
+ Setting of all internal data to default values.
See also the design task (T43351).
Reviewed by @campbellbarton, thanks a bunch!
Differential Revision: https://developer.blender.org/D1394
2015-10-20 14:44:57 +02:00
|
|
|
void BKE_world_init(struct World *wrld);
|
2018-01-19 05:34:54 +01:00
|
|
|
struct World *BKE_world_add(struct Main *bmain, const char *name);
|
2019-04-17 06:17:24 +02:00
|
|
|
void BKE_world_copy_data(struct Main *bmain,
|
|
|
|
struct World *wrld_dst,
|
|
|
|
const struct World *wrld_src,
|
|
|
|
const int flag);
|
2017-06-14 22:36:30 +02:00
|
|
|
struct World *BKE_world_copy(struct Main *bmain, const struct World *wrld);
|
2018-01-10 23:55:41 +01:00
|
|
|
struct World *BKE_world_localize(struct World *wrld);
|
2016-07-20 19:49:45 +02:00
|
|
|
void BKE_world_make_local(struct Main *bmain, struct World *wrld, const bool lib_local);
|
2018-11-08 15:56:56 +01:00
|
|
|
void BKE_world_eval(struct Depsgraph *depsgraph, struct World *world);
|
2002-10-12 13:37:38 +02:00
|
|
|
|
|
|
|
#endif
|