~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/doc/Object.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
The Blender.Object submodule
5
5
 
6
6
B{New}:
7
 
  - Addition of attributes for particle deflection, softbodies, and
8
 
    rigidbodies.
9
 
  - Objects now increment the Blender user count when they are created and
10
 
    decremented it when they are destroyed.  This means Python scripts can
11
 
    keep the object "alive" if it is deleted in the Blender GUI.
12
 
  - L{Object.getData} now accepts two optional bool keyword argument to
13
 
      define (1) if the user wants the data object or just its name
14
 
      and (2) if a mesh object should use NMesh or Mesh.
15
 
  - L{Object.clearScriptLinks} accepts a parameter now.
16
 
  - Object attributes: renamed Layer to L{Layers<Object.Object.Layers>} and
17
 
    added the easier L{layers<Object.Object.layers>}.  The old form "Layer"
18
 
    will continue to work.
 
7
        - Addition of attributes for particle deflection, softbodies, and
 
8
                rigidbodies.
 
9
        - Objects now increment the Blender user count when they are created and
 
10
                decremented it when they are destroyed.  This means Python scripts can
 
11
                keep the object "alive" if it is deleted in the Blender GUI.
 
12
        - L{Object.getData} now accepts two optional bool keyword argument to
 
13
                        define (1) if the user wants the data object or just its name
 
14
                        and (2) if a mesh object should use NMesh or Mesh.
 
15
        - L{Object.clearScriptLinks} accepts a parameter now.
 
16
        - Object attributes: renamed Layer to L{Layers<Object.Object.Layers>} and
 
17
                added the easier L{layers<Object.Object.layers>}.  The old form "Layer"
 
18
                will continue to work.
19
19
 
20
20
 
21
21
Object
25
25
 
26
26
Example::
27
27
 
28
 
  import Blender
29
 
  scn = Blender.Scene.GetCurrent()      # get the current scene
30
 
  cam = Blender.Camera.New('ortho')     # make ortho camera data object
31
 
  ob = scn.objects.new(cam)             # make a new object in this scene using the camera data
32
 
  ob.setLocation (0.0, -5.0, 1.0)       # position the object in the scene
 
28
        import Blender
 
29
        scn = Blender.Scene.GetCurrent()      # get the current scene
 
30
        cam = Blender.Camera.New('ortho')     # make ortho camera data object
 
31
        ob = scn.objects.new(cam)             # make a new object in this scene using the camera data
 
32
        ob.setLocation (0.0, -5.0, 1.0)       # position the object in the scene
33
33
 
34
 
  Blender.Redraw()                      # redraw the scene to show the updates.
 
34
        Blender.Redraw()                      # redraw the scene to show the updates.
35
35
 
36
36
@type DrawModes: readonly dictionary
37
37
@var DrawModes: Constant dict used for with L{Object.drawMode} bitfield
38
 
    attribute.  Values can be ORed together.  Individual bits can also
39
 
    be set/cleared with boolean attributes.
40
 
      - AXIS: Enable display of active object's center and axis.
41
 
      - TEXSPACE: Enable display of active object's texture space.
42
 
      - NAME: Enable display of active object's name.
43
 
      - WIRE: Enable the active object's wireframe over solid drawing.
44
 
      - XRAY: Enable drawing the active object in front of others.
45
 
      - TRANSP: Enable transparent materials for the active object (mesh only).
 
38
        attribute.  Values can be ORed together.  Individual bits can also
 
39
        be set/cleared with boolean attributes.
 
40
                - AXIS: Enable display of active object's center and axis.
 
41
                - TEXSPACE: Enable display of active object's texture space.
 
42
                - NAME: Enable display of active object's name.
 
43
                - WIRE: Enable the active object's wireframe over solid drawing.
 
44
                - XRAY: Enable drawing the active object in front of others.
 
45
                - TRANSP: Enable transparent materials for the active object (mesh only).
46
46
 
47
47
@type DrawTypes: readonly dictionary
48
48
@var DrawTypes: Constant dict used for with L{Object.drawType} attribute.
49
 
    Only one type can be selected at a time.
50
 
      - BOUNDBOX: Only draw object with bounding box
51
 
      - WIRE: Draw object in wireframe
52
 
      - SOLID: Draw object in solid
53
 
      - SHADED: Draw object with shaded or textured
 
49
        Only one type can be selected at a time.
 
50
                - BOUNDBOX: Only draw object with bounding box
 
51
                - WIRE: Draw object in wireframe
 
52
                - SOLID: Draw object in solid
 
53
                - SHADED: Draw object with shaded or textured
54
54
 
55
55
@type ParentTypes: readonly dictionary
56
56
@var ParentTypes: Constant dict used for with L{Object.parentType} attribute.
57
 
      - OBJECT: Object parent type.
58
 
      - CURVE: Curve deform parent type.
59
 
      - LATTICE: Lattice deform parent type.
60
 
      - ARMATURE: Armature deform parent type.
61
 
      - VERT1: 1 mesh vert parent type.
62
 
      - VERT3: 1 mesh verts parent type.
63
 
      - BONE: Armature bone parent type.
64
 
      
 
57
                - OBJECT: Object parent type.
 
58
                - CURVE: Curve deform parent type.
 
59
                - LATTICE: Lattice deform parent type. Note: This is the same as ARMATURE, 2.43 was released with LATTICE as an invalid value.
 
60
                - ARMATURE: Armature deform parent type.
 
61
                - VERT1: 1 mesh vert parent type.
 
62
                - VERT3: 1 mesh verts parent type.
 
63
                - BONE: Armature bone parent type.
 
64
                        
65
65
 
66
66
@type ProtectFlags: readonly dictionary
67
67
@var ProtectFlags: Constant dict used for with L{Object.protectFlags} attribute.
68
 
    Values can be ORed together.  
69
 
      - LOCX, LOCY, LOCZ: lock x, y or z location individually
70
 
      - ROTX, ROTY, ROTZ: lock x, y or z rotation individually
71
 
      - SCALEX, SCALEY, SCALEZ: lock x, y or z scale individually
72
 
      - LOC, ROT, SCALE: lock all 3 attributes for location, rotation or scale
 
68
        Values can be ORed together.  
 
69
                - LOCX, LOCY, LOCZ: lock x, y or z location individually
 
70
                - ROTX, ROTY, ROTZ: lock x, y or z rotation individually
 
71
                - SCALEX, SCALEY, SCALEZ: lock x, y or z scale individually
 
72
                - LOC, ROT, SCALE: lock all 3 attributes for location, rotation or scale
73
73
 
74
74
@type PITypes: readonly dictionary
75
75
@var PITypes: Constant dict used for with L{Object.piType} attribute.
76
 
    Only one type can be selected at a time.
77
 
      - NONE: No force influence on particles
78
 
      - FORCE: Object center attracts or repels particles ("Spherical")
79
 
      - VORTEX: Particles swirl around Z-axis of the object
80
 
      - WIND: Constant force applied in direction of object Z axis
81
 
      - GUIDE: Use a Curve Path to guide particles
 
76
        Only one type can be selected at a time.
 
77
                - NONE: No force influence on particles
 
78
                - FORCE: Object center attracts or repels particles ("Spherical")
 
79
                - VORTEX: Particles swirl around Z-axis of the object
 
80
                - WIND: Constant force applied in direction of object Z axis
 
81
                - GUIDE: Use a Curve Path to guide particles
82
82
 
83
83
@type RBFlags: readonly dictionary
84
84
@var RBFlags: Constant dict used for with L{Object.rbFlags} attribute.
85
 
    Values can be ORed together.  
86
 
      - SECTOR: All game elements should be in the Sector boundbox
87
 
      - PROP: An Object fixed within a sector
88
 
      - BOUNDS: Specify a bounds object for physics
89
 
      - ACTOR: Enables objects that are evaluated by the engine
90
 
      - DYNAMIC: Enables motion defined by laws of physics (requires ACTOR)
91
 
      - GHOST: Enable objects that don't restitute collisions (requires ACTOR)
92
 
      - MAINACTOR: Enables MainActor (requires ACTOR)
93
 
      - RIGIDBODY: Enable rolling physics (requires ACTOR, DYNAMIC)
94
 
      - COLLISION_RESPONSE: Disable auto (de)activation (requires ACTOR, DYNAMIC)
95
 
      - USEFH: Use Fh settings in Materials (requires ACTOR, DYNAMIC)
96
 
      - ROTFH: Use face normal to rotate Object (requires ACTOR, DYNAMIC)
97
 
      - ANISOTROPIC: Enable anisotropic friction (requires ACTOR, DYNAMIC)
98
 
      - CHILD: reserved
 
85
        Values can be ORed together.  
 
86
                - SECTOR: All game elements should be in the Sector boundbox
 
87
                - PROP: An Object fixed within a sector
 
88
                - BOUNDS: Specify a bounds object for physics
 
89
                - ACTOR: Enables objects that are evaluated by the engine
 
90
                - DYNAMIC: Enables motion defined by laws of physics (requires ACTOR)
 
91
                - GHOST: Enable objects that don't restitute collisions (requires ACTOR)
 
92
                - MAINACTOR: Enables MainActor (requires ACTOR)
 
93
                - RIGIDBODY: Enable rolling physics (requires ACTOR, DYNAMIC)
 
94
                - COLLISION_RESPONSE: Disable auto (de)activation (requires ACTOR, DYNAMIC)
 
95
                - USEFH: Use Fh settings in Materials (requires ACTOR, DYNAMIC)
 
96
                - ROTFH: Use face normal to rotate Object (requires ACTOR, DYNAMIC)
 
97
                - ANISOTROPIC: Enable anisotropic friction (requires ACTOR, DYNAMIC)
 
98
                - CHILD: reserved
 
99
 
 
100
@type IpoKeyTypes: readonly dictionary
 
101
@var IpoKeyTypes: Constant dict used for with L{Object.insertIpoKey} attribute.
 
102
        Values can be ORed together.
 
103
                - LOC
 
104
                - ROT
 
105
                - SIZE
 
106
                - LOCROT
 
107
                - LOCROTSIZE
 
108
                - PI_STRENGTH
 
109
                - PI_FALLOFF
 
110
                - PI_SURFACEDAMP
 
111
                - PI_RANDOMDAMP
 
112
                - PI_PERM
99
113
 
100
114
@type RBShapes: readonly dictionary
101
115
@var RBShapes: Constant dict used for with L{Object.rbShapeBoundType}
102
 
    attribute.  Only one type can be selected at a time.  Values are
103
 
    BOX, SPHERE, CYLINDER, CONE, and POLYHEDERON
 
116
        attribute.  Only one type can be selected at a time.  Values are
 
117
        BOX, SPHERE, CYLINDER, CONE, and POLYHEDERON
104
118
 
105
119
"""
106
120
 
107
121
def New (type, name='type'):
108
 
  """
109
 
  Creates a new Object.  Deprecated; instead use Scene.objects.new().
110
 
  @type type: string
111
 
  @param type: The Object type: 'Armature', 'Camera', 'Curve', 'Lamp', 'Lattice',
112
 
      'Mball', 'Mesh', 'Surf' or 'Empty'.
113
 
  @type name: string
114
 
  @param name: The name of the object. By default, the name will be the same
115
 
      as the object type.
116
 
      If the name is already in use, this new object will have a number at the end of the name.
117
 
  @return: The created Object.
118
 
 
119
 
  I{B{Example:}}
120
 
 
121
 
  The example below creates a new Lamp object and puts it at the default
122
 
  location (0, 0, 0) in the current scene::
123
 
    import Blender
124
 
 
125
 
    object = Blender.Object.New('Lamp')
126
 
    lamp = Blender.Lamp.New('Spot')
127
 
    object.link(lamp)
128
 
    scene = Blender.Scene.GetCurrent()
129
 
    scene.link(object)
130
 
 
131
 
    Blender.Redraw()
132
 
  @Note: if an object is created but is not linked to object data, and the
133
 
  object is not linked to a scene, it will be deleted when the Python
134
 
  object is deallocated.  This is because Blender does not allow objects
135
 
  to exist without object data unless they are Empty objects.  Scene.link()
136
 
  will automatically create object data for an object if it has none.
137
 
  """
 
122
        """
 
123
        Creates a new Object.  Deprecated; instead use Scene.objects.new().
 
124
        @type type: string
 
125
        @param type: The Object type: 'Armature', 'Camera', 'Curve', 'Lamp', 'Lattice',
 
126
                'Mball', 'Mesh', 'Surf' or 'Empty'.
 
127
        @type name: string
 
128
        @param name: The name of the object. By default, the name will be the same
 
129
                as the object type.
 
130
                If the name is already in use, this new object will have a number at the end of the name.
 
131
        @return: The created Object.
 
132
 
 
133
        I{B{Example:}}
 
134
 
 
135
        The example below creates a new Lamp object and puts it at the default
 
136
        location (0, 0, 0) in the current scene::
 
137
                import Blender
 
138
 
 
139
                object = Blender.Object.New('Lamp')
 
140
                lamp = Blender.Lamp.New('Spot')
 
141
                object.link(lamp)
 
142
                sce = Blender.Scene.GetCurrent()
 
143
                sce.link(object)
 
144
 
 
145
                Blender.Redraw()
 
146
        @Note: if an object is created but is not linked to object data, and the
 
147
        object is not linked to a scene, it will be deleted when the Python
 
148
        object is deallocated.  This is because Blender does not allow objects
 
149
        to exist without object data unless they are Empty objects.  Scene.link()
 
150
        will automatically create object data for an object if it has none.
 
151
        """
138
152
 
139
153
def Get (name = None):
140
 
  """
141
 
  Get the Object from Blender.
142
 
  @type name: string
143
 
  @param name: The name of the requested Object.
144
 
  @return: It depends on the 'name' parameter:
145
 
      - (name): The Object with the given name;
146
 
      - ():     A list with all Objects in the current scene.
147
 
 
148
 
  I{B{Example 1:}}
149
 
 
150
 
  The example below works on the default scene. The script returns the plane object and prints the location of the plane::
151
 
    import Blender
152
 
 
153
 
    object = Blender.Object.Get ('plane')
154
 
    print object.getLocation()
155
 
 
156
 
  I{B{Example 2:}}
157
 
 
158
 
  The example below works on the default scene. The script returns all objects
159
 
  in the scene and prints the list of object names::
160
 
    import Blender
161
 
 
162
 
    objects = Blender.Object.Get ()
163
 
    print objects
164
 
  @note: Get will return objects from all scenes.
165
 
      Most user tools should only operate on objects from the current scene - Blender.Scene.GetCurrent().getChildren()
166
 
  """
 
154
        """
 
155
        Get the Object from Blender.
 
156
        @type name: string
 
157
        @param name: The name of the requested Object.
 
158
        @return: It depends on the 'name' parameter:
 
159
                        - (name): The Object with the given name;
 
160
                        - ():     A list with all Objects in the current scene.
 
161
 
 
162
        I{B{Example 1:}}
 
163
 
 
164
        The example below works on the default scene. The script returns the plane object and prints the location of the plane::
 
165
                import Blender
 
166
 
 
167
                object = Blender.Object.Get ('plane')
 
168
                print object.getLocation()
 
169
 
 
170
        I{B{Example 2:}}
 
171
 
 
172
        The example below works on the default scene. The script returns all objects
 
173
        in the scene and prints the list of object names::
 
174
                import Blender
 
175
 
 
176
                objects = Blender.Object.Get ()
 
177
                print objects
 
178
        @note: Get will return objects from all scenes.
 
179
                        Most user tools should only operate on objects from the current scene - Blender.Scene.GetCurrent().getChildren()
 
180
        """
167
181
 
168
182
def GetSelected ():
169
 
  """
170
 
  Get the user selection. If no objects are selected, an empty list will be returned.
171
 
  
172
 
  @return: A list of all selected Objects in the current scene.
173
 
 
174
 
  I{B{Example:}}
175
 
 
176
 
  The example below works on the default scene. Select one or more objects and
177
 
  the script will print the selected objects::
178
 
    import Blender
179
 
 
180
 
    objects = Blender.Object.GetSelected()
181
 
    print objects
182
 
  @note: The active object will always be the first object in the list (if selected).
183
 
  @note: The user selection is made up of selected objects from Blender's current scene only.
184
 
  @note: The user selection is limited to objects on visible layers;
185
 
      if the user's last active 3d view is in localview then the selection will be limited to the objects in that localview.
186
 
  """
 
183
        """
 
184
        Get the user selection. If no objects are selected, an empty list will be returned.
 
185
        
 
186
        @return: A list of all selected Objects in the current scene.
 
187
 
 
188
        I{B{Example:}}
 
189
 
 
190
        The example below works on the default scene. Select one or more objects and
 
191
        the script will print the selected objects::
 
192
                import Blender
 
193
 
 
194
                objects = Blender.Object.GetSelected()
 
195
                print objects
 
196
        @note: The active object will always be the first object in the list (if selected).
 
197
        @note: The user selection is made up of selected objects from Blender's current scene only.
 
198
        @note: The user selection is limited to objects on visible layers;
 
199
                        if the user's last active 3d view is in localview then the selection will be limited to the objects in that localview.
 
200
        """
187
201
 
188
202
 
189
203
def Duplicate (mesh=0, surface=0, curve=0, text=0, metaball=0, armature=0, lamp=0, material=0, texture=0, ipo=0):
190
 
  """
191
 
  Duplicate selected objects on visible layers from Blenders current scene,
192
 
  de-selecting the currently visible, selected objects and making a copy where all new objects are selected.
193
 
  By default no data linked to the object is duplicated; use the keyword arguments to change this.
194
 
  L{Object.GetSelected()<GetSelected>} will return the list of objects resulting from duplication.
195
 
  
196
 
  @type mesh: bool
197
 
  @param mesh: When non-zero, mesh object data will be duplicated with the objects.
198
 
  @type surface: bool
199
 
  @param surface: When non-zero, surface object data will be duplicated with the objects.
200
 
  @type curve: bool
201
 
  @param curve: When non-zero, curve object data will be duplicated with the objects.
202
 
  @type text: bool
203
 
  @param text: When non-zero, text object data will be duplicated with the objects.
204
 
  @type metaball: bool
205
 
  @param metaball: When non-zero, metaball object data will be duplicated with the objects.
206
 
  @type armature: bool
207
 
  @param armature: When non-zero, armature object data will be duplicated with the objects.
208
 
  @type lamp: bool
209
 
  @param lamp: When non-zero, lamp object data will be duplicated with the objects.
210
 
  @type material: bool
211
 
  @param material: When non-zero, materials used by the object or its object data will be duplicated with the objects.
212
 
  @type texture: bool
213
 
  @param texture: When non-zero, texture data used by the object's materials will be duplicated with the objects.
214
 
  @type ipo: bool
215
 
  @param ipo: When non-zero, Ipo data linked to the object will be duplicated with the objects.
216
 
 
217
 
  I{B{Example:}}
218
 
 
219
 
  The example below creates duplicates the active object 10 times
