[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20887] branches/soc-2009-yukishiro/source /blender/blenloader/intern/readfile.c: add lib_link_lightenv (incomplete)

Jingyuan Huang jingyuan.huang at gmail.com
Mon Jun 15 03:56:48 CEST 2009


Revision: 20887
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20887
Author:   yukishiro
Date:     2009-06-15 03:56:46 +0200 (Mon, 15 Jun 2009)

Log Message:
-----------
add lib_link_lightenv (incomplete)

Modified Paths:
--------------
    branches/soc-2009-yukishiro/source/blender/blenloader/intern/readfile.c

Modified: branches/soc-2009-yukishiro/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/blenloader/intern/readfile.c	2009-06-14 23:33:43 UTC (rev 20886)
+++ branches/soc-2009-yukishiro/source/blender/blenloader/intern/readfile.c	2009-06-15 01:56:46 UTC (rev 20887)
@@ -2989,6 +2989,31 @@
 	return;
 }
 
+
+/* ************ READ LIGHTENV ***************** */
+static void lib_link_lightenv(FileData *fd, Main *main)
+{
+	LightEnv *env;
+
+	env= main->lightenv.first;
+	while(env) {
+		if(env->id.flag & LIB_NEEDLINK) {
+			// TODO: preview and probe image
+
+			lib_link_scriptlink(fd, &env->id, &env->scriptlink);
+			env->id.flag -= LIB_NEEDLINK;
+		}
+		env= env->id.next;
+	}
+}
+
+static void direct_link_lightenv(FileData *fd, LightEnv *env)
+{
+        direct_link_scriptlink(fd, &env->scriptlink);
+        env->preview = direct_link_preview_image(fd, env->preview);
+}
+
+
 /* ************ READ MESH ***************** */
 
 static void lib_link_mtface(FileData *fd, Mesh *me, MTFace *mtface, int totface)
@@ -4182,13 +4207,6 @@
 	}
 }
 
-/* ****************** READ LIGHTPAINT ***************** */
-static void direct_link_lightenv(FileData *fd, LightEnv *env)
-{
-        direct_link_scriptlink(fd, &env->scriptlink);
-        env->preview = direct_link_preview_image(fd, env->preview);
-}
-
 /* ****************** READ SCREEN ***************** */
 
 static void butspace_version_132(SpaceButs *buts)
@@ -9187,6 +9205,7 @@
 	lib_link_nodetree(fd, main);	/* has to be done after scene/materials, this will verify group nodes */
 	lib_link_brush(fd, main);
 	lib_link_particlesettings(fd, main);
+	lib_link_lightenv(fd, main)                                               ;
 
 	lib_link_mesh(fd, main);		/* as last: tpage images with users at zero */
 





More information about the Bf-blender-cvs mailing list