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

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/doc/Pose.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:
105
105
"""
106
106
 
107
107
class Pose:
108
 
  """
109
 
  The Pose object
110
 
  ===============
111
 
    This object gives access to Pose-specific data in Blender.
112
 
  @ivar bones: A Dictionary of PosePoseBones (PoseDict) that make up this Pose.
113
 
  @type bones: PoseDict Object
114
 
  """
 
108
        """
 
109
        The Pose object
 
110
        ===============
 
111
                This object gives access to Pose-specific data in Blender.
 
112
        @ivar bones: A Dictionary of PosePoseBones (PoseDict) that make up this Pose.
 
113
        @type bones: PoseDict Object
 
114
        """
115
115
 
116
 
  def update():
117
 
    """
118
 
    Save all changes and update the Pose.
119
 
    @rtype: None
120
 
    """
 
116
        def update():
 
117
                """
 
118
                Save all changes and update the Pose.
 
119
                @rtype: None
 
120
                """
121
121
 
122
122
class PoseBonesDict:
123
 
  """
124
 
  The PoseBonesDict object
125
 
  ========================
126
 
    This object gives dictionary like access to the PoseBones in a Pose. 
127
 
    It is internal to blender but is called as 'Pose.bones'
128
 
  """
129
 
 
130
 
  def items():
131
 
    """
132
 
    Return the key, value pairs in this dictionary
133
 
    @rtype: string, PosePoseBone
134
 
    @return: All strings, and PosePoseBones in the Pose (in that order)
135
 
    """
136
 
 
137
 
  def keys():
138
 
    """
139
 
    Return the keys in this dictionary
140
 
    @rtype: string
141
 
    @return: All strings representing the PosePoseBone names
142
 
    """
143
 
 
144
 
  def values():
145
 
    """
146
 
    Return the values in this dictionary
147
 
    @rtype: BPy_PoseBone
148
 
    @return: All PosePoseBones in this dictionary
149
 
    """
 
123
        """
 
124
        The PoseBonesDict object
 
125
        ========================
 
126
                This object gives dictionary like access to the PoseBones in a Pose. 
 
127
                It is internal to blender but is called as 'Pose.bones'
 
128
        """
 
129
 
 
130
        def items():
 
131
                """
 
132
                Return the key, value pairs in this dictionary
 
133
                @rtype: string, PosePoseBone
 
134
                @return: All strings, and PosePoseBones in the Pose (in that order)
 
135
                """
 
136
 
 
137
        def keys():
 
138
                """
 
139
                Return the keys in this dictionary
 
140
                @rtype: string
 
141
                @return: All strings representing the PosePoseBone names
 
142
                """
 
143
 
 
144
        def values():
 
145
                """
 
146
                Return the values in this dictionary
 
147
                @rtype: BPy_PoseBone
 
148
                @return: All PosePoseBones in this dictionary
 
149
                """
150
150
 
151
151
class PoseBone:
152
 
  """
153
 
  The PoseBone object
154
 
  ===================
155
 
    This object gives access to PoseBone-specific data in Blender. 
156
 
  @ivar name: The name of this PoseBone.
157
 
  @type name: String
158
 
  @ivar loc: The change in location for this PoseBone.
159
 
  @type loc: Vector object
160
 
  @ivar size: The change in size for this PoseBone (no change is 1,1,1)
161
 
  @type size: Vector object
162
 
  @ivar quat: The change in rotation for this PoseBone.
163
 
  @type quat: Quaternion object
164
 
  @ivar head: The final head location for this PoseBone. (not settable)
165
 
  @type head: Vector object
166
 
  @ivar tail: The final tail location for this PoseBone. (not settable)
167
 
  @type tail: Vector object
168
 
  @ivar sel: The selection state of this bone
169
 
  @type sel: Boolean
170
 
  @ivar parent: The parent of this posebone (not settable)
171
 
  @type parent: posebone or None
172
 
  @ivar displayObject: The object to display in place of the bone. (custom bones)
173
 
  @type displayObject: Object or None
174
 
  @ivar localMatrix: The matrix combination of rot/size/loc.
175
 
  @type localMatrix: Matrix object
176
 
  @ivar poseMatrix: The total transformation of this PoseBone including constraints.
177
 
 
178
 
  (not settable).
179
 
 
180
 
  This matrix is in armature space, for the current worldspace location of this pose bone, multiply
181
 
  it with its objects worldspace matrix
182
 
 
183
 
  eg. pose_bone.poseMatrix * object.matrixWorld
184
 
  @type poseMatrix: Matrix object
185
 
  @type constraints: BPy_ConstraintSeq
186
 
  @ivar constraints: a sequence of constraints for the object
187
 
  @type limitmin: A 3-item sequence
188
 
  @ivar limitmin: The x,y,z minimum limits on rotation when part of an IK
189
 
  @type limitmax: A 3-item sequence
190
 
  @ivar limitmax: The x,y,z maximum limits on rotation when part of an IK
191
 
 
192
 
  """
193
 
 
194
 
  def insertKey(parentObject, frameNumber, type):
195
 
    """
196
 
    Insert a pose key for this PoseBone at a frame.