220
 
  and moves each object 1.0 on the X axis::
221
 
    import Blender
222
 
 
223
 
    scn = Scene.GetCurrent()
224
 
    ob_act = scn.objects.active
225
 
    
226
 
    # Unselect all
227
 
    scn.objects.selected = []
228
 
    ob_act.sel = 1
229
 
    
230
 
    for x in xrange(10):
231
 
        Blender.Object.Duplicate() # Duplicate linked
232
 
        ob_act = scn.objects.active
233
 
        ob_act.LocX += 1
234
 
    Blender.Redraw()
235
 
  """
 
204
        """
 
205
        Duplicate selected objects on visible layers from Blenders current scene,
 
206
        de-selecting the currently visible, selected objects and making a copy where all new objects are selected.
 
207
        By default no data linked to the object is duplicated; use the keyword arguments to change this.
 
208
        L{Object.GetSelected()<GetSelected>} will return the list of objects resulting from duplication.
 
209
        
 
210
        B{Note}: This command will raise an error if used from the command line (background mode) because it uses the 3D view context.
 
211
        
 
212
        @type mesh: bool
 
213
        @param mesh: When non-zero, mesh object data will be duplicated with the objects.
 
214
        @type surface: bool
 
215
        @param surface: When non-zero, surface object data will be duplicated with the objects.
 
216
        @type curve: bool
 
217
        @param curve: When non-zero, curve object data will be duplicated with the objects.
 
218
        @type text: bool
 
219
        @param text: When non-zero, text object data will be duplicated with the objects.
 
220
        @type metaball: bool
 
221
        @param metaball: When non-zero, metaball object data will be duplicated with the objects.
 
222
        @type armature: bool
 
223
        @param armature: When non-zero, armature object data will be duplicated with the objects.
 
224
        @type lamp: bool
 
225
        @param lamp: When non-zero, lamp object data will be duplicated with the objects.
 
226
        @type material: bool
 
227
        @param material: When non-zero, materials used by the object or its object data will be duplicated with the objects.
 
228
        @type texture: bool
 
229
        @param texture: When non-zero, texture data used by the object's materials will be duplicated with the objects.
 
230
        @type ipo: bool
 
231
        @param ipo: When non-zero, Ipo data linked to the object will be duplicated with the objects.
 
232
 
 
233
        I{B{Example:}}
 
234
 
 
235
        The example below creates duplicates the active object 10 times
 
236
        and moves each object 1.0 on the X axis::
 
237
                import Blender
 
238
 
 
239
                scn = Scene.GetCurrent()
 
240
                ob_act = scn.objects.active
 
241
                
 
242
                # Unselect all
 
243
                scn.objects.selected = []
 
244
                ob_act.sel = 1
 
245
                
 
246
                for x in xrange(10):
 
247
                                Blender.Object.Duplicate() # Duplicate linked
 
248
                                ob_act = scn.objects.active
 
249
                                ob_act.LocX += 1
 
250
                Blender.Redraw()
 
251
        """
236
252
 
237
253
from IDProp import IDGroup, IDArray
238
254
class Object:
239
 
  """
240
 
  The Object object
241
 
  =================
242
 
    This object gives access to generic data from all objects in Blender. 
243
 
 
244
 
    B{Note}:
245
 
    When dealing with properties and functions such as LocX/RotY/getLocation(), getSize() and getEuler(),
246
 
    keep in mind that these transformation properties are relative to the object's parent (if any).
247
 
 
248
 
    To get these values in worldspace (taking into account vertex parents, constraints, etc.)
249
 
    pass the argument 'worldspace' to these functions.
250
 
 
251
 
    @ivar properties: Returns an L{IDGroup<IDProp.IDGroup>} reference to this 
252
 
    object's ID Properties.
253
 
    @type properties: L{IDGroup<IDProp.IDGroup>}
254
 
    @ivar restrictDisplay: Don't display this object in the 3D view: disabled by default, use the outliner to toggle.
255
 
    @type restrictDisplay: bool
256
 
    @ivar restrictSelect: Don't select this object in the 3D view: disabled by default, use the outliner to toggle.
257
 
    @type restrictSelect: bool
258
 
    @ivar restrictRender: Don't render this object: disabled by default, use the outliner to toggle.
259
 
    @type restrictRender: bool
260
 
    @ivar LocX: The X location coordinate of the object.
261
 
    @type LocX: float
262
 
    @ivar LocY: The Y location coordinate of the object.
263
 
    @type LocY: float
264
 
    @ivar LocZ: The Z location coordinate of the object.
265
 
    @type LocZ: float
266
 
    @ivar loc: The (X,Y,Z) location coordinates of the object.
267
 
    @type loc: tuple of 3 floats
268
 
    @ivar dLocX: The delta X location coordinate of the object.
269
 
        This variable applies to IPO Objects only.
270
 
    @type dLocX: float
271
 
    @ivar dLocY: The delta Y location coordinate of the object.
272
 
        This variable applies to IPO Objects only.
273
 
    @type dLocY: float
274
 
    @ivar dLocZ: The delta Z location coordinate of the object.
275
 
        This variable applies to IPO Objects only.
276
 
    @type dLocZ: float
277
 
    @ivar dloc: The delta (X,Y,Z) location coordinates of the object (vector).
278
 
        This variable applies to IPO Objects only.
279
 
    @type dloc: tuple of 3 floats
280
 
    @ivar RotX: The X rotation angle (in radians) of the object.
281
 
    @type RotX: float
282
 
    @ivar RotY: The Y rotation angle (in radians) of the object.
283
 
    @type RotY: float
284
 
    @ivar RotZ: The Z rotation angle (in radians) of the object.
285
 
    @type RotZ: float
286
 
    @ivar rot: The (X,Y,Z) rotation angles (in radians) of the object.
287
 
    @type rot: euler (Py_WRAPPED)
288
 
    @ivar dRotX: The delta X rotation angle (in radians) of the object.
289
 
        This variable applies to IPO Objects only.
290
 
    @type dRotX: float
291
 
    @ivar dRotY: The delta Y rotation angle (in radians) of the object.
292
 
        This variable applies to IPO Objects only.
293
 
    @type dRotY: float
294
 
    @ivar dRotZ: The delta Z rotation angle (in radians) of the object.
295
 
        This variable applies to IPO Objects only.
296
 
    @type dRotZ: float
297
 
    @ivar drot: The delta (X,Y,Z) rotation angles (in radians) of the object.
298
 
        This variable applies to IPO Objects only.
299
 
    @type drot: tuple of 3 floats
300
 
    @ivar SizeX: The X size of the object.
301
 
    @type SizeX: float
302
 
    @ivar SizeY: The Y size of the object.
303
 
    @type SizeY: float
304
 
    @ivar SizeZ: The Z size of the object.
305
 
    @type SizeZ: float
306
 
    @ivar size: The (X,Y,Z) size of the object.
307
 
    @type size: tuple of 3 floats
308
 
    @ivar dSizeX: The delta X size of the object.
309
 
    @type dSizeX: float
310
 
    @ivar dSizeY: The delta Y size of the object.
311
 
    @type dSizeY: float
312
 
    @ivar dSizeZ: The delta Z size of the object.
313
 
    @type dSizeZ: float
314
 
    @ivar dsize: The delta (X,Y,Z) size of the object.
315
 
    @type dsize: tuple of 3 floats
316
 
    @ivar Layers: The object layers (also check the newer attribute
317
 
        L{layers<layers>}).  This value is a bitmask with at 
318
 
        least one position set for the 20 possible layers starting from the low
319
 
        order bit.  The easiest way to deal with these values in in hexadecimal
320
 
        notation.
321
 
        Example::
322
 
          ob.Layer = 0x04 # sets layer 3 ( bit pattern 0100 )
323
 
        After setting the Layer value, call Blender.Redraw( -1 ) to update
324
 
        the interface.
325
 
    @type Layers: integer (bitmask)
326
 
    @type layers: list of integers
327
 
    @ivar layers: The layers this object is visible in (also check the older
328
 
        attribute L{Layers<Layers>}).  This returns a list of
329
 
        integers in the range [1, 20], each number representing the respective
330
 
        layer.  Setting is done by passing a list of ints or an empty list for
331
 
        no layers.
332
 
        Example::
333
 
          ob.layers = []  # object won't be visible
334
 
          ob.layers = [1, 4] # object visible only in layers 1 and 4
335
 
          ls = o.layers
336
 
          ls.append([10])
337
 
          o.layers = ls
338
 
          print ob.layers # will print: [1, 4, 10]
339
 
        B{Note}: changes will only be visible after the screen (at least
340
 
        the 3d View and Buttons windows) is redrawn.
341
 
    @ivar parent: The parent object of the object (if defined). Read-only.
342
 
    @type parent: Object or None
343
 
    @ivar data: The Datablock object linked to this object.  Read-only.
344
 
    @type data: varies
345
 
    @ivar ipo: Contains the Ipo if one is assigned to the object, B{None}
346
 
         otherwise.  Setting to B{None} clears the current Ipo.
347
 
    @type ipo:  Ipo
348
 
    @ivar mat: The matrix of the object in world space (absolute, takes vertex parents, tracking
349
 
        and Ipos into account).  Read-only.
350
 
    @type mat: Matrix
351
 
    @ivar matrix: Same as L{mat}.  Read-only.
352
 
    @type matrix: Matrix
353
 
    @ivar matrixLocal: The matrix of the object relative to its parent; if there is no parent,
354
 
    returns the world matrix (L{matrixWorld<Object.Object.matrixWorld>}).
355
 
    @type matrixLocal: Matrix
356
 
    @ivar matrixOldWorld: Old-type worldspace matrix (prior to Blender 2.34).
357
 
        Read-only.
358
 
    @type matrixOldWorld: Matrix
359
 
    @ivar matrixWorld: Same as L{mat}. Read-only.
360
 
    @type matrixWorld: Matrix
361
 
    @ivar colbits: The Material usage mask. A set bit #n means: the Material
362
 
        #n in the Object's material list is used. Otherwise, the Material #n
363
 
        of the Objects Data material list is displayed.
364
 
        Example::
365
 
            object.colbits = (1<<0) + (1<<5) # use mesh materials 0 (1<<0) and 5 (1<<5)
366
 
                                  # use object materials for all others
367
 
    @ivar sel: The selection state of the object in the current scene. 
368
 
        True is selected, False is unselected. Setting makes the object active.
369
 
    @type sel: boolean
370
 
    @ivar effects: The list of particle effects associated with the object.
371
 
        Read-only.
372
 
    @type effects: list of Effect objects
373
 
    @ivar parentbonename: The string name of the parent bone (if defined).
374
 
        This can be set to another bone in the armature if the object already has a bone parent.
375
 
    @type parentbonename: string or None
376
 
    @ivar protectFlags: The "transform locking" bitfield flags for the object.  
377
 
    See L{ProtectFlags} const dict for values.
378
 
    @type protectFlags: int
379
 
    @ivar DupGroup: The DupliGroup Animation Property. Assign a group to
380
 
        DupGroup to make this object an instance of that group.
381
 
        This does not enable or disable the DupliGroup option, for that use
382
 
        L{enableDupGroup}.
383
 
        The attribute returns None when this object does not have a dupliGroup, 
384
 
        and setting the attrbute to None deletes the object from the group.
385
 
    @type DupGroup: Group or None
386
 
    @ivar DupObjects: The Dupli object instances.  Read-only.
387
 
        Returns of list of tuples for object duplicated
388
 
        by dupliframe, dupliverts dupligroups and other animation properties.
389
 
        The first tuple item is the original object that is duplicated,
390
 
        the second is the 4x4 worldspace dupli-matrix.
391
 
        Example::
392
 
         import Blender
393
 
         from Blender import Object, Scene, Mathutils
394
 
 
395
 
         ob= Object.Get('Cube')
396
 
         dupe_obs= ob.DupObjects
397
 
         scn= Scene.GetCurrent()
398
 
         for dupe_ob, dupe_matrix in dupe_obs:
399
 
           print dupe_ob.name
400
 
           empty_ob = scn.objects.new('Empty')
401
 
           empty_ob.setMatrix(dupe_matrix)
402
 
         Blender.Redraw()
403
 
    @type DupObjects: list of tuples containing (object, matrix)
404
 
    @ivar enableNLAOverride: Whether the object uses NLA or active Action for animation.
405
 
    @type enableNLAOverride: boolean
406
 
    @ivar enableDupVerts: The DupliVerts status of the object.
407
 
        Does not indicate that this object has any dupliVerts,
408
 
        (as returned by L{DupObjects}) just that dupliVerts are enabled.
409
 
    @type enableDupVerts: boolean
410
 
    @ivar enableDupFaces: The DupliFaces status of the object.
411
 
        Does not indicate that this object has any dupliFaces,
412
 
        (as returned by L{DupObjects}) just that dupliFaces are enabled.
413
 
    @type enableDupFaces: boolean
414
 
    @ivar enableDupFacesScale: The DupliFacesScale status of the object.
415
 
    @type enableDupFacesScale: boolean
416
 
    @ivar enableDupFrames: The DupliFrames status of the object.
417
 
        Does not indicate that this object has any dupliFrames,
418
 
        (as returned by L{DupObjects}) just that dupliFrames are enabled.
419
 
    @type enableDupFrames: boolean
420
 
    @ivar enableDupGroup: The DupliGroup status of the object.
421
 
        Set True to make this object an instance of the object's L{DupGroup},
422
 
        and set L{DupGroup} to a group for this to take effect,
423
 
        Use L{DupObjects} to get the object data from this instance.
424
 
    @type enableDupGroup: boolean
425
 
    @ivar enableDupRot: The DupliRot status of the object.
426
 
        Use with L{enableDupVerts} to rotate each instance
427
 
        by the vertex normal.
428
 
    @type enableDupRot: boolean
429
 
    @ivar enableDupNoSpeed: The DupliNoSpeed status of the object.
430
 
        Use with L{enableDupFrames} to ignore dupliFrame speed. 
431
 
    @type enableDupNoSpeed: boolean
432
 
    @ivar DupSta: The DupliFrame starting frame. Use with L{enableDupFrames}.
433
 
        Value clamped to [1,32767].
434
 
    @type DupSta: int
435
 
    @ivar DupEnd: The DupliFrame end frame. Use with L{enableDupFrames}.
436
 
        Value clamped to [1,32767].
437
 
    @type DupEnd: int
438
 
    @ivar DupOn: The DupliFrames in succession between DupOff frames.
439
 
        Value is clamped to [1,1500].
440
 
        Use with L{enableDupFrames} and L{DupOff} > 0.
441
 
    @type DupOn: int
442
 
    @ivar DupOff: The DupliFrame removal of every Nth frame for this object.
443
 
        Use with L{enableDupFrames}.  Value is clamped to [0,1500].
444
 
    @type DupOff: int
445
 
    @ivar passIndex: Index # for the IndexOB render pass.
446
 
        Value is clamped to [0,1000].
447
 
    @type passIndex: int
448
 
    @ivar activeMaterial: The active material index for this object.
449
 
 
450
 
        The active index is used to select the material to edit in the material buttons,
451
 
        new data created will also use the active material.
452
 
 
453
 
        Value is clamped to [1,len(ob.materials)]. - [0,0] when there is no materials applied to the object.
454
 
    @type activeMaterial: int
455
 
    @ivar drawSize: The size to display the Empty.
456
 
    Value clamped to [0.01,10.0].
457
 
    @type drawSize: float
458
 
    @ivar modifiers: The modifiers associated with the object.
459
 
        Example::
460
 
          # copy the active objects modifiers to all other visible selected objects
461
 
          from Blender import *
462
 
          scn = Scene.GetCurrent()
463
 
          ob_act = scn.objects.active
464
 
          for ob in scn.objects.context:
465
 
              # Cannot copy modifiers to an object of a different type
466
 
              if ob.type == ob_act.type:
467
 
                  ob.modifiers = ob_act.modifiers
468
 
    @type modifiers: L{Modifier Sequence<Modifier.ModSeq>}
469
 
    @ivar constraints: a L{sequence<Constraint.Constraints>} of
470
 
        L{constraints<Constraint.Constraint>} for the object. Read-only.
471
 
    @type constraints: Constraint Sequence
472
 
    @ivar actionStrips: a L{sequence<NLA.ActionStrips>} of
473
 
        L{action strips<NLA.ActionStrip>} for the object.  Read-only.
474
 
    @type actionStrips: BPy_ActionStrips
475
 
    @ivar action: The action associated with this object (if defined).
476
 
        Read-only.
477
 
    @type action: L{Action<NLA.Action>} or None
478
 
    @ivar name: Object data name.  Maximum length 20 characters.
479
 
    @type name: string
480
 
    @ivar oopsLoc: Object's (X,Y) OOPs location.  Returns None if object
481
 
        is not found in list.
482
 
    @type oopsLoc:  tuple of 2 floats
483
 
    @ivar oopsSel: Object OOPs selection flag.
484
 
    @type oopsSel: boolean
485
 
    @ivar game_properties: The object's properties.  Read-only.
486
 
    @type game_properties: list of Properties.
487
 
    @ivar timeOffset: The time offset of the object's animation.
488
 
        Value clamped to [-300000.0,300000.0].
489
 
    @type timeOffset: float
490
 
    @ivar track: The object's tracked object.  B{None} is returned if no
491
 
        object is tracked.  Also, assigning B{None} clear the tracked object. 
492
 
    @type track: Object or None
493
 
    @ivar type: The object's type.  Read-only.
494
 
    @type type: string
495
 
    @ivar users: The number of users of the object.  Read-only.
496
 
    @type users: int
497
 
    @ivar fakeUser: The fake user status.
498
 
      Enabling this will keep it in the blend even if there are no users.
499
 
    @type fakeUser: bool
500
 
    @ivar boundingBox: The bounding box of this object.  Read-only.
501
 
    @type boundingBox: list of 8 3D vectors
502
 
    @ivar drawType: The object's drawing type.
503
 
        See L{DrawTypes} constant dict for values.
504
 
    @type drawType: int
505
 
    @ivar parentType: The object's parent type.  Read-only.
506
 
        See L{ParentTypes} constant dict for values.
507
 
    @type parentType: int
508
 
    @ivar axis: Enable display of active object's center and axis.
509
 
        Also see B{AXIS} bit in L{drawMode} attribute.
510
 
    @type axis: boolean
511
 
    @ivar texSpace: Enable display of active object's texture space.
512
 
        Also see B{TEXSPACE} bit in L{drawMode} attribute.
513
 
    @type texSpace: boolean
514
 
    @ivar nameMode: Enable display of active object's name.
515
 
        Also see B{NAME} bit in L{drawMode} attribute.
516
 
    @type nameMode: boolean
517
 
    @ivar wireMode: Enable the active object's wireframe over solid drawing.
518
 
        Also see B{WIRE} bit in L{drawMode} attribute.
519
 
    @type wireMode: boolean
520
 
    @ivar xRay: Enable drawing the active object in front of others.
521
 
        Also see B{XRAY} bit in L{drawMode} attribute.
522
 
    @type xRay: boolean
523
 
    @ivar transp: Enable transparent materials for the active object
524
 
        (mesh only).  Also see B{TRANSP} bit in L{drawMode} attribute.
525
 
    @type transp: boolean
526
 
    @ivar drawMode: The object's drawing mode bitfield.
527
 
        See L{DrawModes} constant dict for values.
528
 
    @type drawMode: int
529
 
 
530
 
    @ivar piType: Type of particle interaction. 
531
 
        See L{PITypes} constant dict for values.
532
 
    @type piType: int
533
 
    @ivar piFalloff: The particle interaction falloff power.
534
 
        Value clamped to [0.0,10.0].
535
 
    @type piFalloff: float
536
 
    @ivar piMaxDist: Max distance for the particle interaction field to work.
537
 
        Value clamped to [0.0,1000.0].
538
 
    @type piMaxDist: float
539
 
    @ivar piPermeability: Probability that a particle will pass through the
540
 
        mesh.  Value clamped to [0.0,1.0].
541
 
    @type piPermeability: float
542
 
    @ivar piRandomDamp: Random variation of particle interaction damping.
543
 
        Value clamped to [0.0,1.0].
544
 
    @type piRandomDamp: float
545
 
    @ivar piSoftbodyDamp: Damping factor for softbody deflection.
546
 
        Value clamped to [0.0,1.0].
547
 
    @type piSoftbodyDamp: float
548
 
    @ivar piSoftbodyIThick: Inner face thickness for softbody deflection.
549
 
        Value clamped to [0.001,1.0].
550
 
    @type piSoftbodyIThick: float
551
 
    @ivar piSoftbodyOThick: Outer face thickness for softbody deflection.
552
 
        Value clamped to [0.001,1.0].
553
 
    @type piSoftbodyOThick: float
554
 
    @ivar piStrength: Particle interaction force field strength.
555
 
        Value clamped to [0.0,1000.0].
556
 
    @type piStrength: float
557
 
    @ivar piSurfaceDamp: Amount of damping during particle collision.
558
 
        Value clamped to [0.0,1.0].
559
 
    @type piSurfaceDamp: float
560
 
    @ivar piUseMaxDist: Use a maximum distance for the field to work.
561
 
    @type piUseMaxDist: boolean
562
 
 
563
 
    @ivar isSoftBody: True if object is a soft body.  Read-only.
564
 
    @type isSoftBody: boolean
565
 
    @ivar SBDefaultGoal: Default softbody goal value, when no vertex group used.
566
 
        Value clamped to [0.0,1.0].
567
 
    @type SBDefaultGoal: float
568
 
    @ivar SBErrorLimit: Softbody Runge-Kutta ODE solver error limit (low values give more precision).
569
 
        Value clamped to [0.01,1.0].
570
 
    @type SBErrorLimit: float
571
 
    @ivar SBFriction: General media friction for softbody point movements.
572
 
        Value clamped to [0.0,10.0].
573
 
    @type SBFriction: float
574
 
    @ivar SBGoalFriction: Softbody goal (vertex target position) friction.
575
 
        Value clamped to [0.0,10.0].
576
 
    @type SBGoalFriction: float
577
 
    @ivar SBGoalSpring: Softbody goal (vertex target position) spring stiffness.
578
 
        Value clamped to [0.0,0.999].
579
 
    @type SBGoalSpring: float
580
 
    @ivar SBGrav: Apply gravitation to softbody point movement.
581
 
        Value clamped to [0.0,10.0].
582
 
    @type SBGrav: float
583
 
    @ivar SBInnerSpring: Softbody edge spring stiffness.
584
 
        Value clamped to [0.0,0.999].
585
 
    @type SBInnerSpring: float
586
 
    @ivar SBInnerSpringFrict: Softbody edge spring friction.
587
 
        Value clamped to [0.0,10.0].
588
 
    @type SBInnerSpringFrict: float
589
 
    @ivar SBMass: Softbody point mass (heavier is slower).
590
 
        Value clamped to [0.001,50.0].
591
 
    @type SBMass: float
592
 
    @ivar SBMaxGoal: Softbody goal maximum (vertex group weights scaled to
593
 
        match this range).  Value clamped to [0.0,1.0].
594
 
    @type SBMaxGoal: float
595
 
    @ivar SBMinGoal: Softbody goal minimum (vertex group weights scaled to
596
 
        match this range).  Value clamped to [0.0,1.0].
597
 
    @type SBMinGoal: float
598
 
    @ivar SBSpeed: Tweak timing for physics to control softbody frequency and
599
 
        speed.  Value clamped to [0.0,10.0].
600
 
    @type SBSpeed: float
601
 
    @ivar SBStiffQuads: Softbody adds diagonal springs on 4-gons enabled.
602
 
    @type SBStiffQuads: boolean
603
 
    @ivar SBUseEdges: Softbody use edges as springs enabled.
604
 
    @type SBUseEdges: boolean
605
 
    @ivar SBUseGoal: Softbody forces for vertices to stick to animated position enabled.
606
 
    @type SBUseGoal: boolean
607
 
 
608
 
    @ivar rbFlags: Rigid body bitfield.  See L{RBFlags} for valid values.
609
 
    @type rbFlags: int
610
 
    @ivar rbMass: Rigid body mass.  Must be a positive value.
611
 
    @type rbMass: float
612
 
    @ivar rbRadius: Rigid body bounding sphere size.  Must be a positive
613
 
        value.
614
 
    @type rbRadius: float
615
 
    @ivar rbShapeBoundType: Rigid body shape bound type.  See L{RBShapes}
616
 
        const dict for values.
617
 
    @type rbShapeBoundType: int
618
 
  """
619
 
 
620
 
  def buildParts():
621
 
    """
622
 
    Recomputes the particle system. This method only applies to an Object of
623
 
    the type Effect.
624
 
    """
625
 
 
626
 
  def insertShapeKey():
627
 
    """
628
 
    Insert a Shape Key in the current object.  It applies to Objects of
629
 
    the type Mesh, Lattice, or Curve.
630
 
    """
631
 
 
632
 
  def getPose():
633
 
    """
634
 
    Gets the current Pose of the object.
635
 
    @rtype: Pose object
636
 
    @return: the current pose object
637
 
    """
638
 
 
639
 
  def evaluatePose(framenumber):
640
 
    """
641
 
    Evaluates the Pose based on its currently bound action at a certain frame.
642
 
    @type framenumber: Int
643
 
    @param framenumber: The frame number to evaluate to.
644
 
    """
645
 
 
646
 
  def clearIpo():
647
 
    """
648
 
    Unlinks the ipo from this object.
649
 
    @return: True if there was an ipo linked or False otherwise.
650
 
    """
651
 
 
652
 
  def clrParent(mode = 0, fast = 0):
653
 
    """
654
 
    Clears parent object.
655
 
    @type mode: Integer
656
 
    @type fast: Integer
657
 
    @param mode: A mode flag. If mode flag is 2, then the object transform will
658
 
        be kept. Any other value, or no value at all will update the object
659
 
        transform.
660
 
    @param fast: If the value is 0, the scene hierarchy will not be updated. Any
661
 
        other value, or no value at all will update the scene hierarchy.
662
 
    """
663
 
 
664
 
  def getData(name_only=False, mesh=False):
665
 
    """
666
 
    Returns the Datablock object (Mesh, Lamp, Camera, etc.) linked to this 
667
 
    Object.  If the keyword parameter B{name_only} is True, only the Datablock
668
 
    name is returned as a string.  It the object is of type Mesh, then the
669
 
    B{mesh} keyword can also be used; the data return is a Mesh object if
670
 
    True, otherwise it is an NMesh object (the default).
671
 
    The B{mesh} keyword is ignored for non-mesh objects.
672
 
    @type name_only: bool
673
 
    @param name_only: This is a keyword parameter.  If True (or nonzero),
674
 
    only the name of the data object is returned. 
675
 
    @type mesh: bool
676
 
    @param mesh: This is a keyword parameter.  If True (or nonzero), 
677
 
    a Mesh data object is returned.
678
 
    @rtype: specific Object type or string
679
 
    @return: Depends on the type of Datablock linked to the Object.  If
680
 
    B{name_only} is True, it returns a string.
681
 
    @note: Mesh is faster than NMesh because Mesh is a thin wrapper.
682
 
    @note: This function is different from L{NMesh.GetRaw} and L{Mesh.Get}
683
 
    because it keeps a link to the original mesh, which is needed if you are
684
 
    dealing with Mesh weight groups.
685
 
    @note: Make sure the object you are getting the data from isn't in
686
 
    EditMode before calling this function; otherwise you'll get the data
687
 
    before entering EditMode. See L{Window.EditMode}.
688
 
    """
689
 
 
690
 
  def getParentBoneName():
691
 
    """
692
 
    Returns None, or the 'sub-name' of the parent (eg. Bone name)
693
 
    @return: string
694
 
    """
695
 
 
696
 
  def getDeltaLocation():
697
 
    """
698
 
    Returns the object's delta location in a list (x, y, z)
699
 
    @rtype: A vector triple
700
 
    @return: (x, y, z)
701
 
    """
702
 
 
703
 
  def getDrawMode():
704
 
    """
705
 
    Returns the object draw mode.
706
 
    @rtype: Integer
707
 
    @return: a sum of the following:
708
 
        - 2  - axis
709
 
        - 4  - texspace
710
 
        - 8  - drawname
711
 
        - 16 - drawimage
712
 
        - 32 - drawwire
713
 
        - 64 - xray
714
 
    """
715
 
 
716
 
  def getDrawType():
717
 
    """
718
 
    Returns the object draw type
719
 
    @rtype: Integer
720
 
    @return: One of the following:
721
 
        - 1 - Bounding box
722
 
        - 2 - Wire
723
 
        - 3 - Solid
724
 
        - 4 - Shaded
725
 
        - 5 - Textured
726
 
    """
727
 
 
728
 
  def getEuler(space):
729
 
    """
730
 
    @type space: string
731
 
    @param space: The desired space for the size:
732
 
      - localspace: (default) relative to the object's parent;
733
 
      - worldspace: absolute, taking vertex parents, tracking and
734
 
          Ipo's into account;
735
 
    Returns the object's localspace rotation as Euler rotation vector (rotX, rotY, rotZ).  Angles are in radians.
736
 
    @rtype: Py_Euler
737
 
    @return: A python Euler. Data is wrapped when euler is present.
738
 
    """
739
 
 
740
 
  def getInverseMatrix():
741
 
    """
742
 
    Returns the object's inverse matrix.
743
 
    @rtype: Py_Matrix
744
 
    @return: A python matrix 4x4
745
 
    """
746
 
 
747
 
  def getIpo():
748
 
    """
749
 
    Returns the Ipo associated to this object or None if there's no linked ipo.
750
 
    @rtype: Ipo
751
 
    @return: the wrapped ipo or None.
752
 
    """
753
 
  def isSelected():
754
 
    """
755
 
    Returns the objects selection state in the current scene as a boolean value True or False.
756
 
    @rtype: Boolean
757
 
    @return: Selection state as True or False
758
 
    """
759
 
  
760
 
  def getLocation(space):
761
 
    """
762
 
    @type space: string
763
 
    @param space: The desired space for the location:
764
 
      - localspace: (default) relative to the object's parent;
765
 
      - worldspace: absolute, taking vertex parents, tracking and
766
 
          Ipo's into account;
767
 
    Returns the object's location (x, y, z).
768
 
    @return: (x, y, z)
769
 
 
770
 
    I{B{Example:}}
771
 
 
772
 
    The example below works on the default scene. It retrieves all objects in
773
 
    the scene and prints the name and location of each object::
774
 
      import Blender
775
 
 
776
 
      objects = Blender.Object.Get()
777
 
 
778
 
      for obj in objects:
779
 
          print obj.getName()
780
 
          print obj.getLocation()
781
 
    @note: the worldspace location is the same as ob.matrixWorld[3][0:3]
782
 
    """
783
 
 
784
 
  def getAction():
785
 
    """
786
 
    Returns an action if one is associated with this object (only useful for armature types).
787
 
    @rtype: Py_Action
788
 
    @return: a python action.
789
 
    """
790
 
 
791
 
  def getMaterials(what = 0):
792
 
    """
793
 
    Returns a list of materials assigned to the object.
794
 
    @type what: int
795
 
    @param what: if nonzero, empty slots will be returned as None's instead
796
 
        of being ignored (default way). See L{NMesh.NMesh.getMaterials}.
797
 
    @rtype: list of Material Objects
798
 
    @return: list of Material Objects assigned to the object.
799
 
    """
800
 
 
801
 
  def getMatrix(space = 'worldspace'):
802
 
    """
803
 
    Returns the object matrix.
804
 
    @type space: string
805
 
    @param space: The desired matrix:
806
 
      - worldspace (default): absolute, taking vertex parents, tracking and
807
 
          Ipo's into account;
808
 
      - localspace: relative to the object's parent (returns worldspace
809
 
           matrix if the object doesn't have a parent);
810
 
      - old_worldspace: old behavior, prior to Blender 2.34, where eventual
811
 
          changes made by the script itself were not taken into account until
812
 
          a redraw happened, either called by the script or upon its exit.
813
 
    Returns the object matrix.
814
 
    @rtype: Py_Matrix (WRAPPED DATA)
815
 
    @return: a python 4x4 matrix object. Data is wrapped for 'worldspace'
816
 
    """
817
 
 
818
 
  def getName():
819
 
    """
820
 
    Returns the name of the object
821
 
    @return: The name of the object
822
 
 
823
 
    I{B{Example:}}
824
 
 
825
 
    The example below works on the default scene. It retrieves all objects in
826
 
    the scene and prints the name of each object::
827
 
      import Blender
828
 
 
829
 
      scn= Blender.Scene.GetCurrent()
830
 
      objects = scn.getChildren()
831
 
 
832
 
      for obj in objects:
833
 
          print obj.getName()
834
 
    """
835
 
 
836
 
  def getParent():
837
 
    """
838
 
    Returns the object's parent object.
839
 
    @rtype: Object
840
 
    @return: The parent object of the object. If not available, None will be
841
 
    returned.
842
 
    """
843
 
 
844
 
  def getSize(space):
845
 
    """
846
 
    @type space: string
847
 
    @param space: The desired space for the size:
848
 
      - localspace: (default) relative to the object's parent;
849
 
      - worldspace: absolute, taking vertex parents, tracking and
850
 
          Ipo's into account;
851
 
    Returns the object's size.
852
 
    @return: (SizeX, SizeY, SizeZ)
853
 
    @note: the worldspace size will not return negative (flipped) scale values.
854
 
    """
855
 
 
856
 
  def getParentBoneName():
857
 
    """
858
 
    Returns the object's parent object's sub name, or None.
859
 
    For objects parented to bones, this is the name of the bone.
860
 
    @rtype: String
861
 
    @return: The parent object sub-name of the object.
862
 
      If not available, None will be returned.
863
 
    """
864
 
 
865
 
  def getTimeOffset():
866
 
    """
867
 
    Returns the time offset of the object's animation.
868
 
    @return: TimeOffset
869
 
    """
870
 
 
871
 
  def getTracked():
872
 
    """
873
 
    Returns the object's tracked object.
874
 
    @rtype: Object
875
 
    @return: The tracked object of the object. If not available, None will be
876
 
    returned.
877
 
    """
878
 
 
879
 
  def getType():
880
 
    """
881
 
    Returns the type of the object in 'Armature', 'Camera', 'Curve', 'Lamp', 'Lattice',
882
 
    'Mball', 'Mesh', 'Surf', 'Empty', 'Wave' (deprecated) or 'unknown' in exceptional cases.
883
 
 
884
 
    I{B{Example:}}
885
 
 
886
 
    The example below works on the default scene. It retrieves all objects in
887
 
    the scene and updates the location and rotation of the camera. When run,
888
 
    the camera will rotate 180 degrees and moved to the opposite side of the X
889
 
    axis. Note that the number 'pi' in the example is an approximation of the
890
 
    true number 'pi'.  A better, less error-prone value of pi is math.pi from the python math module.::
891
 
        import Blender
892
 
 
893
 
        objects = Blender.Object.Get()
894
 
 
895
 
        for obj in objects:
896
 
            if obj.getType() == 'Camera':
897
 
                obj.LocY = -obj.LocY
898
 
                obj.RotZ = 3.141592 - obj.RotZ
899
 
 
900
 
        Blender.Redraw()
901
 
    
902
 
    @return: The type of object.
903
 
    @rtype: String
904
 
    """
905
 
 
906
 
  def insertIpoKey(keytype):
907
 
    """
908
 
    Inserts keytype values in object ipo at curframe. Uses module constants.
909
 
    @type keytype: Integer
910
 
    @param keytype:
911
 
           -LOC
912
 
           -ROT
913
 
           -SIZE
914
 
           -LOCROT
915
 
           -LOCROTSIZE
916
 
           -PI_STRENGTH
917
 
           -PI_FALLOFF
918
 
           -PI_PERM
919
 
           -PI_SURFACEDAMP
920
 
           -PI_RANDOMDAMP
921
 
    @return: None
922
 
    """
923
 
 
924
 
  def link(datablock):
925
 
    """
926
 
    Links Object with ObData datablock provided in the argument. The data must match the
927
 
    Object's type, so you cannot link a Lamp to a Mesh type object.
928
 
    @type datablock: Blender ObData datablock
929
 
    @param datablock: A Blender datablock matching the objects type.
930
 
    """
931
 
 
932
 
  def makeParent(objects, noninverse = 0, fast = 0):
933
 
    """
934
 
    Makes the object the parent of the objects provided in the argument which
935
 
    must be a list of valid Objects.
936
 
    @type objects: Sequence of Blender Object
937
 
    @param objects: The children of the parent
938
 
    @type noninverse: Integer
939
 
    @param noninverse:
940
 
        0 - make parent with inverse
941
 
        1 - make parent without inverse
942
 
    @type fast: Integer
943
 
    @param fast:
944
 
        0 - update scene hierarchy automatically
945
 
        1 - don't update scene hierarchy (faster). In this case, you must
946
 
        explicitely update the Scene hierarchy.
947
 
    @warn: objects must first be linked to a scene before they can become
948
 
        parents of other objects.  Calling this makeParent method for an
949
 
        unlinked object will result in an error.
950
 
    """
951
 
 
952
 
  def join(objects):
953
 
    """
954
 
    Uses the object as a base for all of the objects in the provided list to join into.
955
 
    
956
 
    @type objects: Sequence of Blender Object
957
 
    @param objects: A list of objects matching the object's type.
958
 
    @note: Objects in the list will not be removed from the scene.
959
 
        To avoid overlapping data you may want to remove them manually after joining.
960
 
    @note: Join modifies the base object's data in place so that
961
 
        other objects are joined into it. No new object or data is created.
962
 
    @note: Join will only work for object types Mesh, Armature, Curve and Surface;
