diff options
Diffstat (limited to 'doc/python_api/examples/bpy.types.Object.py')
-rw-r--r-- | doc/python_api/examples/bpy.types.Object.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/python_api/examples/bpy.types.Object.py b/doc/python_api/examples/bpy.types.Object.py index 5301797aae2..2ddce248a5b 100644 --- a/doc/python_api/examples/bpy.types.Object.py +++ b/doc/python_api/examples/bpy.types.Object.py @@ -2,7 +2,7 @@ Basic Object Operations Example +++++++++++++++++++++++++++++++ This script demonstrates basic operations on object like creating new -object, placing it into scene, selecting it and making it active +object, placing it into scene, selecting it and making it active. """ import bpy @@ -11,15 +11,15 @@ from mathutils import Matrix scene = bpy.context.scene # Create new lamp datablock -lamp_data = bpy.data.lamps.new(name="New Lamp", type="POINT") +lamp_data = bpy.data.lamps.new(name="New Lamp", type='POINT') -# Create new object with out lamp datablock +# Create new object with our lamp datablock lamp_object = bpy.data.objects.new(name="New Lamp", object_data=lamp_data) # Link lamp object to the scene so it'll appear in this scene scene.objects.link(lamp_object) -# Place lamp to specified location +# Place lamp to a specified location lamp_object.location = (5.0, 5.0, 5.0) # And finally select it make active |