Blender V4.3
world.cc File Reference
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <optional>
#include "MEM_guardedalloc.h"
#include "DNA_defaults.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_icons.h"
#include "BKE_idtype.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_node.hh"
#include "BKE_preview_image.hh"
#include "BKE_world.h"
#include "BLT_translation.hh"
#include "DRW_engine.hh"
#include "DEG_depsgraph.hh"
#include "GPU_material.hh"
#include "BLO_read_write.hh"

Go to the source code of this file.

Macros

#define DNA_DEPRECATED_ALLOW
 

Functions

static void world_free_data (ID *id)
 
static void world_init_data (ID *id)
 
static void world_copy_data (Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag)
 
static void world_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void world_blend_write (BlendWriter *writer, ID *id, const void *id_address)
 
static void world_blend_read_data (BlendDataReader *reader, ID *id)
 
WorldBKE_world_add (Main *bmain, const char *name)
 
void BKE_world_eval (Depsgraph *depsgraph, World *world)
 

Variables

IDTypeInfo IDType_ID_WO
 

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 17 of file blenkernel/intern/world.cc.

Function Documentation

◆ BKE_world_add()

World * BKE_world_add ( Main * bmain,
const char * name )

Definition at line 220 of file blenkernel/intern/world.cc.

References BKE_id_new(), and ID_WO.

Referenced by new_world_exec().

◆ BKE_world_eval()

void BKE_world_eval ( Depsgraph * depsgraph,
World * world )

◆ world_blend_read_data()

static void world_blend_read_data ( BlendDataReader * reader,
ID * id )
static

◆ world_blend_write()

◆ world_copy_data()

static void world_copy_data ( Main * bmain,
std::optional< Library * > owner_library,
ID * id_dst,
const ID * id_src,
const int flag )
static

Only copy internal data of World ID from source to already allocated/initialized destination. You probably never want to use that directly, use BKE_id_copy or BKE_id_copy_ex for typical needs.

WARNING! This function will not handle ID user count!

Parameters
flagCopying options (see BKE_lib_id.hh's LIB_ID_COPY_... flags for more).

Definition at line 85 of file blenkernel/intern/world.cc.

References BKE_id_copy_in_lib(), BKE_previewimg_id_copy(), BLI_listbase_clear(), World::drawdata, flag, World::gpumaterial, bNodeTree::id, World::id, LIB_ID_COPY_NO_PREVIEW, LIB_ID_CREATE_LOCAL, LIB_ID_CREATE_NO_USER_REFCOUNT, World::lightgroup, MEM_dupallocN, blender::bke::node_tree_localize(), World::nodetree, and World::preview.

◆ world_foreach_id()

◆ world_free_data()

static void world_free_data ( ID * id)
static

◆ world_init_data()

static void world_init_data ( ID * id)
static

Variable Documentation

◆ IDType_ID_WO

IDTypeInfo IDType_ID_WO
Initial value:
= {
sizeof(World),
"World",
N_("worlds"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition BKE_idtype.hh:39
#define BLT_I18NCONTEXT_ID_WORLD
#define FILTER_ID_TE
Definition DNA_ID.h:1187
@ INDEX_ID_WO
Definition DNA_ID.h:1282
#define FILTER_ID_WO
Definition DNA_ID.h:1190
@ ID_WO
struct World World
static void world_free_data(ID *id)
static void world_blend_write(BlendWriter *writer, ID *id, const void *id_address)
static void world_blend_read_data(BlendDataReader *reader, ID *id)
static void world_foreach_id(ID *id, LibraryForeachIDData *data)
static void world_init_data(ID *id)
static void world_copy_data(Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag)
#define N_(msgid)

Definition at line 190 of file blenkernel/intern/world.cc.