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:
authorKen Hughes <khughes@pacific.edu>2008-01-22 08:45:09 +0300
committerKen Hughes <khughes@pacific.edu>2008-01-22 08:45:09 +0300
commitb778daed815e2dfcc803c97a5a40d41e6a4b4e16 (patch)
tree5dd2cb70eb30b5343ab25f42275880ee6c2fe244 /source/blender/python
parent659316e4f491b62868a6706fb35d097f51711c67 (diff)
Python API
---------- Correct error in LibData module documentation.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/api2_2x/doc/LibData.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/doc/LibData.py b/source/blender/python/api2_2x/doc/LibData.py
index 7884ea50659..7b6f4950c76 100644
--- a/source/blender/python/api2_2x/doc/LibData.py
+++ b/source/blender/python/api2_2x/doc/LibData.py
@@ -18,7 +18,7 @@ which module is supported in the end.
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 @@ class LibData:
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