mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
code cleanup: includes, also correct some py example typos
This commit is contained in:
parent
e6a43441b9
commit
b5b8306685
35 changed files with 172 additions and 157 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Simple Object Panel
|
||||
+++++++++++++++++++
|
||||
This panel has a :class:`Panel.poll` and :class:`Panel.draw_header` function,
|
||||
even though the contents is basic this closely resemples blenders panels.
|
||||
even though the contents is basic this closely resembles blenders panels.
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue