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:
authorCampbell Barton <ideasman42@gmail.com>2007-05-05 10:09:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-05-05 10:09:03 +0400
commit66ffd1d2075dcc7a8fc9f197d3643d0cd26a9b79 (patch)
treef4792e485e46d81e12f41e9f1bfeec028e858aed /source/blender/python/api2_2x/doc
parentdf8cb37e1eeac4b846459378859f7eb8ff369e06 (diff)
more epy doc updates
added a constant dict "Blender.Object.IpoKeyTypes" to pass to ob.insertIpoKey(keytype), previously these constants were not documented well and added to Blender.Object directly
Diffstat (limited to 'source/blender/python/api2_2x/doc')
-rw-r--r--source/blender/python/api2_2x/doc/Object.py55
-rw-r--r--source/blender/python/api2_2x/doc/Scene.py2
2 files changed, 30 insertions, 27 deletions
diff --git a/source/blender/python/api2_2x/doc/Object.py b/source/blender/python/api2_2x/doc/Object.py
index 3e8cb5b044e..a837fd058c1 100644
--- a/source/blender/python/api2_2x/doc/Object.py
+++ b/source/blender/python/api2_2x/doc/Object.py
@@ -97,6 +97,20 @@ Example::
- ANISOTROPIC: Enable anisotropic friction (requires ACTOR, DYNAMIC)
- CHILD: reserved
+@type IpoKeyTypes: readonly dictionary
+@var IpoKeyTypes: Constant dict used for with L{Object.insertIpoKey} attribute.
+ Values can be ORed together.
+ - LOC
+ - ROT
+ - SIZE
+ - LOCROT
+ - LOCROTSIZE
+ - PI_STRENGTH
+ - PI_FALLOFF
+ - PI_SURFACEDAMP
+ - PI_RANDOMDAMP
+ - PI_PERM
+
@type RBShapes: readonly dictionary
@var RBShapes: Constant dict used for with L{Object.rbShapeBoundType}
attribute. Only one type can be selected at a time. Values are
@@ -125,8 +139,8 @@ def New (type, name='type'):
object = Blender.Object.New('Lamp')
lamp = Blender.Lamp.New('Spot')
object.link(lamp)
- scene = Blender.Scene.GetCurrent()
- scene.link(object)
+ sce = Blender.Scene.GetCurrent()
+ sce.link(object)
Blender.Redraw()
@Note: if an object is created but is not linked to object data, and the
@@ -764,11 +778,11 @@ class Object:
the scene and prints the name and location of each object::
import Blender
- objects = Blender.Object.Get()
+ sce = Blender.Scene.GetCurrent()
- for obj in objects:
- print obj.getName()
- print obj.getLocation()
+ for ob in sce.objects:
+ print obj.name
+ print obj.loc
@note: the worldspace location is the same as ob.matrixWorld[3][0:3]
"""
@@ -817,11 +831,10 @@ class Object:
the scene and prints the name of each object::
import Blender
- scn= Blender.Scene.GetCurrent()
- objects = scn.getChildren()
+ sce= Blender.Scene.GetCurrent()
- for obj in objects:
- print obj.getName()
+ for ob in sce.objects:
+ print ob.getName()
"""
def getParent():
@@ -881,10 +894,10 @@ class Object:
true number 'pi'. A better, less error-prone value of pi is math.pi from the python math module.::
import Blender
- objects = Blender.Object.Get()
+ sce = Blender.Scene.GetCurrent()
- for obj in objects:
- if obj.getType() == 'Camera':
+ for obj in sce.objects:
+ if obj.type == 'Camera':
obj.LocY = -obj.LocY
obj.RotZ = 3.141592 - obj.RotZ
@@ -896,19 +909,9 @@ class Object:
def insertIpoKey(keytype):
"""
- Inserts keytype values in object ipo at curframe. Uses module constants.
- @type keytype: Integer
- @param keytype:
- -LOC
- -ROT
- -SIZE
- -LOCROT
- -LOCROTSIZE
- -PI_STRENGTH
- -PI_FALLOFF
- -PI_PERM
- -PI_SURFACEDAMP
- -PI_RANDOMDAMP
+ Inserts keytype values in object ipo at curframe.
+ @type keytype: int
+ @param keytype: A constant from L{IpoKeyTypes<Object.IpoKeyTypes>}
@return: None
"""
diff --git a/source/blender/python/api2_2x/doc/Scene.py b/source/blender/python/api2_2x/doc/Scene.py
index c28460825d2..fb852f2aa49 100644
--- a/source/blender/python/api2_2x/doc/Scene.py
+++ b/source/blender/python/api2_2x/doc/Scene.py
@@ -112,7 +112,7 @@ class Scene:
@type timeline: Timeline
@ivar timeline: The L{timeline<TimeLine.TimeLine>} for this scene, named markers are stored here. (read only)
@type render: RenderData
- @ivar render: The scenes L{render<Render>} settings. (read only)
+ @ivar render: The scenes L{render<Render.RenderData>} settings. (read only)
@type radiosity: RenderData
@ivar radiosity: The scenes L{radiosity<Radio>} settings. (read only)
"""