Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/BKE_world.h1
-rw-r--r--source/blender/blenkernel/intern/world.c7
-rw-r--r--source/blender/editors/render/render_shading.c4
3 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h
index 82830facccc..73eb340e887 100644
--- a/source/blender/blenkernel/BKE_world.h
+++ b/source/blender/blenkernel/BKE_world.h
@@ -31,7 +31,6 @@ struct Main;
struct World;
struct World *BKE_world_add(struct Main *bmain, const char *name);
-struct World *BKE_world_copy(struct Main *bmain, const struct World *wrld);
struct World *BKE_world_localize(struct World *wrld);
void BKE_world_eval(struct Depsgraph *depsgraph, struct World *world);
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 99f35d06c1d..d5142e2d1a4 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -210,13 +210,6 @@ World *BKE_world_add(Main *bmain, const char *name)
return wrld;
}
-World *BKE_world_copy(Main *bmain, const World *wrld)
-{
- World *wrld_copy;
- BKE_id_copy(bmain, &wrld->id, (ID **)&wrld_copy);
- return wrld_copy;
-}
-
World *BKE_world_localize(World *wrld)
{
/* TODO(bastien): Replace with something like:
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 5999a622368..5ebf2a3915d 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -873,7 +873,9 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
/* add or copy world */
if (wo) {
- wo = BKE_world_copy(bmain, wo);
+ World *new_wo = NULL;
+ BKE_id_copy_ex(bmain, &wo->id, (ID **)&new_wo, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS);
+ wo = new_wo;
}
else {
wo = BKE_world_add(bmain, DATA_("World"));