963
 
        an excption will be raised if the object is not of these types.
964
 
    @note: Objects in the list will be ignored if they to not match the base object.
965
 
    @note: The base object must be in the current scene to be joined.
966
 
    @note: This function will not work in background mode (no user interface).
967
 
    @note: An error in the function input will raise a TypeError or AttributeError,
968
 
        otherwise an error in the data input will raise a RuntimeError.
969
 
        For situations where you don't have tight control on the data that is being joined,
970
 
        you should handle the RuntimeError error, letting the user know the data can't be joined.
971
 
    """
972
 
 
973
 
  def makeParentDeform(objects, noninverse = 0, fast = 0):
974
 
    """
975
 
    Makes the object the deformation parent of the objects provided in the argument
976
 
    which must be a list of valid Objects.
977
 
    The parent object must be a Curve or Armature.
978
 
    @type objects: Sequence of Blender Object
979
 
    @param objects: The children of the parent
980
 
    @type noninverse: Integer
981
 
    @param noninverse:
982
 
        0 - make parent with inverse
983
 
        1 - make parent without inverse
984
 
    @type fast: Integer
985
 
    @param fast:
986
 
        0 - update scene hierarchy automatically
987
 
        1 - don't update scene hierarchy (faster). In this case, you must
988
 
        explicitely update the Scene hierarchy.
989
 
    @warn: objects must first be linked to a scene before they can become
990
 
        parents of other objects.  Calling this makeParent method for an
991
 
        unlinked object will result in an error.
992
 
    @warn: child objects must be of mesh type to deform correctly. Other object
993
 
        types will fall back to normal parenting silently.
994
 
    """
995
 
 
996
 
  def makeParentVertex(objects, indices, noninverse = 0, fast = 0):
997
 
    """
998
 
    Makes the object the vertex parent of the objects provided in the argument
999
 
    which must be a list of valid Objects.
1000
 
    The parent object must be a Mesh, Curve or Surface.
1001
 
    @type objects: Sequence of Blender Object
1002
 
    @param objects: The children of the parent
1003
 
    @type indices: Tuple of Integers
1004
 
    @param indices: The indices of the vertices you want to parent to (1 or 3 values)
1005
 
    @type noninverse: Integer
1006
 
    @param noninverse:
1007
 
        0 - make parent with inverse
1008
 
        1 - make parent without inverse
1009
 
    @type fast: Integer
1010
 
    @param fast:
1011
 
        0 - update scene hierarchy automatically
1012
 
        1 - don't update scene hierarchy (faster). In this case, you must
1013
 
        explicitely update the Scene hierarchy.
1014
 
    @warn: objects must first be linked to a scene before they can become
1015
 
        parents of other objects.  Calling this makeParent method for an
1016
 
        unlinked object will result in an error.
1017
 
    """
1018
 
  def makeParentBone(objects, bonename, noninverse = 0, fast = 0):
1019
 
    """
1020
 
    Makes one of the object's bones the parent of the objects provided in the argument
1021
 
    which must be a list of valid objects.  The parent object must be an Armature.
1022
 
    @type objects: Sequence of Blender Object
1023
 
    @param objects: The children of the parent
1024
 
    @type bonename: string
1025
 
    @param bonename: a valid bone name from the armature
1026
 
    @type noninverse: integer
1027
 
    @param noninverse:
1028
 
        0 - make parent with inverse
1029
 
        1 - make parent without inverse
1030
 
    @type fast: integer
1031
 
    @param fast:
1032
 
        0 - update scene hierarchy automatically
1033
 
        1 - don't update scene hierarchy (faster). In this case, you must
1034
 
        explicitly update the Scene hierarchy.
1035
 
    @warn: Objects must first be linked to a scene before they can become
1036
 
        parents of other objects.  Calling this method for an
1037
 
        unlinked object will result in an exception.
1038
 
    """
1039
 
 
1040
 
  def setDeltaLocation(delta_location):
1041
 
    """
1042
 
    Sets the object's delta location which must be a vector triple.
1043
 
    @type delta_location: A vector triple
1044
 
    @param delta_location: A vector triple (x, y, z) specifying the new
1045
 
    location.
1046
 
    """
1047
 
 
1048
 
  def setDrawMode(drawmode):
1049
 
    """
1050
 
    Sets the object's drawing mode. The drawing mode can be a mix of modes. To
1051
 
    enable these, add up the values.
1052
 
    @type drawmode: Integer
1053
 
    @param drawmode: A sum of the following:
1054
 
        - 2  - axis
1055
 
        - 4  - texspace
1056
 
        - 8  - drawname
1057
 
        - 16 - drawimage
1058
 
        - 32 - drawwire
1059
 
        - 64 - xray
1060
 
    """
1061
 
 
1062
 
  def setDrawType(drawtype):
1063
 
    """
1064
 
    Sets the object's drawing type.
1065
 
    @type drawtype: Integer
1066
 
    @param drawtype: One of the following:
1067
 
        - 1 - Bounding box
1068
 
        - 2 - Wire
1069
 
        - 3 - Solid
1070
 
        - 4 - Shaded
1071
 
        - 5 - Textured
1072
 
    """
1073
 
 
1074
 
  def setEuler(euler):
1075
 
    """
1076
 
    Sets the object's localspace rotation according to the specified Euler angles.
1077
 
    @type euler: Py_Euler or a list of floats
1078
 
    @param euler: a python Euler or x,y,z rotations as floats
1079
 
    """
1080
 
 
1081
 
  def setIpo(ipo):
1082
 
    """
1083
 
    Links an ipo to this object.
1084
 
    @type ipo: Blender Ipo
1085
 
    @param ipo: an object type ipo.
1086
 
    """
1087
 
 
1088
 
  def setLocation(x, y, z):
1089
 
    """
1090
 
    Sets the object's location relative to the parent object (if any).
1091
 
    @type x: float
1092
 
    @param x: The X coordinate of the new location.
1093
 
    @type y: float
1094
 
    @param y: The Y coordinate of the new location.
1095
 
    @type z: float
1096
 
    @param z: The Z coordinate of the new location.
1097
 
    """
1098
 
 
1099
 
  def setMaterials(materials):
1100
 
    """
1101
 
    Sets the materials. The argument must be a list 16 items or less.  Each
1102
 
    list element is either a Material or None.  Also see L{colbits}.
1103
 
    @type materials: Materials list
1104
 
    @param materials: A list of Blender material objects.
1105
 
    @note: Materials are assigned to the object's data by default.  Unless
1106
 
    you know the material is applied to the object or are changing the
1107
 
    object's L{colbits}, you need to look at the object data's materials.
1108
 
    """
1109
 
 
1110
 
  def setMatrix(matrix):
1111
 
    """
1112
 
    Sets the object's matrix and updates its transformation.  If the object
1113
 
    has a parent, the matrix transform is relative to the parent.
1114
 
    @type matrix: Py_Matrix 3x3 or 4x4
1115
 
    @param matrix: a 3x3 or 4x4 Python matrix.  If a 3x3 matrix is given,
1116
 
    it is extended to a 4x4 matrix.
1117
 
    @Note: This method is "bad": when called it changes the location,