197
 
    @type parentObject: Object object
198
 
    @param parentObject: The object the pose came from.
199
 
    @type frameNumber: integer
200
 
    @param frameNumber: The frame number to insert the pose key on.
201
 
    @type type: Constant object
202
 
    @param type: Can be any combination of 3 Module constants:
203
 
       - Pose.LOC
204
 
       - Pose.ROT (This adds keyframes to the quat ipo, since quaternions are used for pose bone rotation)
205
 
       - Pose.SIZE
206
 
    @rtype: None
207
 
    """
 
152
        """
 
153
        The PoseBone object
 
154
        ===================
 
155
                This object gives access to PoseBone-specific data in Blender. 
 
156
        @ivar name: The name of this PoseBone.
 
157
        @type name: String
 
158
        @ivar loc: The change in location for this PoseBone. this is the equivilent of bone.getLoc() in the old 2.3x python api.
 
159
        @type loc: Vector object
 
160
        @ivar size: The change in size for this PoseBone (no change is 1,1,1)
 
161
        @type size: Vector object
 
162
        @ivar quat: The change in rotation for this PoseBone.
 
163
        @type quat: Quaternion object
 
164
        @ivar head: The final head location for this PoseBone. (not settable)
 
165
        @type head: Vector object
 
166
        @ivar tail: The final tail location for this PoseBone. (not settable)
 
167
        @type tail: Vector object
 
168
        @ivar sel: The selection state of this bone
 
169
        @type sel: Boolean
 
170
        @ivar parent: The parent of this posebone (not settable)
 
171
        @type parent: posebone or None
 
172
        @ivar displayObject: The object to display in place of the bone. (custom bones)
 
173
        @type displayObject: Object or None
 
174
        @ivar localMatrix: The matrix combination of rot/size/loc.
 
175
        @type localMatrix: Matrix object
 
176
        @ivar poseMatrix: The total transformation of this PoseBone including constraints.
 
177
 
 
178
        (not settable).
 
179
 
 
180
        This matrix is in armature space, for the current worldspace location of this pose bone, multiply
 
181
        it with its objects worldspace matrix
 
182
 
 
183
        eg. pose_bone.poseMatrix * object.matrixWorld
 
184
        @type poseMatrix: Matrix object
 
185
        @type constraints: BPy_ConstraintSeq
 
186
        @ivar constraints: a sequence of constraints for the object
 
187
        @type limitmin: 3-item sequence
 
188
        @ivar limitmin: The x,y,z minimum limits on rotation when part of an IK
 
189
        @type limitmax: 3-item sequence
 
190
        @ivar limitmax: The x,y,z maximum limits on rotation when part of an IK
 
191
 
 
192
        @type hasIK: bool
 
193
        @ivar hasIK: True if this pose bone is a part of an IK (readonly), when False, other IK related values have no affect.
 
194
 
 
195
        @type stretch: float
 
196
        @ivar stretch: The amount to stretch to the ik target when part of an IK [0.0 - 1.0]
 
197
 
 
198
        @type stiffX: float
 
199
        @ivar stiffX: The x stiffness when part of an IK [0.0 - 0.990]
 
200
        @type stiffY: float
 
201
        @ivar stiffY: The x stiffness when part of an IK [0.0 - 0.990]
 
202
        @type stiffZ: float
 
203
        @ivar stiffZ: The x stiffness when part of an IK [0.0 - 0.990]
 
204
        
 
205
        @type limitX: bool
 
206
        @ivar limitX: Limit rotation over X axis when part of an IK.
 
207
        @type limitY: bool
 
208
        @ivar limitY: Limit rotation over Y axis when part of an IK.
 
209
        @type limitZ: bool
 
210
        @ivar limitZ: Limit rotation over Z axis when part of an IK.
 
211
        
 
212
        @type lockXRot: bool
 
213
        @ivar lockXRot: Disable X DoF when part of an IK.
 
214
        @type lockYRot: bool
 
215
        @ivar lockYRot: Disable Y DoF when part of an IK.
 
216
        @type lockZRot: bool
 
217
        @ivar lockZRot: Disable Z DoF when part of an IK.
 
218
        
 
219
        """
 
220
 
 
221
        def insertKey(parentObject, frameNumber, type = "[Pose.LOC, Pose.ROT, Pose.SIZE]", fast = False):
 
222
                """
 
223
                Insert a pose key for this PoseBone at a frame.
 
224
                @type parentObject: Object object
 
225
                @param parentObject: The object the pose came from.
 
226
                @type frameNumber: integer
 
227
                @param frameNumber: The frame number to insert the pose key on.
 
228
                @type type: Constant object
 
229
                @param type: Optional argumentm.
 
230
                Can be any combination of 3 Module constants:
 
231
                        - Pose.LOC
 
232
                        - Pose.ROT (This adds keyframes to the quat ipo, since quaternions are used for pose bone rotation)
 
233
                        - Pose.SIZE
 
234
                If this argument is omitted all keys will be added.
 
235
                @type fast: Bool
 
236
                @param fast: If enabled, the IPOs will not be recalculated, speeds up adding many keyframes at once.
 
237
                @rtype: None
 
238
                """
208
239