diff options
author | Ken Hughes <khughes@pacific.edu> | 2008-01-22 08:45:09 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2008-01-22 08:45:09 +0300 |
commit | b778daed815e2dfcc803c97a5a40d41e6a4b4e16 (patch) | |
tree | 5dd2cb70eb30b5343ab25f42275880ee6c2fe244 /source/blender/python/api2_2x/doc | |
parent | 659316e4f491b62868a6706fb35d097f51711c67 (diff) |
Python API
----------
Correct error in LibData module documentation.
Diffstat (limited to 'source/blender/python/api2_2x/doc')
-rw-r--r-- | source/blender/python/api2_2x/doc/LibData.py | 8 |
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 |