1118
 
    rotation and size attributes of the object (since Blender uses these
1119
 
    values to calculate the object's transformation matrix).  Ton is
1120
 
    not happy having a method which "pretends" to do a matrix operation.
1121
 
    In the future, this method may be replaced with other methods which
1122
 
    make it easier for the user to determine the correct loc/rot/size values
1123
 
    for necessary for the object.
1124
 
    """
1125
 
 
1126
 
  def setName(name):
1127
 
    """
1128
 
    Sets the name of the object. A string longer than 20 characters will be shortened.
1129
 
    @type name: String
1130
 
    @param name: The new name for the object.
1131
 
    """
1132
 
 
1133
 
  def setSize(x, y, z):
1134
 
    """
1135
 
    Sets the object's size, relative to the parent object (if any), clamped 
1136
 
    @type x: float
1137
 
    @param x: The X size multiplier.
1138
 
    @type y: float
1139
 
    @param y: The Y size multiplier.
1140
 
    @type z: float
1141
 
    @param z: The Z size multiplier.
1142
 
    """
1143
 
 
1144
 
  def setTimeOffset(timeOffset):
1145
 
    """
1146
 
    Sets the time offset of the object's animation.
1147
 
    @type timeOffset: float
1148
 
    @param timeOffset: The new time offset for the object's animation.
1149
 
    """
1150
 
  
1151
 
  def shareFrom(object):
1152
 
    """
1153
 
    Link data of a specified argument with this object. This works only
1154
 
    if both objects are of the same type.
1155
 
    @type object: Blender Object
1156
 
    @param object: A Blender Object of the same type.
1157
 
    @note: This function is faster than using L{getData()} and setData()
1158
 
    because it skips making a Python object from the object's data.
1159
 
    """
1160
 
  
1161
 
  def select(boolean):
1162
 
    """
1163
 
    Sets the object's selection state in the current scene.
1164
 
    setting the selection will make this object the active object of this scene.
1165
 
    @type boolean: Integer
1166
 
    @param boolean:
1167
 
        - 0  - unselected
1168
 
        - 1  - selected
1169
 
    """
1170
 
  
1171
 
  def getBoundBox():
1172
 
    """
1173
 
    Returns the worldspace bounding box of this object.  This works for meshes (out of
1174
 
    edit mode) and curves.
1175
 
    @rtype: list of 8 (x,y,z) float coordinate vectors (WRAPPED DATA)
1176
 
    @return: The coordinates of the 8 corners of the bounding box. Data is wrapped when
1177
 
    bounding box is present.
1178
 
    """
1179
 
 
1180
 
  def makeDisplayList():
1181
 
    """
1182
 
    Updates this object's display list.  Blender uses display lists to store
1183
 
    already transformed data (like a mesh with its vertices already modified
1184
 
    by coordinate transformations and armature deformation).  If the object
1185
 
    isn't modified, there's no need to recalculate this data.  This method is
1186
 
    here for the *few cases* where a script may need it, like when toggling
1187
 
    the "SubSurf" mode for a mesh:
1188
 
 
1189
 
    Example::
1190
 
      import Blender
1191
 
 
1192
 
      scn = Blender.Scene.GetCurrent()
1193
 
      object = scn.objects.active
1194
 
      object.modifiers.append(Blender.Modifier.Type.SUBSURF)
1195
 
      object.makeDisplayList()
1196
 
      Blender.Window.RedrawAll()
1197
 
 
1198
 
    If you try this example without the line to update the display list, the
1199
 
    object will disappear from the screen until you press "SubSurf".
1200
 
    @warn: If after running your script objects disappear from the screen or
1201
 
       are not displayed correctly, try this method function.  But if the script
1202
 
       works properly without it, there's no reason to use it.
1203
 
    """
1204
 
 
1205
 
  def getScriptLinks (event):
1206
 
    """
1207
 
    Get a list with this Object's script links of type 'event'.
1208
 
    @type event: string
1209
 
    @param event: "FrameChanged", "Redraw" or "Render".
1210
 
    @rtype: list
1211
 
    @return: a list with Blender L{Text} names (the script links of the given
1212
 
        'event' type) or None if there are no script links at all.
1213
 
    """
1214
 
 
1215
 
  def clearScriptLinks (links = None):
1216
 
    """
1217
 
    Delete script links from this Object.  If no list is specified, all
1218
 
    script links are deleted.
1219
 
    @type links: list of strings
1220
 
    @param links: None (default) or a list of Blender L{Text} names.
1221
 
    """
1222
 
 
1223
 
  def addScriptLink (text, event):
1224
 
    """
1225
 
    Add a new script link to this Object.
1226
 
    @type text: string
1227
 
    @param text: the name of an existing Blender L{Text}.
1228
 
    @type event: string
1229
 
    @param event: "FrameChanged", "Redraw" or "Render".
1230
 
    """
1231
 
 
1232
 
  def makeTrack (tracked, fast = 0):
1233
 
    """
1234
 
    Make this Object track another.
1235
 
    @type tracked: Blender Object
1236
 
    @param tracked: the object to be tracked.
1237
 
    @type fast: int (bool)
1238
 
    @param fast: if zero, the scene hierarchy is updated automatically.  If
1239
 
        you set 'fast' to a nonzero value, don't forget to update the scene
1240
 
        yourself (see L{Scene.Scene.update}).
1241
 
    @note: you also need to clear the rotation (L{setEuler}) of this object
1242
 
       if it was not (0,0,0) already.
1243
 
    """
1244
 
 
1245
 
  def clearTrack (mode = 0, fast = 0):
1246
 
    """
1247
 
    Make this Object not track another anymore.
1248
 
    @type mode: int (bool)
1249
 
    @param mode: if nonzero the matrix transformation used for tracking is kept.
1250
 
    @type fast: int (bool)
1251
 
    @param fast: if zero, the scene hierarchy is updated automatically.  If
1252
 
        you set 'fast' to a nonzero value, don't forget to update the scene
1253
 
        yourself (see L{Scene.Scene.update}).
1254
 
    """
1255
 
 
1256
 
  def getAllProperties ():
1257
 
    """
1258
 
    Return a list of all game properties from this object.
1259
 
    @rtype: PyList
1260
 
    @return: List of Property objects.
1261
 
    """
1262
 
 
1263
 
  def getProperty (name):
1264
 
    """
1265
 
    Return a game property from this object matching the name argument.
1266
 
    @type name: string
1267
 
    @param name: the name of the property to get.
1268
 
    @rtype: Property object
1269
 
    @return: The first property that matches name.
1270
 
    """
1271
 
 
1272
 
  def addProperty (name_or_property, data, type):
1273
 
    """
1274
 
    Add or create a game property for an object.  If called with only a
1275
 
    property object, the property is assigned to the object.  If called
1276
 
    with a property name string and data object, a new property is
1277
 
    created and added to the object.
1278
 
    @type name_or_property: string or Property object
1279
 
    @param name_or_property: the property name, or a property object.
1280
 
    @type data: string, int or float
1281
 
    @param data: Only valid when I{name_or_property} is a string. 
1282
 
    Value depends on what is passed in:
1283
 
      - string:  string type property
1284
 
      - int:  integer type property
1285
 
      - float:  float type property
1286
 
    @type type: string (optional)
1287
 
    @param type: Only valid when I{name_or_property} is a string.
1288
 
    Can be the following:
1289
 
      - 'BOOL'
1290
 
      - 'INT'
1291
 
      - 'FLOAT'
1292
 
      - 'TIME'
1293
 
      - 'STRING'
1294
 
    @warn: If a type is not declared string data will
1295
 
    become string type, int data will become int type
1296
 
    and float data will become float type. Override type
1297
 
    to declare bool type, and time type.
1298
 
    @warn:  A property object can be added only once to an object;
1299
 
    you must remove the property from an object to add it elsewhere.
1300
 
    """
1301
 
 
1302
 
  def removeProperty (property):
1303
 
    """
1304
 
    Remove a game property from an object.
1305
 
    @type property: Property object or string
1306
 
    @param property: Property object or property name to be removed.
1307
 
    """
1308
 
 
1309
 
  def removeAllProperties():
1310
 
    """
1311
 
    Removes all game properties from an object. 
1312
 
    """
1313
 
 
1314
 
  def copyAllPropertiesTo (object):
1315
 
    """
1316
 
    Copies all game properties from one object to another.
1317
 
    @type object: Object object
1318
 
    @param object: Object that will receive the properties.
1319
 
    """
1320
 
 
1321
 
  def getPIStregth():
1322
 
    """
1323
 
    Get the Object's Particle Interaction Strength.
1324
 
    @rtype: float
1325
 
    """
1326
 
 
1327
 
  def setPIStrength(strength):
1328
 
    """
1329
 
    Set the Object's Particle Interaction Strength.
1330
 
    Values between -1000.0 to 1000.0
1331
 
    @rtype: None
1332
 
    @type strength: float
1333
 
    @param strength: the Object's Particle Interaction New Strength.
1334
 
    """
1335
 
 
1336
 
  def getPIFalloff():
1337
 
    """
1338
 
    Get the Object's Particle Interaction falloff.
1339
 
    @rtype: float
1340
 
    """
1341
 
 
1342
 
  def setPIFalloff(falloff):
1343
 
    """
1344
 
    Set the Object's Particle Interaction falloff.
1345
 
    Values between 0 to 10.0
1346
 
    @rtype: None
1347
 
    @type falloff: float
1348
 
    @param falloff: the Object's Particle Interaction New falloff.
1349
 
    """    
1350
 
    
1351
 
  def getPIMaxDist():
1352
 
    """
1353
 
    Get the Object's Particle Interaction MaxDist.
1354
 
    @rtype: float
1355
 
    """
1356
 
 
1357
 
  def setPIMaxDist(MaxDist):
1358
 
    """
1359
 
    Set the Object's Particle Interaction MaxDist.
1360
 
    Values between 0 to 1000.0
1361
 
    @rtype: None
1362
 
    @type MaxDist: float
1363
 
    @param MaxDist: the Object's Particle Interaction New MaxDist.
1364
 
    """    
1365
 
    
1366
 
  def getPIType():
1367
 
    """
1368
 
    Get the Object's Particle Interaction Type.
1369
 
    @rtype: int
1370
 
    """
1371
 
 
1372
 
  def setPIType(type):
1373
 
    """
1374
 
    Set the Object's Particle Interaction type.
1375
 
    Use Module Constants
1376
 
      - NONE
1377
 
      - WIND
1378
 
      - FORCE
1379
 
      - VORTEX
1380
 
      - MAGNET
1381
 
    @rtype: None
1382
 
    @type type: int
1383
 
    @param type: the Object's Particle Interaction Type.
1384
 
    """   
1385
 
 
1386
 
  def getPIUseMaxDist():
1387
 
    """
1388
 
    Get the Object's Particle Interaction if using MaxDist.
1389
 
    @rtype: int
1390
 
    """
1391
 
 
1392
 
  def setPIUseMaxDist(status):
1393
 
    """
1394
 
    Set the Object's Particle Interaction MaxDist.
1395
 
    0 = Off, 1 = on
1396
 
    @rtype: None
1397
 
    @type status: int
1398
 
    @param status: the new status
1399
 
    """ 
1400
 
 
1401
 
  def getPIDeflection():
1402
 
    """
1403
 
    Get the Object's Particle Interaction Deflection Setting.
1404
 
    @rtype: int
1405
 
    """
1406
 
 
1407
 
  def setPIDeflection(status):
1408
 
    """
1409
 
    Set the Object's Particle Interaction Deflection Setting.
1410
 
    0 = Off, 1 = on
1411
 
    @rtype: None
1412
 
    @type status: int
1413
 
    @param status: the new status
1414
 
    """ 
1415
 
 
1416
 
  def getPIPermf():
1417
 
    """
1418
 
    Get the Object's Particle Interaction Permeability.
1419
 
    @rtype: float
1420
 
    """
1421
 
 
1422
 
  def setPIPerm(perm):
1423
 
    """
1424
 
    Set the Object's Particle Interaction Permeability.
1425
 
    Values between 0 to 10.0
1426
 
    @rtype: None
1427
 
    @type perm: float
1428
 
    @param perm: the Object's Particle Interaction New Permeability.
1429
 
    """    
1430
 
 
1431
 
  def getPIRandomDamp():
1432
 
    """
1433
 
    Get the Object's Particle Interaction RandomDamp.
1434
 
    @rtype: float
1435
 
    """
1436
 
 
1437
 
  def setPIRandomDamp(damp):
1438
 
    """
1439
 
    Set the Object's Particle Interaction RandomDamp.
1440
 
    Values between 0 to 10.0
1441
 
    @rtype: None
1442
 
    @type damp: float
1443
 
    @param damp: the Object's Particle Interaction New RandomDamp.
1444
 
    """    
1445
 
 
1446
 
  def getPISurfaceDamp():
1447
 
    """
1448
 
    Get the Object's Particle Interaction SurfaceDamp.
1449
 
    @rtype: float
1450
 
    """
1451
 
 
1452
 
  def setPISurfaceDamp(damp):
1453
 
    """
1454
 
    Set the Object's Particle Interaction SurfaceDamp.
1455
 
    Values between 0 to 10.0
1456
 
    @rtype: None
1457
 
    @type damp: float
1458
 
    @param damp: the Object's Particle Interaction New SurfaceDamp.
1459
 
    """    
1460
 
 
1461
 
  def getSBMass():
1462
 
    """
1463
 
    Get the Object's SoftBody Mass.
1464
 
    @rtype: float
1465
 
    """
1466
 
 
1467
 
  def setSBMass(mass):
1468
 
    """
1469
 
    Set the Object's SoftBody Mass.
1470
 
    Values between 0 to 50.0
1471
 
    @rtype: None
1472
 
    @type mass: float
1473
 
    @param mass: the Object's SoftBody New mass.
1474
 
    """  
1475
 
  
1476
 
  def getSBGravity():
1477
 
    """
1478
 
    Get the Object's SoftBody Gravity.
1479
 
    @rtype: float
1480
 
    """
1481
 
 
1482
 
  def setSBGravity(grav):
1483
 
    """
1484
 
    Set the Object's SoftBody Gravity.
1485
 
    Values between 0 to 10.0
1486
 
    @rtype: None
1487
 
    @type grav: float
1488
 
    @param grav: the Object's SoftBody New Gravity.
1489
 
    """ 
1490
 
    
1491
 
  def getSBFriction():
1492
 
    """
1493
 
    Get the Object's SoftBody Friction.
1494
 
    @rtype: float
1495
 
    """
1496
 
 
1497
 
  def setSBFriction(frict):
1498
 
    """
1499
 
    Set the Object's SoftBody Friction.
1500
 
    Values between 0 to 10.0
1501
 
    @rtype: None
1502
 
    @type frict: float
1503
 
    @param frict: the Object's SoftBody New Friction.
1504
 
    """ 
1505
 
 
1506
 
  def getSBErrorLimit():
1507
 
    """
1508
 
    Get the Object's SoftBody ErrorLimit.
1509
 
    @rtype: float
1510
 
    """
1511
 
 
1512
 
  def setSBErrorLimit(err):
1513
 
    """
1514
 
    Set the Object's SoftBody ErrorLimit.
1515
 
    Values between 0 to 1.0
1516
 
    @rtype: None
1517
 
    @type err: float
1518
 
    @param err: the Object's SoftBody New ErrorLimit.
1519
 
    """ 
1520
 
    
1521
 
  def getSBGoalSpring():
1522
 
    """
1523
 
    Get the Object's SoftBody GoalSpring.
1524
 
    @rtype: float
1525
 
    """
1526
 
 
1527
 
  def setSBGoalSpring(gs):
1528
 
    """
1529
 
    Set the Object's SoftBody GoalSpring.
1530
 
    Values between 0 to 0.999
1531
 
    @rtype: None
1532
 
    @type gs: float
1533
 
    @param gs: the Object's SoftBody New GoalSpring.
1534
 
    """ 
1535
 
    
1536
 
  def getSBGoalFriction():
1537
 
    """
1538
 
    Get the Object's SoftBody GoalFriction.
1539
 
    @rtype: float
1540
 
    """
1541
 
 
1542
 
  def setSBGoalFriction(gf):
1543
 
    """
1544
 
    Set the Object's SoftBody GoalFriction.
1545
 
    Values between 0 to 10.0
1546
 
    @rtype: None
1547
 
    @type gf: float
1548
 
    @param gf: the Object's SoftBody New GoalFriction.
1549
 
    """ 
1550
 
    
1551
 
  def getSBMinGoal():
1552
 
    """
1553
 
    Get the Object's SoftBody MinGoal.
1554
 
    @rtype: float
1555
 
    """
1556
 
 
1557
 
  def setSBMinGoal(mg):
1558
 
    """
1559
 
    Set the Object's SoftBody MinGoal.
1560
 
    Values between 0 to 1.0
1561
 
    @rtype: None
1562
 
    @type mg: float
1563
 
    @param mg: the Object's SoftBody New MinGoal.
1564
 
    """ 
1565
 
    
1566
 
  def getSBMaxGoal():
1567
 
    """
1568
 
    Get the Object's SoftBody MaxGoal.
1569
 
    @rtype: float
1570
 
    """
1571
 
 
1572
 
  def setSBMaxGoal(mg):
1573
 
    """
1574
 
    Set the Object's SoftBody MaxGoal.
1575
 
    Values between 0 to 1.0
1576
 
    @rtype: None
1577
 
    @type mg: float
1578
 
    @param mg: the Object's SoftBody New MaxGoal.
1579
 
    """ 
1580
 
    
1581
 
  def getSBInnerSpring():
1582
 
    """
1583
 
    Get the Object's SoftBody InnerSpring.
1584
 
    @rtype: float
1585
 
    """
1586
 
 
1587
 
  def setSBInnerSpring(sprr):
1588
 
    """
1589
 
    Set the Object's SoftBody InnerSpring.
1590
 
    Values between 0 to 0.999
1591
 
    @rtype: None
1592
 
    @type sprr: float
1593
 
    @param sprr: the Object's SoftBody New InnerSpring.
1594
 
    """ 
1595
 
    
1596
 
  def getSBInnerSpringFriction():
1597
 
    """
1598
 
    Get the Object's SoftBody InnerSpringFriction.
1599
 
    @rtype: float
1600
 
    """
1601
 
 
1602
 
  def setSBInnerSpringFriction(sprf):
1603
 
    """
1604
 
    Set the Object's SoftBody InnerSpringFriction.
1605
 
    Values between 0 to 10.0
1606
 
    @rtype: None
1607
 
    @type sprf: float
1608
 
    @param sprf: the Object's SoftBody New InnerSpringFriction.
1609
 
    """ 
1610
 
    
1611
 
  def getSBDefaultGoal():
1612
 
    """
1613
 
    Get the Object's SoftBody DefaultGoal.
1614
 
    @rtype: float
1615
 
    """
1616
 
 
1617
 
  def setSBDefaultGoal(goal):
1618
 
    """
1619
 
    Set the Object's SoftBody DefaultGoal.
1620
 
    Values between 0 to 1.0
1621
 
    @rtype: None
1622
 
    @type goal: float
1623
 
    @param goal: the Object's SoftBody New DefaultGoal.
1624
 
    """   
1625
 
 
1626
 
  def isSB():
1627
 
    """
1628
 
    Returns the Object's SoftBody enabled state.
1629
 
    @rtype: boolean
1630
 
    """
1631
 
 
1632
 
  def getSBPostDef():
1633
 
    """
1634
 
    get SoftBodies PostDef option
1635
 
    @rtype: int
1636
 
    """
1637
 
 
1638
 
  def setSBPostDef(switch):
1639
 
    """
1640
 
    Enable / Disable SoftBodies PostDef option
1641
 
    1: on
1642
 
    0: off
1643
 
    @rtype: None
1644
 
    @type switch: int
1645
 
    @param switch: the Object's SoftBody New PostDef Value.
1646
 
    """ 
1647
 
 
1648
 
  def getSBUseGoal():
1649
 
    """
1650
 
    get SoftBodies UseGoal option
1651
 
    @rtype: int
1652
 
    """
1653
 
 
1654
 
  def setSBUseGoal(switch):
1655
 
    """
1656
 
    Enable / Disable SoftBodies UseGoal option
1657
 
    1: on
1658
 
    0: off
1659
 
    @rtype: None
1660
 
    @type switch: int
1661
 
    @param switch: the Object's SoftBody New UseGoal Value.
1662
 
    """ 
1663
 
  def getSBUseEdges():
1664
 
    """
1665
 
    get SoftBodies UseEdges option
1666
 
    @rtype: int
1667
 
    """
1668
 
 
1669
 
  def setSBUseEdges(switch):
1670
 
    """
1671
 
    Enable / Disable SoftBodies UseEdges option
1672
 
    1: on
1673
 
    0: off
1674
 
    @rtype: None
1675
 
    @type switch: int
1676
 
    @param switch: the Object's SoftBody New UseEdges Value.
1677
 
    """ 
1678
 
    
1679
 
  def getSBStiffQuads():
1680
 
    """
1681
 
    get SoftBodies StiffQuads option
1682
 
    @rtype: int
1683
 
    """
1684
 
 
1685
 
  def setSBStiffQuads(switch):
1686
 
    """
1687
 
    Enable / Disable SoftBodies StiffQuads option
1688
 
    1: on
1689
 
    0: off
1690
 
    @rtype: None
1691
 
    @type switch: int
1692
 
    @param switch: the Object's SoftBody New StiffQuads Value.
1693
 
    """     
 
255
        """
 
256
        The Object object
 
257
        =================
 
258
                This object gives access to generic data from all objects in Blender. 
 
259
 
 
260
        B{Note}:
 
261
        When dealing with properties and functions such as LocX/RotY/getLocation(), getSize() and getEuler(),
 
262
        keep in mind that these transformation properties are relative to the object's parent (if any).
 
263
 
 
264
        To get these values in worldspace (taking into account vertex parents, constraints, etc.)
 
265
        pass the argument 'worldspace' to these functions.
 
266
 
 
267
        @ivar restrictDisplay: Don't display this object in the 3D view: disabled by default, use the outliner to toggle.
 
268
        @type restrictDisplay: bool
 
269
        @ivar restrictSelect: Don't select this object in the 3D view: disabled by default, use the outliner to toggle.
 
270
        @type restrictSelect: bool
 
271
        @ivar restrictRender: Don't render this object: disabled by default, use the outliner to toggle.
 
272
        @type restrictRender: bool
 
273
        @ivar LocX: The X location coordinate of the object.
 
274
        @type LocX: float
 
275
        @ivar LocY: The Y location coordinate of the object.
 
276
        @type LocY: float
 
277
        @ivar LocZ: The Z location coordinate of the object.
 
278
        @type LocZ: float
 
279
        @ivar loc: The (X,Y,Z) location coordinates of the object.
 
280
        @type loc: tuple of 3 floats
 
281
        @ivar dLocX: The delta X location coordinate of the object.
 
282
                This variable applies to IPO Objects only.
 
283
        @type dLocX: float
 
284
        @ivar dLocY: The delta Y location coordinate of the object.
 
285
                This variable applies to IPO Objects only.
 
286
        @type dLocY: float
 
287
        @ivar dLocZ: The delta Z location coordinate of the object.
 
288
                This variable applies to IPO Objects only.
 
289
        @type dLocZ: float
 
290
        @ivar dloc: The delta (X,Y,Z) location coordinates of the object (vector).
 
291
                This variable applies to IPO Objects only.
 
292
        @type dloc: tuple of 3 floats
 
293
        @ivar RotX: The X rotation angle (in radians) of the object.
 
294
        @type RotX: float
 
295
        @ivar RotY: The Y rotation angle (in radians) of the object.
 
296
        @type RotY: float
 
297
        @ivar RotZ: The Z rotation angle (in radians) of the object.
 
298
        @type RotZ: float
 
299
        @ivar rot: The (X,Y,Z) rotation angles (in radians) of the object.
 
300
        @type rot: euler (Py_WRAPPED)
 
301
        @ivar dRotX: The delta X rotation angle (in radians) of the object.
 
302
                This variable applies to IPO Objects only.
 
303
        @type dRotX: float
 
304
        @ivar dRotY: The delta Y rotation angle (in radians) of the object.
 
305
                This variable applies to IPO Objects only.
 
306
        @type dRotY: float
 
307
        @ivar dRotZ: The delta Z rotation angle (in radians) of the object.
 
308
                This variable applies to IPO Objects only.
 
309
        @type dRotZ: float
 
310
        @ivar drot: The delta (X,Y,Z) rotation angles (in radians) of the object.
 
311
                This variable applies to IPO Objects only.
 
312
        @type drot: tuple of 3 floats
 
313
        @ivar SizeX: The X size of the object.
 
314
        @type SizeX: float
 
315
        @ivar SizeY: The Y size of the object.
 
316
        @type SizeY: float
 
317
        @ivar SizeZ: The Z size of the object.
 
318
        @type SizeZ: float
 
319
        @ivar size: The (X,Y,Z) size of the object.
 
320
        @type size: tuple of 3 floats
 
321
        @ivar dSizeX: The delta X size of the object.
 
322
        @type dSizeX: float
 
323
        @ivar dSizeY: The delta Y size of the object.
 
324
        @type dSizeY: float
 
325
        @ivar dSizeZ: The delta Z size of the object.
 
326
        @type dSizeZ: float
 
327
        @ivar dsize: The delta (X,Y,Z) size of the object.
 
328
        @type dsize: tuple of 3 floats
 
329
        @ivar Layers: The object layers (also check the newer attribute
 
330
                L{layers<layers>}).  This value is a bitmask with at 
 
331
                least one position set for the 20 possible layers starting from the low
 
332
                order bit.  The easiest way to deal with these values in in hexadecimal
 
333
                notation.
 
334
                Example::
 
335
                        ob.Layer = 0x04 # sets layer 3 ( bit pattern 0100 )
 
336
                After setting the Layer value, call Blender.Redraw( -1 ) to update
 
337
                the interface.
 
338
        @type Layers: integer (bitmask)
 
339
        @type layers: list of integers
 
340
        @ivar layers: The layers this object is visible in (also check the older
 
341
                attribute L{Layers<Layers>}).  This returns a list of
 
342
                integers in the range [1, 20], each number representing the respective
 
343
                layer.  Setting is done by passing a list of ints or an empty list for
 
344
                no layers.
 
345
                Example::
 
346
                        ob.layers = []  # object won't be visible
 
347
                        ob.layers = [1, 4] # object visible only in layers 1 and 4
 
348
                        ls = o.layers
 
349
                        ls.append([10])
 
350
                        o.layers = ls
 
351
                        print ob.layers # will print: [1, 4, 10]
 
352
                B{Note}: changes will only be visible after the screen (at least
 
353
                the 3d View and Buttons windows) is redrawn.
 
354
        @ivar parent: The parent object of the object (if defined). Read-only.
 
355
        @type parent: Object or None
 
356
        @ivar data: The Datablock object linked to this object.  Read-only.
 
357
        @type data: varies
 
358
        @ivar ipo: Contains the Ipo if one is assigned to the object, B{None}
 
359
                otherwise.  Setting to B{None} clears the current Ipo.
 
360
        @type ipo:  Ipo
 
361
        @ivar mat: The matrix of the object in world space (absolute, takes vertex parents, tracking
 
362
                and Ipos into account).  Read-only.
 
363
        @type mat: Matrix
 
364
        @ivar matrix: Same as L{mat}.  Read-only.
 
365
        @type matrix: Matrix
 
366
        @ivar matrixLocal: The matrix of the object relative to its parent; if there is no parent,
 
367
        returns the world matrix (L{matrixWorld<Object.Object.matrixWorld>}).
 
368
        @type matrixLocal: Matrix
 
369
        @ivar matrixOldWorld: Old-type worldspace matrix (prior to Blender 2.34).
 
370
                Read-only.
 
371
        @type matrixOldWorld: Matrix
 
372
        @ivar matrixWorld: Same as L{mat}. Read-only.
 
373
        @type matrixWorld: Matrix
 
374
        @ivar colbits: The Material usage mask. A set bit #n means: the Material
 
375
                #n in the Object's material list is used. Otherwise, the Material #n
 
376
                of the Objects Data material list is displayed.
 
377
                Example::
 
378
                        object.colbits = (1<<0) + (1<<5) # use mesh materials 0 (1<<0) and 5 (1<<5)
 
379
                        # use object materials for all others
 
380
        @ivar sel: The selection state of the object in the current scene. 
 
381
                True is selected, False is unselected. Setting makes the object active.
 
382
        @type sel: boolean
 
383
        @ivar effects: The list of particle effects associated with the object.
 
384
                Read-only.
 
385
        @type effects: list of Effect objects
 
386
        @ivar parentbonename: The string name of the parent bone (if defined).
 
387
                This can be set to another bone in the armature if the object already has a bone parent.
 
388
        @type parentbonename: string or None
 
389
        @ivar protectFlags: The "transform locking" bitfield flags for the object.  
 
390
        See L{ProtectFlags} const dict for values.
 
391
        @type protectFlags: int
 
392
        @ivar DupGroup: The DupliGroup Animation Property. Assign a group to
 
393
                DupGroup to make this object an instance of that group.
 
394
                This does not enable or disable the DupliGroup option, for that use
 
395
                L{enableDupGroup}.
 
396
                The attribute returns None when this object does not have a dupliGroup, 
 
397
                and setting the attrbute to None deletes the object from the group.
 
398
        @type DupGroup: Group or None
 
399
        @ivar DupObjects: The Dupli object instances.  Read-only.
 
400
                Returns of list of tuples for object duplicated
 
401
                by dupliframe, dupliverts dupligroups and other animation properties.
 
402
                The first tuple item is the original object that is duplicated,
 
403
                the second is the 4x4 worldspace dupli-matrix.
 
404
                Example::
 
405
                        import Blender
 
406
                        from Blender import Object, Scene, Mathutils
 
407
 
 
408
                        ob= Object.Get('Cube')
 
409
                        dupe_obs= ob.DupObjects
 
410
                        scn= Scene.GetCurrent()
 
411
                        for dupe_ob, dupe_matrix in dupe_obs:
 
412
                                print dupe_ob.name
 
413
                                empty_ob = scn.objects.new('Empty')
 
414
                                empty_ob.setMatrix(dupe_matrix)
 
415
                        Blender.Redraw()
 
416
        @type DupObjects: list of tuples containing (object, matrix)
 
417
        @ivar enableNLAOverride: Whether the object uses NLA or active Action for animation.
 
418
        @type enableNLAOverride: boolean
 
419
        @ivar enableDupVerts: The DupliVerts status of the object.
 
420
                Does not indicate that this object has any dupliVerts,
 
421
                (as returned by L{DupObjects}) just that dupliVerts are enabled.
 
422
        @type enableDupVerts: boolean
 
423
        @ivar enableDupFaces: The DupliFaces status of the object.
 
424
                Does not indicate that this object has any dupliFaces,
 
425
                (as returned by L{DupObjects}) just that dupliFaces are enabled.
 
426
        @type enableDupFaces: boolean
 
427
        @ivar enableDupFacesScale: The DupliFacesScale status of the object.
 
428
        @type enableDupFacesScale: boolean
 
429
        @ivar enableDupFrames: The DupliFrames status of the object.
 
430
                Does not indicate that this object has any dupliFrames,
 
431
                (as returned by L{DupObjects}) just that dupliFrames are enabled.
 
432
        @type enableDupFrames: boolean
 
433
        @ivar enableDupGroup: The DupliGroup status of the object.
 
434
                Set True to make this object an instance of the object's L{DupGroup},
 
435
                and set L{DupGroup} to a group for this to take effect,
 
436
                Use L{DupObjects} to get the object data from this instance.
 
437
        @type enableDupGroup: boolean
 
438
        @ivar enableDupRot: The DupliRot status of the object.
 
439
                Use with L{enableDupVerts} to rotate each instance
 
440
                by the vertex normal.
 
441
        @type enableDupRot: boolean
 
442
        @ivar enableDupNoSpeed: The DupliNoSpeed status of the object.
 
443
                Use with L{enableDupFrames} to ignore dupliFrame speed. 
 
444
        @type enableDupNoSpeed: boolean
 
445
        @ivar DupSta: The DupliFrame starting frame. Use with L{enableDupFrames}.
 
446
                Value clamped to [1,32767].
 
447
        @type DupSta: int
 
448
        @ivar DupEnd: The DupliFrame end frame. Use with L{enableDupFrames}.
 
449
                Value clamped to [1,32767].
 
450
        @type DupEnd: int
 
451
        @ivar DupOn: The DupliFrames in succession between DupOff frames.
 
452
                Value is clamped to [1,1500].
 
453
                Use with L{enableDupFrames} and L{DupOff} > 0.
 
454
        @type DupOn: int
 
455
        @ivar DupOff: The DupliFrame removal of every Nth frame for this object.
 
456
                Use with L{enableDupFrames}.  Value is clamped to [0,1500].
 
457
        @type DupOff: int
 
458
        @ivar passIndex: Index # for the IndexOB render pass.
 
459
                Value is clamped to [0,1000].
 
460
        @type passIndex: int
 
461
        @ivar activeMaterial: The active material index for this object.
 
462
 
 
463
                The active index is used to select the material to edit in the material buttons,
 
464
                new data created will also use the active material.
 
465
 
 
466
                Value is clamped to [1,len(ob.materials)]. - [0,0] when there is no materials applied to the object.
 
467
        @type activeMaterial: int
 
468
        @ivar drawSize: The size to display the Empty.
 
469
        Value clamped to [0.01,10.0].
 
470
        @type drawSize: float
 
471
        @ivar modifiers: The modifiers associated with the object.
 
472
                Example::
 
473
                        # copy the active objects modifiers to all other visible selected objects
 
474
                        from Blender import *
 
475
                        scn = Scene.GetCurrent()
 
476
                        ob_act = scn.objects.active
 
477
                        for ob in scn.objects.context:
 
478
                                # Cannot copy modifiers to an object of a different type
 
479
                                if ob.type == ob_act.type:
 
480
                                        ob.modifiers = ob_act.modifiers
 
481
        @type modifiers: L{Modifier Sequence<Modifier.ModSeq>}
 
482
        @ivar constraints: a L{sequence<Constraint.Constraints>} of
 
483
                L{constraints<Constraint.Constraint>} for the object. Read-only.
 
484
        @type constraints: Constraint Sequence
 
485
        @ivar actionStrips: a L{sequence<NLA.ActionStrips>} of
 
486
                L{action strips<NLA.ActionStrip>} for the object.  Read-only.
 
487
        @type actionStrips: BPy_ActionStrips
 
488
        @ivar action: The action associated with this object (if defined).
 
489
        @type action: L{Action<NLA.Action>} or None
 
490
        @ivar oopsLoc: Object's (X,Y) OOPs location.  Returns None if object
 
491
                is not found in list.
 
492
        @type oopsLoc:  tuple of 2 floats
 
493
        @ivar oopsSel: Object OOPs selection flag.
 
494
        @type oopsSel: boolean
 
495
        @ivar game_properties: The object's properties.  Read-only.
 
496
        @type game_properties: list of Properties.
 
497
        @ivar timeOffset: The time offset of the object's animation.
 
498
                Value clamped to [-300000.0,300000.0].
 
499
        @type timeOffset: float
 
500
        @ivar track: The object's tracked object.  B{None} is returned if no
 
501
                object is tracked.  Also, assigning B{None} clear the tracked object. 
 
502
        @type track: Object or None
 
503
        @ivar type: The object's type.  Read-only.
 
504
        @type type: string
 
505
        @ivar boundingBox: The bounding box of this object.  Read-only.
 
506
        @type boundingBox: list of 8 3D vectors
 
507
        @ivar drawType: The object's drawing type.
 
508
                See L{DrawTypes} constant dict for values.
 
509
        @type drawType: int
 
510
        @ivar parentType: The object's parent type.  Read-only.
 
511
                See L{ParentTypes} constant dict for values.
 
512
        @type parentType: int
 
513
        @ivar axis: Enable display of active object's center and axis.
 
514
                Also see B{AXIS} bit in L{drawMode} attribute.
 
515
        @type axis: boolean
 
516
        @ivar texSpace: Enable display of active object's texture space.
 
517
                Also see B{TEXSPACE} bit in L{drawMode} attribute.
 
518
        @type texSpace: boolean
 
519
        @ivar nameMode: Enable display of active object's name.
 
520
                Also see B{NAME} bit in L{drawMode} attribute.
 
521
        @type nameMode: boolean
 
522
        @ivar wireMode: Enable the active object's wireframe over solid drawing.
 
523
                Also see B{WIRE} bit in L{drawMode} attribute.
 
524
        @type wireMode: boolean
 
525
        @ivar xRay: Enable drawing the active object in front of others.
 
526
                Also see B{XRAY} bit in L{drawMode} attribute.
 
527
        @type xRay: boolean
 
528
        @ivar transp: Enable transparent materials for the active object
 
529
                (mesh only).  Also see B{TRANSP} bit in L{drawMode} attribute.
 
530
        @type transp: boolean
 
531
        @ivar drawMode: The object's drawing mode bitfield.
 
532
                See L{DrawModes} constant dict for values.
 
533
        @type drawMode: int
 
534
 
 
535
        @ivar piType: Type of particle interaction. 
 
536
                See L{PITypes} constant dict for values.
 
537
        @type piType: int
 
538
        @ivar piFalloff: The particle interaction falloff power.
 
539
                Value clamped to [0.0,10.0].
 
540
        @type piFalloff: float
 
541
        @ivar piMaxDist: Max distance for the particle interaction field to work.
 
542
                Value clamped to [0.0,1000.0].
 
543
        @type piMaxDist: float
 
544
        @ivar piPermeability: Probability that a particle will pass through the
 
545
                mesh.  Value clamped to [0.0,1.0].
 
546
        @type piPermeability: float
 
547
        @ivar piRandomDamp: Random variation of particle interaction damping.
 
548
                Value clamped to [0.0,1.0].
 
549
        @type piRandomDamp: float
 
550
        @ivar piSoftbodyDamp: Damping factor for softbody deflection.
 
551
                Value clamped to [0.0,1.0].
 
552
        @type piSoftbodyDamp: float
 
553
        @ivar piSoftbodyIThick: Inner face thickness for softbody deflection.
 
554
                Value clamped to [0.001,1.0].
 
555
        @type piSoftbodyIThick: float
 
556
        @ivar piSoftbodyOThick: Outer face thickness for softbody deflection.
 
557
                Value clamped to [0.001,1.0].
 
558
        @type piSoftbodyOThick: float
 
559
        @ivar piStrength: Particle interaction force field strength.
 
560
                Value clamped to [0.0,1000.0].
 
561
        @type piStrength: float
 
562
        @ivar piSurfaceDamp: Amount of damping during particle collision.
 
563
                Value clamped to [0.0,1.0].
 
564
        @type piSurfaceDamp: float
 
565
        @ivar piUseMaxDist: Use a maximum distance for the field to work.
 
566
        @type piUseMaxDist: boolean
 
567
 
 
568
        @ivar isSoftBody: True if object is a soft body.  Read-only.
 
569
        @type isSoftBody: boolean
 
570
        @ivar SBDefaultGoal: Default softbody goal value, when no vertex group used.
 
571
                Value clamped to [0.0,1.0].
 
572
        @type SBDefaultGoal: float
 
573
        @ivar SBErrorLimit: Softbody Runge-Kutta ODE solver error limit (low values give more precision).
 
574
                Value clamped to [0.01,1.0].
 
575
        @type SBErrorLimit: float
 
576
        @ivar SBFriction: General media friction for softbody point movements.
 
577
                Value clamped to [0.0,10.0].
 
578
        @type SBFriction: float
 
579
        @ivar SBGoalFriction: Softbody goal (vertex target position) friction.
 
580
                Value clamped to [0.0,10.0].
 
581
        @type SBGoalFriction: float
 
582
        @ivar SBGoalSpring: Softbody goal (vertex target position) spring stiffness.
 
583
                Value clamped to [0.0,0.999].
 
584
        @type SBGoalSpring: float
 
585
        @ivar SBGrav: Apply gravitation to softbody point movement.
 
586
                Value clamped to [0.0,10.0].
 
587
        @type SBGrav: float
 
588
        @ivar SBInnerSpring: Softbody edge spring stiffness.
 
589
                Value clamped to [0.0,0.999].
 
590
        @type SBInnerSpring: float
 
591
        @ivar SBInnerSpringFrict: Softbody edge spring friction.
 
592
                Value clamped to [0.0,10.0].
 
593
        @type SBInnerSpringFrict: float
 
594
        @ivar SBMass: Softbody point mass (heavier is slower).
 
595
                Value clamped to [0.001,50.0].
 
596
        @type SBMass: float
 
597
        @ivar SBMaxGoal: Softbody goal maximum (vertex group weights scaled to
 
598
                match this range).  Value clamped to [0.0,1.0].
 
599
        @type SBMaxGoal: float
 
600
        @ivar SBMinGoal: Softbody goal minimum (vertex group weights scaled to
 
601
                match this range).  Value clamped to [0.0,1.0].
 
602
        @type SBMinGoal: float
 
603
        @ivar SBSpeed: Tweak timing for physics to control softbody frequency and
 
604
                speed.  Value clamped to [0.0,10.0].
 
605
        @type SBSpeed: float
 
606
        @ivar SBStiffQuads: Softbody adds diagonal springs on 4-gons enabled.
 
607
        @type SBStiffQuads: boolean
 
608
        @ivar SBUseEdges: Softbody use edges as springs enabled.
 
609
        @type SBUseEdges: boolean
 
610
        @ivar SBUseGoal: Softbody forces for vertices to stick to animated position enabled.
 
611
        @type SBUseGoal: boolean
 
612
 
 
613
        @ivar rbFlags: Rigid body bitfield.  See L{RBFlags} for valid values.
 
614
        @type rbFlags: int
 
615
        @ivar rbMass: Rigid body mass.  Must be a positive value.
 
616
        @type rbMass: float
 
617
        @ivar rbRadius: Rigid body bounding sphere size.  Must be a positive
 
618
                value.
 
619
        @type rbRadius: float
 
620
        @ivar rbShapeBoundType: Rigid body shape bound type.  See L{RBShapes}
 
621
                const dict for values.
 
622
        @type rbShapeBoundType: int
 
623
        """
 
624
 
 
625
        def buildParts():
 
626
                """
 
627
                Recomputes the particle system. This method only applies to an Object of
 
628
                the type Effect.
 
629
                """
 
630
 
 
631
        def insertShapeKey():
 
632
                """
 
633
                Insert a Shape Key in the current object.  It applies to Objects of
 
634
                the type Mesh, Lattice, or Curve.
 
635
                """
 
636
 
 
637
        def getPose():
 
638
                """
 
639
                Gets the current Pose of the object.
 
640
                @rtype: Pose object
 
641
                @return: the current pose object
 
642
                """
 
643
 
 
644
        def evaluatePose(framenumber):
 
645
                """
 
646
                Evaluates the Pose based on its currently bound action at a certain frame.
 
647
                @type framenumber: Int
 
648
                @param framenumber: The frame number to evaluate to.
 
649
                """
 
650
 
 
651
        def clearIpo():
 
652
                """
 
653
                Unlinks the ipo from this object.
 
654
                @return: True if there was an ipo linked or False otherwise.
 
655
                """
 
656
 
 
657
        def clrParent(mode = 0, fast = 0):
 
658
                """
 
659
                Clears parent object.
 
660
                @type mode: Integer
 
661
                @type fast: Integer
 
662
                @param mode: A mode flag. If mode flag is 2, then the object transform will
 
663
                        be kept. Any other value, or no value at all will update the object
 
664
                        transform.
 
665
                @param fast: If the value is 0, the scene hierarchy will not be updated. Any
 
666
                        other value, or no value at all will update the scene hierarchy.
 
667
                """
 
668
 
 
669
        def getData(name_only=False, mesh=False):
 
670
                """
 
671
                Returns the Datablock object (Mesh, Lamp, Camera, etc.) linked to this 
 
672
                Object.  If the keyword parameter B{name_only} is True, only the Datablock
 
673
                name is returned as a string.  It the object is of type Mesh, then the
 
674
                B{mesh} keyword can also be used; the data return is a Mesh object if
 
675
                True, otherwise it is an NMesh object (the default).
 
676
                The B{mesh} keyword is ignored for non-mesh objects.
 
677
                @type name_only: bool
 
678
                @param name_only: This is a keyword parameter.  If True (or nonzero),
 
679
                only the name of the data object is returned. 
 
680
                @type mesh: bool
 
681
                @param mesh: This is a keyword parameter.  If True (or nonzero), 
 
682
                a Mesh data object is returned.
 
683
                @rtype: specific Object type or string
 
684
                @return: Depends on the type of Datablock linked to the Object.  If
 
685
                B{name_only} is True, it returns a string.
 
686
                @note: Mesh is faster than NMesh because Mesh is a thin wrapper.
 
687
                @note: This function is different from L{NMesh.GetRaw} and L{Mesh.Get}
 
688
                because it keeps a link to the original mesh, which is needed if you are
 
689
                dealing with Mesh weight groups.
 
690
                @note: Make sure the object you are getting the data from isn't in
 
691
                EditMode before calling this function; otherwise you'll get the data
 
692
                before entering EditMode. See L{Window.EditMode}.
 
693
                """
 
694
 
 
695
        def getParentBoneName():
 
696
                """
 
697
                Returns None, or the 'sub-name' of the parent (eg. Bone name)
 
698
                @return: string
 
699
                """
 
700
 
 
701
        def getDeltaLocation():
 
702
                """
 
703
                Returns the object's delta location in a list (x, y, z)
 
704
                @rtype: A vector triple
 
705
                @return: (x, y, z)
 
706
                """
 
707
 
 
708
        def getDrawMode():
 
709
                """
 
710
                Returns the object draw mode.
 
711
                @rtype: Integer
 
712
                @return: a sum of the following:
 
713
                                - 2  - axis
 
714
                                - 4  - texspace
 
715
                                - 8  - drawname
 
716
                                - 16 - drawimage
 
717
                                - 32 - drawwire
 
718
                                - 64 - xray
 
719
                """
 
720
 
 
721
        def getDrawType():
 
722
                """
 
723
                Returns the object draw type
 
724
                @rtype: Integer
 
725
                @return: One of the following:
 
726
                                - 1 - Bounding box
 
727
                                - 2 - Wire
 
728
                                - 3 - Solid
 
729
                                - 4 - Shaded
 
730
                                - 5 - Textured
 
731
                """
 
732
 
 
733
        def getEuler(space):
 
734
                """
 
735
                @type space: string
 
736
                @param space: The desired space for the size:
 
737
                        - localspace: (default) relative to the object's parent;
 
738
                        - worldspace: absolute, taking vertex parents, tracking and
 
739
                                        Ipo's into account;
 
740
                Returns the object's localspace rotation as Euler rotation vector (rotX, rotY, rotZ).  Angles are in radians.
 
741
                @rtype: Py_Euler
 
742
                @return: A python Euler. Data is wrapped when euler is present.
 
743
                """
 
744
 
 
745
        def getInverseMatrix():
 
746
                """
 
747
                Returns the object's inverse matrix.
 
748
                @rtype: Py_Matrix
 
749
                @return: A python matrix 4x4
 
750
                """
 
751
 
 
752
        def getIpo():
 
753
                """
 
754
                Returns the Ipo associated to this object or None if there's no linked ipo.
 
755
                @rtype: Ipo
 
756
                @return: the wrapped ipo or None.
 
757
                """
 
758
        def isSelected():
 
759
                """
 
760
                Returns the objects selection state in the current scene as a boolean value True or False.
 
761
                @rtype: Boolean
 
762
                @return: Selection state as True or False
 
763
                """
 
764
        
 
765
        def getLocation(space):
 
766
                """
 
767
                @type space: string
 
768
                @param space: The desired space for the location:
 
769
                        - localspace: (default) relative to the object's parent;
 
770
                        - worldspace: absolute, taking vertex parents, tracking and
 
771
                                Ipo's into account;
 
772
                Returns the object's location (x, y, z).
 
773
                @return: (x, y, z)
 
774
 
 
775
                I{B{Example:}}
 
776
 
 
777
                The example below works on the default scene. It retrieves all objects in
 
778
                the scene and prints the name and location of each object::
 
779
                        import Blender
 
780
 
 
781
                        sce = Blender.Scene.GetCurrent()
 
782
 
 
783
                        for ob in sce.objects:
 
784
                                print obj.name
 
785
                                print obj.loc
 
786
                @note: the worldspace location is the same as ob.matrixWorld[3][0:3]
 
787
                """
 
788
 
 
789
        def getAction():
 
790
                """
 
791
                Returns an action if one is associated with this object (only useful for armature types).
 
792
                @rtype: Py_Action
 
793
                @return: a python action.
 
794
                """
 
795
 
 
796
        def getMaterials(what = 0):
 
797
                """
 
798
                Returns a list of materials assigned to the object.
 
799
                @type what: int
 
800
                @param what: if nonzero, empty slots will be returned as None's instead
 
801
                                of being ignored (default way). See L{NMesh.NMesh.getMaterials}.
 
802
                @rtype: list of Material Objects
 
803
                @return: list of Material Objects assigned to the object.
 
804
                """
 
805
 
 
806
        def getMatrix(space = 'worldspace'):
 
807
                """
 
808
                Returns the object matrix.
 
809
                @type space: string
 
810
                @param space: The desired matrix:
 
811
                        - worldspace (default): absolute, taking vertex parents, tracking and
 
812
                                Ipo's into account;
 
813
                        - localspace: relative to the object's parent (returns worldspace 
 
814
                                matrix if the object doesn't have a parent);
 
815
                        - old_worldspace: old behavior, prior to Blender 2.34, where eventual 
 
816
                                changes made by the script itself were not taken into account until 
 
817
                                a redraw happened, either called by the script or upon its exit.
 
818
                Returns the object matrix.
 
819
                @rtype: Py_Matrix (WRAPPED DATA)
 
820
                @return: a python 4x4 matrix object. Data is wrapped for 'worldspace'
 
821
                """
 
822
 
 
823
        def getName():
 
824
                """
 
825
                Returns the name of the object
 
826
                @return: The name of the object
 
827
 
 
828
                I{B{Example:}}
 
829
 
 
830
                The example below works on the default scene. It retrieves all objects in
 
831
                the scene and prints the name of each object::
 
832
                        import Blender
 
833
 
 
834
                        sce= Blender.Scene.GetCurrent()
 
835
 
 
836
                        for ob in sce.objects:
 
837
                                print ob.getName()
 
838
                """
 
839
 
 
840
        def getParent():
 
841
                """
 
842
                Returns the object's parent object.
 
843
                @rtype: Object
 
844
                @return: The parent object of the object. If not available, None will be
 
845
                returned.
 
846
                """
 
847
 
 
848
        def getSize(space):
 
849
                """
 
850
                @type space: string
 
851
                @param space: The desired space for the size:
 
852
                        - localspace: (default) relative to the object's parent;
 
853
                        - worldspace: absolute, taking vertex parents, tracking and
 
854
                                Ipo's into account;
 
855
                Returns the object's size.
 
856
                @return: (SizeX, SizeY, SizeZ)
 
857
                @note: the worldspace size will not return negative (flipped) scale values.
 
858
                """
 
859
 
 
860
        def getParentBoneName():
 
861
                """
 
862
                Returns the object's parent object's sub name, or None.
 
863
                For objects parented to bones, this is the name of the bone.
 
864
                @rtype: String
 
865
                @return: The parent object sub-name of the object.
 
866
                        If not available, None will be returned.
 
867
                """
 
868
 
 
869
        def getTimeOffset():
 
870
                """
 
871
                Returns the time offset of the object's animation.
 
872
                @return: TimeOffset
 
873
                """
 
874
 
 
875
        def getTracked():
 
876
                """
 
877
                Returns the object's tracked object.
 
878
                @rtype: Object
 
879
                @return: The tracked object of the object. If not available, None will be
 
880
                returned.
 
881
                """
 
882
 
 
883
        def getType():
 
884
                """
 
885
                Returns the type of the object in 'Armature', 'Camera', 'Curve', 'Lamp', 'Lattice',
 
886
                'Mball', 'Mesh', 'Surf', 'Empty', 'Wave' (deprecated) or 'unknown' in exceptional cases.
 
887
 
 
888
                I{B{Example:}}
 
889
 
 
890
                The example below works on the default scene. It retrieves all objects in
 
891
                the scene and updates the location and rotation of the camera. When run,
 
892
                the camera will rotate 180 degrees and moved to the opposite side of the X
 
893
                axis. Note that the number 'pi' in the example is an approximation of the
 
894
                true number 'pi'.  A better, less error-prone value of pi is math.pi from the python math module.::
 
895
                        import Blender
 
896
 
 
897
                        sce = Blender.Scene.GetCurrent()
 
898
 
 
899
                        for obj in sce.objects:
 
900
                                if obj.type == 'Camera':
 
901
                                        obj.LocY = -obj.LocY
 
902
                                        obj.RotZ = 3.141592 - obj.RotZ
 
903
 
 
904
                        Blender.Redraw()
 
905
                
 
906
                @return: The type of object.
 
907
                @rtype: String
 
908
                """
 
909
 
 
910
        def insertIpoKey(keytype):
 
911
                """
 
912
                Inserts keytype values in object ipo at curframe.
 
913
                @type keytype: int
 
914
                @param keytype: A constant from L{IpoKeyTypes<Object.IpoKeyTypes>}
 
915
                @return: None
 
916
                """
 
917
 
 
918
        def link(datablock):
 
919
                """
 
920
                Links Object with ObData datablock provided in the argument. The data must match the
 
921
                Object's type, so you cannot link a Lamp to a Mesh type object.
 
922
                @type datablock: Blender ObData datablock
 
923
                @param datablock: A Blender datablock matching the objects type.
 
924
                """
 
925
 
 
926
        def makeParent(objects, noninverse = 0, fast = 0):
 
927
                """
 
928
                Makes the object the parent of the objects provided in the argument which
 
929
                must be a list of valid Objects.
 
930
                @type objects: Sequence of Blender Object
 
931
                @param objects: The children of the parent
 
932
                @type noninverse: Integer
 
933
                @param noninverse:
 
934
                                0 - make parent with inverse
 
935
                                1 - make parent without inverse
 
936
                @type fast: Integer
 
937
                @param fast:
 
938
                                0 - update scene hierarchy automatically
 
939
                                1 - don't update scene hierarchy (faster). In this case, you must
 
940
                                explicitely update the Scene hierarchy.
 
941
                @warn: objects must first be linked to a scene before they can become
 
942
                        parents of other objects.  Calling this makeParent method for an
 
943
                        unlinked object will result in an error.
 
944
                """
 
945
 
 
946
        def join(objects):
 
947
                """
 
948
                Uses the object as a base for all of the objects in the provided list to join into.
 
949
                
 
950
                @type objects: Sequence of Blender Object
 
951
                @param objects: A list of objects matching the object's type.
 
952
                @note: Objects in the list will not be removed from the scene.
 
953
                        To avoid overlapping data you may want to remove them manually after joining.
 
954
                @note: Join modifies the base object's data in place so that
 
955
                        other objects are joined into it. No new object or data is created.
 
956
                @note: Join will only work for object types Mesh, Armature, Curve and Surface;
 
957
                        an excption will be raised if the object is not of these types.
 
958
                @note: Objects in the list will be ignored if they to not match the base object.
 
959
                @note: The base object must be in the current scene to be joined.
 
960
                @note: This function will not work in background mode (no user interface).
 
961
                @note: An error in the function input will raise a TypeError or AttributeError,
 
962
                        otherwise an error in the data input will raise a RuntimeError.
 
963
                        For situations where you don't have tight control on the data that is being joined,
 
964
                        you should handle the RuntimeError error, letting the user know the data can't be joined.
 
965
                """
 
966
 
 
967
        def makeParentDeform(objects, noninverse = 0, fast = 0):
 
968
                """
 
969
                Makes the object the deformation parent of the objects provided in the argument
 
970
                which must be a list of valid Objects.
 
971
                The parent object must be a Curve or Armature.
 
972
                @type objects: Sequence of Blender Object
 
973
                @param objects: The children of the parent
 
974
                @type noninverse: Integer
 
975
                @param noninverse:
 
976
                                0 - make parent with inverse
 
977
                                1 - make parent without inverse
 
978
                @type fast: Integer
 
979
                @param fast:
 
980
                                0 - update scene hierarchy automatically
 
981
                                1 - don't update scene hierarchy (faster). In this case, you must
 
982
                                explicitely update the Scene hierarchy.
 
983
                @warn: objects must first be linked to a scene before they can become
 
984
                                parents of other objects.  Calling this makeParent method for an
 
985
                                unlinked object will result in an error.
 
986
                @warn: child objects must be of mesh type to deform correctly. Other object
 
987
                                types will fall back to normal parenting silently.
 
988
                """
 
989
 
 
990
        def makeParentVertex(objects, indices, noninverse = 0, fast = 0):
 
991
                """
 
992
                Makes the object the vertex parent of the objects provided in the argument
 
993
                which must be a list of valid Objects.
 
994
                The parent object must be a Mesh, Curve or Surface.
 
995
                @type objects: Sequence of Blender Object
 
996
                @param objects: The children of the parent
 
997
                @type indices: Tuple of Integers
 
998
                @param indices: The indices of the vertices you want to parent to (1 or 3 values)
 
999
                @type noninverse: Integer
 
1000
                @param noninverse:
 
1001
                                0 - make parent with inverse
 
1002
                                1 - make parent without inverse
 
1003
                @type fast: Integer
 
1004
                @param fast:
 
1005
                                0 - update scene hierarchy automatically
 
1006
                                1 - don't update scene hierarchy (faster). In this case, you must
 
1007
                                explicitely update the Scene hierarchy.
 
1008
                @warn: objects must first be linked to a scene before they can become
 
1009
                                parents of other objects.  Calling this makeParent method for an
 
1010
                                unlinked object will result in an error.
 
1011
                """
 
1012
        def makeParentBone(objects, bonename, noninverse = 0, fast = 0):
 
1013
                """
 
1014
                Makes one of the object's bones the parent of the objects provided in the argument
 
1015
                which must be a list of valid objects.  The parent object must be an Armature.
 
1016
                @type objects: Sequence of Blender Object
 
1017
                @param objects: The children of the parent
 
1018
                @type bonename: string
 
1019
                @param bonename: a valid bone name from the armature
 
1020
                @type noninverse: integer
 
1021
                @param noninverse:
 
1022
                                0 - make parent with inverse
 
1023
                                1 - make parent without inverse
 
1024
                @type fast: integer
 
1025
                @param fast:
 
1026
                                0 - update scene hierarchy automatically
 
1027
                                1 - don't update scene hierarchy (faster). In this case, you must
 
1028
                                explicitly update the Scene hierarchy.
 
1029
                @warn: Objects must first be linked to a scene before they can become
 
1030
                        parents of other objects.  Calling this method for an
 
1031
                        unlinked object will result in an exception.
 
1032
                """
 
1033
 
 
1034
        def setDeltaLocation(delta_location):
 
1035
                """
 
1036
                Sets the object's delta location which must be a vector triple.
 
1037
                @type delta_location: A vector triple
 
1038
                @param delta_location: A vector triple (x, y, z) specifying the new
 
1039
                location.
 
1040
                """
 
1041
 
 
1042
        def setDrawMode(drawmode):
 
1043
                """
 
1044
                Sets the object's drawing mode. The drawing mode can be a mix of modes. To
 
1045
                enable these, add up the values.
 
1046
                @type drawmode: Integer
 
1047
                @param drawmode: A sum of the following:
 
1048
                                - 2  - axis
 
1049
                                - 4  - texspace
 
1050
                                - 8  - drawname
 
1051
                                - 16 - drawimage
 
1052
                                - 32 - drawwire
 
1053
                                - 64 - xray
 
1054
                """
 
1055
 
 
1056
        def setDrawType(drawtype):
 
1057
                """
 
1058
                Sets the object's drawing type.
 
1059
                @type drawtype: Integer
 
1060
                @param drawtype: One of the following:
 
1061
                                - 1 - Bounding box
 
1062
                                - 2 - Wire
 
1063
                                - 3 - Solid
 
1064
                                - 4 - Shaded
 
1065
                                - 5 - Textured
 
1066
                """
 
1067
 
 
1068
        def setEuler(euler):
 
1069
                """
 
1070
                Sets the object's localspace rotation according to the specified Euler angles.
 
1071
                @type euler: Py_Euler or a list of floats
 
1072
                @param euler: a python Euler or x,y,z rotations as floats
 
1073
                """
 
1074
 
 
1075
        def setIpo(ipo):
 
1076
                """
 
1077
                Links an ipo to this object.
 
1078
                @type ipo: Blender Ipo
 
1079
                @param ipo: an object type ipo.
 
1080
                """
 
1081
 
 
1082
        def setLocation(x, y, z):
 
1083
                """
 
1084
                Sets the object's location relative to the parent object (if any).
 
1085
                @type x: float
 
1086
                @param x: The X coordinate of the new location.
 
1087
                @type y: float
 
1088
                @param y: The Y coordinate of the new location.
 
1089
                @type z: float
 
1090
                @param z: The Z coordinate of the new location.
 
1091
                """
 
1092
 
 
1093
        def setMaterials(materials):
 
1094
                """
 
1095
                Sets the materials. The argument must be a list 16 items or less.  Each
 
1096
                list element is either a Material or None.  Also see L{colbits}.
 
1097
                @type materials: Materials list
 
1098
                @param materials: A list of Blender material objects.
 
1099
                @note: Materials are assigned to the object's data by default.  Unless
 
1100
                you know the material is applied to the object or are changing the
 
1101
                object's L{colbits}, you need to look at the object data's materials.
 
1102
                """
 
1103
 
 
1104
        def setMatrix(matrix):
 
1105
                """
 
1106
                Sets the object's matrix and updates its transformation.  If the object
 
1107
                has a parent, the matrix transform is relative to the parent.
 
1108
                @type matrix: Py_Matrix 3x3 or 4x4
 
1109
                @param matrix: a 3x3 or 4x4 Python matrix.  If a 3x3 matrix is given,
 
1110
                it is extended to a 4x4 matrix.
 
1111
                @Note: This method is "bad": when called it changes the location,
 
1112
                rotation and size attributes of the object (since Blender uses these
 
1113
                values to calculate the object's transformation matrix).  Ton is
 
1114
                not happy having a method which "pretends" to do a matrix operation.
 
1115
                In the future, this method may be replaced with other methods which
 
1116
                make it easier for the user to determine the correct loc/rot/size values
 
1117
                for necessary for the object.
 
1118
                """
 
1119
 
 
1120
        def setName(name):
 
1121
                """
 
1122
                Sets the name of the object. A string longer than 20 characters will be shortened.
 
1123
                @type name: String
 
1124
                @param name: The new name for the object.
 
1125
                """
 
1126
 
 
1127
        def setSize(x, y, z):
 
1128
                """
 
1129
                Sets the object's size, relative to the parent object (if any), clamped 
 
1130
                @type x: float
 
1131
                @param x: The X size multiplier.
 
1132
                @type y: float
 
1133
                @param y: The Y size multiplier.
 
1134
                @type z: float
 
1135
                @param z: The Z size multiplier.
 
1136
                """
 
1137
 
 
1138
        def setTimeOffset(timeOffset):
 
1139
                """
 
1140
                Sets the time offset of the object's animation.
 
1141
                @type timeOffset: float
 
1142
                @param timeOffset: The new time offset for the object's animation.
 
1143
                """
 
1144
        
 
1145
        def shareFrom(object):
 
1146
                """
 
1147
                Link data of a specified argument with this object. This works only
 
1148
                if both objects are of the same type.
 
1149
                @type object: Blender Object
 
1150
                @param object: A Blender Object of the same type.
 
1151
                @note: This function is faster than using L{getData()} and setData()
 
1152
                because it skips making a Python object from the object's data.
 
1153
                """
 
1154
        
 
1155
        def select(boolean):
 
1156
                """
 
1157
                Sets the object's selection state in the current scene.
 
1158
                setting the selection will make this object the active object of this scene.
 
1159
                @type boolean: Integer
 
1160
                @param boolean:
 
1161
                                - 0  - unselected
 
1162
                                - 1  - selected
 
1163
                """
 
1164
        
 
1165
        def getBoundBox():
 
1166
                """
 
1167
                Returns the worldspace bounding box of this object.  This works for meshes (out of
 
1168
                edit mode) and curves.
 
1169
                @rtype: list of 8 (x,y,z) float coordinate vectors (WRAPPED DATA)
 
1170
                @return: The coordinates of the 8 corners of the bounding box. Data is wrapped when
 
1171
                bounding box is present.
 
1172
                """
 
1173
 
 
1174
        def makeDisplayList():
 
1175
                """
 
1176
                Updates this object's display list.  Blender uses display lists to store
 
1177
                already transformed data (like a mesh with its vertices already modified
 
1178
                by coordinate transformations and armature deformation).  If the object
 
1179
                isn't modified, there's no need to recalculate this data.  This method is
 
1180
                here for the *few cases* where a script may need it, like when toggling
 
1181
                the "SubSurf" mode for a mesh:
 
1182
 
 
1183
                Example::
 
1184
                        import Blender
 
1185
 
 
1186
                        scn = Blender.Scene.GetCurrent()
 
1187
                        object = scn.objects.active
 
1188
                        object.modifiers.append(Blender.Modifier.Type.SUBSURF)
 
1189
                        object.makeDisplayList()
 
1190
                        Blender.Window.RedrawAll()
 
1191
 
 
1192
                If you try this example without the line to update the display list, the
 
1193
                object will disappear from the screen until you press "SubSurf".
 
1194
                @warn: If after running your script objects disappear from the screen or
 
1195
                        are not displayed correctly, try this method function.  But if the script
 
1196
                        works properly without it, there's no reason to use it.
 
1197
                """
 
1198
 
 
1199
        def getScriptLinks (event):
 
1200
                """
 
1201
                Get a list with this Object's script links of type 'event'.
 
1202
                @type event: string
 
1203
                @param event: "FrameChanged", "Redraw" or "Render".
 
1204
                @rtype: list
 
1205
                @return: a list with Blender L{Text} names (the script links of the given
 
1206
                                'event' type) or None if there are no script links at all.
 
1207
                """
 
1208
 
 
1209
        def clearScriptLinks (links = None):
 
1210
                """
 
1211
                Delete script links from this Object.  If no list is specified, all
 
1212
                script links are deleted.
 
1213
                @type links: list of strings
 
1214
                @param links: None (default) or a list of Blender L{Text} names.
 
1215
                """
 
1216
 
 
1217
        def addScriptLink (text, event):
 
1218
                """
 
1219
                Add a new script link to this Object.
 
1220
                @type text: string
 
1221
                @param text: the name of an existing Blender L{Text}.
 
1222
                @type event: string
 
1223
                @param event: "FrameChanged", "Redraw" or "Render".
 
1224
                """
 
1225
 
 
1226
        def makeTrack (tracked, fast = 0):
 
1227
                """
 
1228
                Make this Object track another.
 
1229
                @type tracked: Blender Object
 
1230
                @param tracked: the object to be tracked.
 
1231
                @type fast: int (bool)
 
1232
                @param fast: if zero, the scene hierarchy is updated automatically.  If
 
1233
                        you set 'fast' to a nonzero value, don't forget to update the scene
 
1234
                        yourself (see L{Scene.Scene.update}).
 
1235
                @note: you also need to clear the rotation (L{setEuler}) of this object 
 
1236
                        if it was not (0,0,0) already.
 
1237
                """
 
1238
 
 
1239
        def clearTrack (mode = 0, fast = 0):
 
1240
                """
 
1241
                Make this Object not track another anymore.
 
1242
                @type mode: int (bool)
 
1243
                @param mode: if nonzero the matrix transformation used for tracking is kept.
 
1244
                @type fast: int (bool)
 
1245
                @param fast: if zero, the scene hierarchy is updated automatically.  If
 
1246
                        you set 'fast' to a nonzero value, don't forget to update the scene
 
1247
                        yourself (see L{Scene.Scene.update}).
 
1248
                """
 
1249
 
 
1250
        def getAllProperties ():
 
1251
                """
 
1252
                Return a list of all game properties from this object.
 
1253
                @rtype: PyList
 
1254
                @return: List of Property objects.
 
1255
                """
 
1256
 
 
1257
        def getProperty (name):
 
1258
                """
 
1259
                Return a game property from this object matching the name argument.
 
1260
                @type name: string
 
1261
                @param name: the name of the property to get.
 
1262
                @rtype: Property object
 
1263
                @return: The first property that matches name.
 
1264
                """
 
1265
 
 
1266
        def addProperty (name_or_property, data, type):
 
1267
                """
 
1268
                Add or create a game property for an object.  If called with only a
 
1269
                property object, the property is assigned to the object.  If called
 
1270
                with a property name string and data object, a new property is
 
1271
                created and added to the object.
 
1272
                @type name_or_property: string or Property object
 
1273
                @param name_or_property: the property name, or a property object.
 
1274
                @type data: string, int or float
 
1275
                @param data: Only valid when I{name_or_property} is a string. 
 
1276
                Value depends on what is passed in:
 
1277
                        - string:  string type property
 
1278
                        - int:  integer type property
 
1279
                        - float:  float type property
 
1280
                @type type: string (optional)
 
1281
                @param type: Only valid when I{name_or_property} is a string.
 
1282
                Can be the following:
 
1283
                        - 'BOOL'
 
1284
                        - 'INT'
 
1285
                        - 'FLOAT'
 
1286
                        - 'TIME'
 
1287
                        - 'STRING'
 
1288
                @warn: If a type is not declared string data will
 
1289
                become string type, int data will become int type
 
1290
                and float data will become float type. Override type
 
1291
                to declare bool type, and time type.
 
1292
                @warn:  A property object can be added only once to an object;
 
1293
                you must remove the property from an object to add it elsewhere.
 
1294
                """
 
1295
 
 
1296
        def removeProperty (property):
 
1297
                """
 
1298
                Remove a game property from an object.
 
1299
                @type property: Property object or string
 
1300
                @param property: Property object or property name to be removed.
 
1301
                """
 
1302
 
 
1303
        def removeAllProperties():
 
1304
                """
 
1305
                Removes all game properties from an object. 
 
1306
                """
 
1307
 
 
1308
        def copyAllPropertiesTo (object):
 
1309
                """
 
1310
                Copies all game properties from one object to another.
 
1311
                @type object: Object object
 
1312
                @param object: Object that will receive the properties.
 
1313
                """
 
1314
 
 
1315
        def getPIStregth():
 
1316
                """
 
1317
                Get the Object's Particle Interaction Strength.
 
1318
                @rtype: float
 
1319
                """
 
1320
 
 
1321
        def setPIStrength(strength):
 
1322
                """
 
1323
                Set the Object's Particle Interaction Strength.
 
1324
                Values between -1000.0 to 1000.0
 
1325
                @rtype: None
 
1326
                @type strength: float
 
1327
                @param strength: the Object's Particle Interaction New Strength.
 
1328
                """
 
1329
 
 
1330
        def getPIFalloff():
 
1331
                """
 
1332
                Get the Object's Particle Interaction falloff.
 
1333
                @rtype: float
 
1334
                """
 
1335
 
 
1336
        def setPIFalloff(falloff):
 
1337
                """
 
1338
                Set the Object's Particle Interaction falloff.
 
1339
                Values between 0 to 10.0
 
1340
                @rtype: None
 
1341
                @type falloff: float
 
1342
                @param falloff: the Object's Particle Interaction New falloff.
 
1343
                """    
 
1344
                
 
1345
        def getPIMaxDist():
 
1346
                """
 
1347
                Get the Object's Particle Interaction MaxDist.
 
1348
                @rtype: float
 
1349
                """
 
1350
 
 
1351
        def setPIMaxDist(MaxDist):
 
1352
                """
 
1353
                Set the Object's Particle Interaction MaxDist.
 
1354
                Values between 0 to 1000.0
 
1355
                @rtype: None
 
1356
                @type MaxDist: float
 
1357
                @param MaxDist: the Object's Particle Interaction New MaxDist.
 
1358
                """    
 
1359
                
 
1360
        def getPIType():
 
1361
                """
 
1362
                Get the Object's Particle Interaction Type.
 
1363
                @rtype: int
 
1364
                """
 
1365
 
 
1366
        def setPIType(type):
 
1367
                """
 
1368
                Set the Object's Particle Interaction type.
 
1369
                Use Module Constants
 
1370
                        - NONE
 
1371
                        - WIND
 
1372
                        - FORCE
 
1373
                        - VORTEX
 
1374
                        - MAGNET
 
1375
                @rtype: None
 
1376
                @type type: int
 
1377
                @param type: the Object's Particle Interaction Type.
 
1378
                """   
 
1379
 
 
1380
        def getPIUseMaxDist():
 
1381
                """
 
1382
                Get the Object's Particle Interaction if using MaxDist.
 
1383
                @rtype: int
 
1384
                """
 
1385
 
 
1386
        def setPIUseMaxDist(status):
 
1387
                """
 
1388
                Set the Object's Particle Interaction MaxDist.
 
1389
                0 = Off, 1 = on
 
1390
                @rtype: None
 
1391
                @type status: int
 
1392
                @param status: the new status
 
1393
                """ 
 
1394
 
 
1395
        def getPIDeflection():
 
1396
                """
 
1397
                Get the Object's Particle Interaction Deflection Setting.
 
1398
                @rtype: int
 
1399
                """
 
1400
 
 
1401
        def setPIDeflection(status):
 
1402
                """
 
1403
                Set the Object's Particle Interaction Deflection Setting.
 
1404
                0 = Off, 1 = on
 
1405
                @rtype: None
 
1406
                @type status: int
 
1407
                @param status: the new status
 
1408
                """ 
 
1409
 
 
1410
        def getPIPermf():
 
1411
                """
 
1412
                Get the Object's Particle Interaction Permeability.
 
1413
                @rtype: float
 
1414
                """
 
1415
 
 
1416
        def setPIPerm(perm):
 
1417
                """
 
1418
                Set the Object's Particle Interaction Permeability.
 
1419
                Values between 0 to 10.0
 
1420
                @rtype: None
 
1421
                @type perm: float
 
1422
                @param perm: the Object's Particle Interaction New Permeability.
 
1423
                """    
 
1424
 
 
1425
        def getPIRandomDamp():
 
1426
                """
 
1427
                Get the Object's Particle Interaction RandomDamp.
 
1428
                @rtype: float
 
1429
                """
 
1430
 
 
1431
        def setPIRandomDamp(damp):
 
1432
                """
 
1433
                Set the Object's Particle Interaction RandomDamp.
 
1434
                Values between 0 to 10.0
 
1435
                @rtype: None
 
1436
                @type damp: float
 
1437
                @param damp: the Object's Particle Interaction New RandomDamp.
 
1438
                """    
 
1439
 
 
1440
        def getPISurfaceDamp():
 
1441
                """
 
1442
                Get the Object's Particle Interaction SurfaceDamp.
 
1443
                @rtype: float
 
1444
                """
 
1445
 
 
1446
        def setPISurfaceDamp(damp):
 
1447
                """
 
1448
                Set the Object's Particle Interaction SurfaceDamp.
 
1449
                Values between 0 to 10.0
 
1450
                @rtype: None
 
1451
                @type damp: float
 
1452
                @param damp: the Object's Particle Interaction New SurfaceDamp.
 
1453
                """    
 
1454
 
 
1455
        def getSBMass():
 
1456
                """
 
1457
                Get the Object's SoftBody Mass.
 
1458
                @rtype: float
 
1459
                """
 
1460
 
 
1461
        def setSBMass(mass):
 
1462
                """
 
1463
                Set the Object's SoftBody Mass.
 
1464
                Values between 0 to 50.0
 
1465
                @rtype: None
 
1466
                @type mass: float
 
1467
                @param mass: the Object's SoftBody New mass.
 
1468
                """  
 
1469
        
 
1470
        def getSBGravity():
 
1471
                """
 
1472
                Get the Object's SoftBody Gravity.
 
1473
                @rtype: float
 
1474
                """
 
1475
 
 
1476
        def setSBGravity(grav):
 
1477
                """
 
1478
                Set the Object's SoftBody Gravity.
 
1479
                Values between 0 to 10.0
 
1480
                @rtype: None
 
1481
                @type grav: float
 
1482
                @param grav: the Object's SoftBody New Gravity.
 
1483
                """ 
 
1484
                
 
1485
        def getSBFriction():
 
1486
                """
 
1487
                Get the Object's SoftBody Friction.
 
1488
                @rtype: float
 
1489
                """
 
1490
 
 
1491
        def setSBFriction(frict):
 
1492
                """
 
1493
                Set the Object's SoftBody Friction.
 
1494
                Values between 0 to 10.0
 
1495
                @rtype: None
 
1496
                @type frict: float
 
1497
                @param frict: the Object's SoftBody New Friction.
 
1498
                """ 
 
1499
 
 
1500
        def getSBErrorLimit():
 
1501
                """
 
1502
                Get the Object's SoftBody ErrorLimit.
 
1503
                @rtype: float
 
1504
                """
 
1505
 
 
1506
        def setSBErrorLimit(err):
 
1507
                """
 
1508
                Set the Object's SoftBody ErrorLimit.
 
1509
                Values between 0 to 1.0
 
1510
                @rtype: None
 
1511
                @type err: float
 
1512
                @param err: the Object's SoftBody New ErrorLimit.
 
1513
                """ 
 
1514
                
 
1515
        def getSBGoalSpring():
 
1516
                """
 
1517
                Get the Object's SoftBody GoalSpring.
 
1518
                @rtype: float
 
1519
                """
 
1520
 
 
1521
        def setSBGoalSpring(gs):
 
1522
                """
 
1523
                Set the Object's SoftBody GoalSpring.
 
1524
                Values between 0 to 0.999
 
1525
                @rtype: None
 
1526
                @type gs: float
 
1527
                @param gs: the Object's SoftBody New GoalSpring.
 
1528
                """ 
 
1529
                
 
1530
        def getSBGoalFriction():
 
1531
                """
 
1532
                Get the Object's SoftBody GoalFriction.
 
1533
                @rtype: float
 
1534
                """
 
1535
 
 
1536
        def setSBGoalFriction(gf):
 
1537
                """
 
1538
                Set the Object's SoftBody GoalFriction.
 
1539
                Values between 0 to 10.0
 
1540
                @rtype: None
 
1541
                @type gf: float
 
1542
                @param gf: the Object's SoftBody New GoalFriction.
 
1543
                """ 
 
1544
                
 
1545
        def getSBMinGoal():
 
1546
                """
 
1547
                Get the Object's SoftBody MinGoal.
 
1548
                @rtype: float
 
1549
                """
 
1550
 
 
1551
        def setSBMinGoal(mg):
 
1552
                """
 
1553
                Set the Object's SoftBody MinGoal.
 
1554
                Values between 0 to 1.0
 
1555
                @rtype: None
 
1556
                @type mg: float
 
1557
                @param mg: the Object's SoftBody New MinGoal.
 
1558
                """ 
 
1559
                
 
1560
        def getSBMaxGoal():
 
1561
                """
 
1562
                Get the Object's SoftBody MaxGoal.
 
1563
                @rtype: float
 
1564
                """
 
1565
 
 
1566
        def setSBMaxGoal(mg):
 
1567
                """
 
1568
                Set the Object's SoftBody MaxGoal.
 
1569
                Values between 0 to 1.0
 
1570
                @rtype: None
 
1571
                @type mg: float
 
1572
                @param mg: the Object's SoftBody New MaxGoal.
 
1573
                """ 
 
1574
                
 
1575
        def getSBInnerSpring():
 
1576
                """
 
1577
                Get the Object's SoftBody InnerSpring.
 
1578
                @rtype: float
 
1579
                """
 
1580
 
 
1581
        def setSBInnerSpring(sprr):
 
1582
                """
 
1583
                Set the Object's SoftBody InnerSpring.
 
1584
                Values between 0 to 0.999
 
1585
                @rtype: None
 
1586
                @type sprr: float
 
1587
                @param sprr: the Object's SoftBody New InnerSpring.
 
1588
                """ 
 
1589
                
 
1590
        def getSBInnerSpringFriction():
 
1591
                """
 
1592
                Get the Object's SoftBody InnerSpringFriction.
 
1593
                @rtype: float
 
1594
                """
 
1595
 
 
1596
        def setSBInnerSpringFriction(sprf):
 
1597
                """
 
1598
                Set the Object's SoftBody InnerSpringFriction.
 
1599
                Values between 0 to 10.0
 
1600
                @rtype: None
 
1601
                @type sprf: float
 
1602
                @param sprf: the Object's SoftBody New InnerSpringFriction.
 
1603
                """ 
 
1604
                
 
1605
        def getSBDefaultGoal():
 
1606
                """
 
1607
                Get the Object's SoftBody DefaultGoal.
 
1608
                @rtype: float
 
1609
                """
 
1610
 
 
1611
        def setSBDefaultGoal(goal):
 
1612
                """
 
1613
                Set the Object's SoftBody DefaultGoal.
 
1614
                Values between 0 to 1.0
 
1615
                @rtype: None
 
1616
                @type goal: float
 
1617
                @param goal: the Object's SoftBody New DefaultGoal.
 
1618
                """   
 
1619
 
 
1620
        def isSB():
 
1621
                """
 
1622
                Returns the Object's SoftBody enabled state.
 
1623
                @rtype: boolean
 
1624
                """
 
1625
 
 
1626
        def getSBPostDef():
 
1627
                """
 
1628
                get SoftBodies PostDef option
 
1629
                @rtype: int
 
1630
                """
 
1631
 
 
1632
        def setSBPostDef(switch):
 
1633
                """
 
1634
                Enable / Disable SoftBodies PostDef option
 
1635
                1: on
 
1636
                0: off
 
1637
                @rtype: None
 
1638
                @type switch: int
 
1639
                @param switch: the Object's SoftBody New PostDef Value.
 
1640
                """ 
 
1641
 
 
1642
        def getSBUseGoal():
 
1643
                """
 
1644
                get SoftBodies UseGoal option
 
1645
                @rtype: int
 
1646
                """
 
1647
 
 
1648
        def setSBUseGoal(switch):
 
1649
                """
 
1650
                Enable / Disable SoftBodies UseGoal option
 
1651
                1: on
 
1652
                0: off
 
1653
                @rtype: None
 
1654
                @type switch: int
 
1655
                @param switch: the Object's SoftBody New UseGoal Value.
 
1656
                """ 
 
1657
        def getSBUseEdges():
 
1658
                """
 
1659
                get SoftBodies UseEdges option
 
1660
                @rtype: int
 
1661
                """
 
1662
 
 
1663
        def setSBUseEdges(switch):
 
1664
                """
 
1665
                Enable / Disable SoftBodies UseEdges option
 
1666
                1: on
 
1667
                0: off
 
1668
                @rtype: None
 
1669
                @type switch: int
 
1670
                @param switch: the Object's SoftBody New UseEdges Value.
 
1671
                """ 
 
1672
                
 
1673
        def getSBStiffQuads():
 
1674
                """
 
1675
                get SoftBodies StiffQuads option
 
1676
                @rtype: int
 
1677
                """
 
1678
 
 
1679
        def setSBStiffQuads(switch):
 
1680
                """
 
1681
                Enable / Disable SoftBodies StiffQuads option
 
1682
                1: on
 
1683
                0: off
 
1684
                @rtype: None
 
1685
                @type switch: int
 
1686
                @param switch: the Object's SoftBody New StiffQuads Value.
 
1687
                """     
1694
1688
 
1695
1689
 
1696
1690
class Property:
1697
 
  """
1698
 
  The Property object
1699
 
  ===================
1700
 
    This property gives access to object property data in Blender, used by the game engine.
1701
 
    @ivar name: The property name.
1702
 
    @ivar data: Data for this property. Depends on property type.
1703
 
    @ivar type: The property type.
1704
 
    @warn:  Comparisons between properties will only be true when
1705
 
    both the name and data pairs are the same.
1706
 
  """
1707
 
 
1708
 
  def getName ():
1709
 
    """
1710
 
    Get the name of this property.
1711
 
    @rtype: string
1712
 
    @return: The property name.
1713
 
    """
1714
 
 
1715
 
  def setName (name):
1716
 
    """
1717
 
    Set the name of this property.
1718
 
    @type name: string
1719
 
    @param name: The new name of the property
1720
 
    """
1721
 
 
1722
 
  def getData():
1723
 
    """
1724
 
    Get the data for this property.
1725
 
    @rtype: string, int, or float
1726
 
    """
1727
 
 
1728
 
  def setData(data):
1729
 
    """
1730
 
    Set the data for this property.
1731
 
    @type data: string, int, or float
1732
 
    @param data: The data to set for this property.
1733
 
    @warn:  See object.setProperty().  Changing data
1734
 
    which is of a different type then the property is 
1735
 
    set to (i.e. setting an int value to a float type'
1736
 
    property) will change the type of the property 
1737
 
    automatically.
1738
 
    """
1739
 
 
1740
 
  def getType ():
1741
 
    """
1742
 
    Get the type for this property.
1743
 
    @rtype: string
1744
 
    """
1745
 
 
 
1691
        """
 
1692
        The Property object
 
1693
        ===================
 
1694
                This property gives access to object property data in Blender, used by the game engine.
 
1695
                @ivar name: The property name.
 
1696
                @ivar data: Data for this property. Depends on property type.
 
1697
                @ivar type: The property type.
 
1698
                @warn:  Comparisons between properties will only be true when
 
1699
                both the name and data pairs are the same.
 
1700
        """
 
1701
 
 
1702
        def getName ():
 
1703
                """
 
1704
                Get the name of this property.
 
1705
                @rtype: string
 
1706
                @return: The property name.
 
1707
                """
 
1708
 
 
1709
        def setName (name):
 
1710
                """
 
1711
                Set the name of this property.
 
1712
                @type name: string
 
1713
                @param name: The new name of the property
 
1714
                """
 
1715
 
 
1716
        def getData():
 
1717
                """
 
1718
                Get the data for this property.
 
1719
                @rtype: string, int, or float
 
1720
                """
 
1721
 
 
1722
        def setData(data):
 
1723
                """
 
1724
                Set the data for this property.
 
1725
                @type data: string, int, or float
 
1726
                @param data: The data to set for this property.
 
1727
                @warn:  See object.setProperty().  Changing data
 
1728
                which is of a different type then the property is 
 
1729
                set to (i.e. setting an int value to a float type'
 
1730
                property) will change the type of the property 
 
1731
                automatically.
 
1732
                """
 
1733
 
 
1734
        def getType ():
 
1735
                """
 
1736
                Get the type for this property.
 
1737
                @rtype: string
 
1738
                """
 
1739
 
 
1740
import id_generics
 
1741
Object.__doc__ += id_generics.attributes