[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13351] trunk/blender/source/blender/ python/api2_2x/doc/LibData.py: Python API

Ken Hughes khughes at pacific.edu
Tue Jan 22 06:45:09 CET 2008


Revision: 13351
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13351
Author:   khughes
Date:     2008-01-22 06:45:09 +0100 (Tue, 22 Jan 2008)

Log Message:
-----------
Python API
----------
Correct error in LibData module documentation.

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/doc/LibData.py

Modified: trunk/blender/source/blender/python/api2_2x/doc/LibData.py
===================================================================
--- trunk/blender/source/blender/python/api2_2x/doc/LibData.py	2008-01-22 05:34:53 UTC (rev 13350)
+++ trunk/blender/source/blender/python/api2_2x/doc/LibData.py	2008-01-22 05:45:09 UTC (rev 13351)
@@ -18,7 +18,7 @@
 Example::
 	import bpy
 
-	scn= bpy.scenes.active                            # get current scene
+	scn= bpy.data.scenes.active                       # get current scene
 	lib = bpy.libraries.load('//file.blend')          # open file.blend
 	ob = scn.objects.link(lib.objects.append('Cube')) # append Cube object from library to current scene
 	mat = lib.objects.link('Material')                # get a link to a material
@@ -103,17 +103,17 @@
 		B{Note}: Blender Objects cannot be appended or linked without linking
 		them to a scene.  For this reason, lib.objects.append() returns a
 		special "wrapper object" which must be passed to Scene.objects.link()
-		or bpy.scenes.active.link() in order to actually create the object.
+		or bpy.data.scenes.active.link() in order to actually create the object.
 		So the following code will not create a new object::
 			import bpy
 
-			scn= bpy.scenes.active                            # get current scene
+			scn= bpy.data.scenes.active                       # get current scene
 			lib = bpy.libraries.load('//file.blend')          # open file.blend
 			pseudoOb = lib.objects.append('Cube'))            # get an object wrapper
 		But this code will::
 			import bpy
 
-			scn= bpy.scenes.active                            # get current scene
+			scn= bpy.data.scenes.active                       # get current scene
 			lib = bpy.libraries.load('//file.blend')          # open file.blend
 			pseudoOb = lib.objects.append('Cube'))            # get an object wrapper
 			ob = scn.objects.link(pseudoOb)  				  # link to scene





More information about the Bf-blender-cvs mailing list