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:
Diffstat (limited to 'source/blender/blenkernel/intern/world.c')
-rw-r--r--source/blender/blenkernel/intern/world.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 5797c6c3f15..c7d2763774d 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -42,12 +42,14 @@
#include "BLI_utildefines.h"
#include "BLI_bpath.h"
-#include "BKE_world.h"
-#include "BKE_library.h"
#include "BKE_animsys.h"
#include "BKE_global.h"
-#include "BKE_main.h"
#include "BKE_icons.h"
+#include "BKE_library.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
+#include "BKE_node.h"
+#include "BKE_world.h"
void free_world(World *wrld)
{
@@ -63,6 +65,12 @@ void free_world(World *wrld)
BKE_free_animdata((ID *)wrld);
+ /* is no lib link block, but world extension */
+ if(wrld->nodetree) {
+ ntreeFreeTree(wrld->nodetree);
+ MEM_freeN(wrld->nodetree);
+ }
+
BKE_icon_delete((struct ID*)wrld);
wrld->id.icon_id = 0;
}
@@ -119,6 +127,9 @@ World *copy_world(World *wrld)
id_us_plus((ID *)wrldn->mtex[a]->tex);
}
}
+
+ if(wrld->nodetree)
+ wrldn->nodetree= ntreeCopyTree(wrld->nodetree);
if(wrld->preview)
wrldn->preview = BKE_previewimg_copy(wrld->preview);
@@ -143,6 +154,9 @@ World *localize_world(World *wrld)
}
}
+ if(wrld->nodetree)
+ wrldn->nodetree= ntreeLocalize(wrld->nodetree);
+
wrldn->preview= NULL;
return wrldn;