Home | Trees | Index | Help |
|
---|
Module Object :: Class Object |
|
This object gives access to generic data from all objects in Blender.
Note: When dealing with properties and functions such as LocX/RotY/getLocation(), getSize() and getEuler() Keep in mind that these transformation properties are relative to the objects parent (if any).
To get these values in worldspace (taking into acount vertex parents, constraints etc) pass the argument 'worldspace' to these functions.Method Summary | |
---|---|
Add or create a property for an object. | |
Add a new script link to this Object. | |
Recomputes the particle system. | |
Unlinks the ipo from this object. | |
Delete script links from this Object. | |
Make this Object not track another anymore. | |
Clears parent object. | |
Copies all properties from one object to another. | |
Evaluates the Pose based on its currently bound action at a certain frame. | |
Py_Action |
Returns an action if one is associated with this object (only useful for armature types). |
PyList |
Return a list of properties from this object. |
list of 8 (x,y,z) float coordinate vectors (WRAPPED DATA) |
Returns the worldspace bounding box of this object. |
specific Object type or string |
Returns the Datablock object (Mesh, Lamp, Camera, etc.) linked to this Object. |
A vector triple |
Returns the object's delta location in a list (x, y, z) |
Integer |
Returns the object draw mode. |
Integer |
Returns the object draw type |
Py_Euler |
Return a python Euler. |
Py_Matrix |
Returns the object's inverse matrix. |
Ipo |
Returns the Ipo associated to this object or None if there's no linked ipo. |
Return (x, y, z) | |
list of Material Objects |
Returns a list of materials assigned to the object. |
Py_Matrix (WRAPPED DATA) |
Returns the object matrix. |
Returns the name of the object | |
Object |
Returns the object's parent object. |
String |
Returns the object's parent object's sub name, or None. |
int |
Get the Object's Particle Interaction Deflection Setting. |
float |
Get the Object's Particle Interaction falloff. |
float |
Get the Object's Particle Interaction MaxDist. |
float |
Get the Object's Particle Interaction Permeability. |
float |
Get the Object's Particle Interaction RandomDamp. |
float |
Get the Object's Particle Interaction Strength. |
float |
Get the Object's Particle Interaction SurfaceDamp. |
int |
Get the Object's Particle Interaction Type. |
int |
Get the Object's Particle Interaction if using MaxDist. |
Pose object |
Gets the current Pose of the object. |
Property object |
Return a properties from this object based on name. |
float |
Get the Object's SB DefaultGoal. |
float |
Get the Object's SB ErrorLimit. |
float |
Get the Object's SB Friction. |
float |
Get the Object's SB GoalFriction. |
float |
Get the Object's SB GoalSpring. |
float |
Get the Object's SB Gravity. |
float |
Get the Object's SB InnerSpring. |
float |
Get the Object's SB InnerSpringFriction. |
float |
Get the Object's SB Mass. |
float |
Get the Object's SB MaxGoal. |
float |
Get the Object's SB MinGoal. |
int |
get SoftBodies PostDef option |
int |
get SoftBodies StiffQuads option |
int |
get SoftBodies UseEdges option |
int |
get SoftBodies UseGoal option |
list |
Get a list with this Object's script links of type 'event'. |
Return (SizeX, SizeY, SizeZ) | |
Returns the time offset of the object's animation. | |
Object |
Returns the object's tracked object. |
Returns the type of the object in 'Armature', 'Camera', 'Curve', 'Lamp', 'Lattice', 'MBall', 'Mesh', 'Surf', 'Empty', 'Wave' (deprecated) or 'unknown' in exceptional cases. | |
Inserts keytype values in object ipo at curframe. | |
Insert a Shape Key in the current object. | |
int |
Get if the Object's SB is Enabled. |
Boolean |
Returns the objects selection state in the current scene as a boolean value True or False. |
Uses the object as a base for all of the objects in the provided list to join into. | |
Links Object with ObData datablock provided in the argument. | |
Updates this object's display list. | |
Makes the object the parent of the objects provided in the argument which must be a list of valid Objects. | |
Makes the object the deformation parent of the objects provided in the argument which must be a list of valid Objects. | |
Makes the object the vertex parent of the objects provided in the argument which must be a list of valid Objects. | |
Make this Object track another. | |
Removes all properties from an object. | |
Remove a property from an object. | |
Sets the object's selection state in the current scene. | |
Sets the object's delta location which must be a vector triple. | |
Sets the object's drawing mode. | |
Sets the object's drawing type. | |
Sets the object's localspace rotation according to the specified Euler angles. | |
Links an ipo to this object. | |
Sets the object's location relative to the parent object (if any). | |
Sets the materials. | |
Sets the object's matrix and updates its transformation. | |
Sets the name of the object. | |
PyNone |
Set the the Object's Particle Interaction Deflection Setting. |
PyNone |
Set the the Object's Particle Interaction falloff. |
PyNone |
Set the the Object's Particle Interaction MaxDist. |
PyNone |
Set the the Object's Particle Interaction Permeability. |
PyNone |
Set the the Object's Particle Interaction RandomDamp. |
PyNone |
Set the the Object's Particle Interaction Strength. |
PyNone |
Set the the Object's Particle Interaction SurfaceDamp. |
PyNone |
Set the the Object's Particle Interaction type. |
PyNone |
Set the the Object's Particle Interaction MaxDist. |
PyNone |
Set the the Object's SB DefaultGoal. |
PyNone |
Set the the Object's SB ErrorLimit. |
PyNone |
Set the the Object's SB Friction. |
PyNone |
Set the the Object's SB GoalFriction. |
PyNone |
Set the the Object's SB GoalSpring. |
PyNone |
Set the the Object's SB Gravity. |
PyNone |
Set the the Object's SB InnerSpring. |
PyNone |
Set the the Object's SB InnerSpringFriction. |
PyNone |
Set the the Object's SB Mass. |
PyNone |
Set the the Object's SB MaxGoal. |
PyNone |
Set the the Object's SB MinGoal. |
PyNone |
Enable / Disable SoftBodies PostDef option 1: on 0: off |
PyNone |
Enable / Disable SoftBodies StiffQuads option 1: on 0: off |
PyNone |
Enable / Disable SoftBodies UseEdges option 1: on 0: off |
PyNone |
Enable / Disable SoftBodies UseGoal option 1: on 0: off |
Sets the object's size, relative to the parent object (if any), clamped | |
Sets the time offset of the object's animation. | |
Link data of object specified in the argument with self. |
Instance Variable Summary | |
---|---|
BPy_ActionStrips | actionStrips : a sequence of action
strips for the object. |
colbits : The Material usage mask. | |
BPy_Constraints | constraints : a sequence of constraints for the object. |
data : The data of the object. | |
dloc : The delta (X,Y,Z) location coordinates of the object (vector). | |
dLocX : The delta X location coordinate of the object. | |
dLocY : The delta Y location coordinate of the object. | |
dLocZ : The delta Z location coordinate of the object. | |
drawMode : The object's drawing mode used. | |
float | drawSize : The drawsize for empty objects. |
drawType : The object's drawing type used. | |
drot : The delta (X,Y,Z) rotation angles (in radians) of the object
(vector). | |
dRotX : The delta X rotation angle (in radians) of the object. | |
dRotY : The delta Y rotation angle (in radians) of the object. | |
dRotZ : The delta Z rotation angle (in radians) of the object. | |
dsize : The delta (X,Y,Z) size of the object. | |
dSizeX : The delta X size of the object. | |
dSizeY : The delta Y size of the object. | |
dSizeZ : The delta Z size of the object. | |
int | DupEnd : The DupliFrame end frame. |
Group or None | DupGroup : The DupliGroup Animation Property. |
list of tuples containing (object, matrix) | DupObjects : The Dupli object instances. |
int | DupOff : The DupliFrame removal of every Nth frame for this object. |
int | DupOn : The DupliFrames in sucsession between DupOff frames. |
int | DupSta : The DupliFrame starting frame. |
effects : The list of particle effects associated with the object. | |
bool (True/False) | enableDupFrames : The DupliFrames status of the object. |
bool (True/False) Set True to make this object an instance of the objects DupGroup. | enableDupGroup : The DupliGroup status of the object. |
bool (True/False) | enableDupNoSpeed : The DupliNoSpeed status of the object. |
bool (True/False) | enableDupRot : The DupliRot status of the object. |
bool (True/False) | enableDupVerts : The DupliVerts status of the object. |
ipo : The ipo data associated with the object. | |
integer (bitmask) | Layers : The object layers (also check the newer attribute layers ). |
list of integers | layers : The layers this object is visible in (also check the older attribute
Layers ). |
loc : The (X,Y,Z) location coordinates of the object (vector). | |
LocX : The X location coordinate of the object. | |
LocY : The Y location coordinate of the object. | |
LocZ : The Z location coordinate of the object. | |
mat : alias for matrix : the matrix of the object in world
space. | |
matrix : The matrix of the object in world space, same as matrixWorld . | |
matrixLocal : The matrix of the object relative to its parent (or matrixWorld if there is no parent). | |
matrixWorld : The matrix of the object in world space. | |
BPy_Modifiers | modifiers : a sequence of modifiers for the object. |
name : The name of the object, 21 chars max. | |
parent : The parent object of the object. | |
parentbonename : The string name of the parent bone. | |
int | protectFlags : The "transform locking" bitfield flags for the object. |
int | rbFlags : Rigid body flags. |
float | rbMass : Rigid body mass. |
int | rbShapeBoundType : Rigid body shape bound type. |
rot : The (X,Y,Z) rotation angles (in radians) of the object (vector). | |
RotX : The X rotation angle (in radians) of the object. | |
RotY : The Y rotation angle (in radians) of the object. | |
RotZ : The Z rotation angle (in radians) of the object. | |
sel : The selection state of the object in the current scene, 1 is selected,
0 is unselected. | |
size : The (X,Y,Z) size of the object (vector). | |
SizeX : The X size of the object. | |
SizeY : The Y size of the object. | |
SizeZ : The Z size of the object. | |
track : The object tracking this object. | |
int | users : The number of users of the object. |
Method Details |
---|
addProperty(name_or_property, data, type)Add or create a property for an object. If called with only a property object, the property is assigned to the object. If called with a property name string and data object, a new property is created and added to the object.
|
addScriptLink(text, event)Add a new script link to this Object.
|
buildParts()Recomputes the particle system. This method only applies to an Object of the type Effect. |
clearIpo()Unlinks the ipo from this object.
|
clearScriptLinks(links=None)Delete script links from this Object. If no list is specified, all script links are deleted.
|
clearTrack(mode=0, fast=0)Make this Object not track another anymore.
|
clrParent(mode=0, fast=0)Clears parent object.
|
copyAllPropertiesTo(object)Copies all properties from one object to another.
|
evaluatePose(framenumber)Evaluates the Pose based on its currently bound action at a certain frame.
|
getAction()Returns an action if one is associated with this object (only useful for armature types).
|
getAllProperties()Return a list of properties from this object.
|
getBoundBox()Returns the worldspace bounding box of this object. This works for meshes (out of edit mode) and curves.
|
getData(name_only=False, mesh=False)Returns the Datablock object (Mesh, Lamp, Camera, etc.) linked to this Object. If the keyword parameter 'name_only' is True, only the Datablock name is returned as a string. It the object is of type Mesh, then the 'mesh' keyword can also be used; if True the data return is a Mesh object, otherwise it is an NMesh object (the default). Using the mesh keyword is ignored for non mesh objects.
|
getDeltaLocation()Returns the object's delta location in a list (x, y, z)
|
getDrawMode()Returns the object draw mode.
|
getDrawType()Returns the object draw type
|
getEuler(space)
|
getInverseMatrix()Returns the object's inverse matrix.
|
getIpo()Returns the Ipo associated to this object or None if there's no linked ipo.
|
getLocation(space)
|
getMaterials(what=0)Returns a list of materials assigned to the object.
|
getMatrix(space='worldspace')Returns the object matrix.
|
getName()Returns the name of the object
|
getParent()Returns the object's parent object.
|
getParentBoneName()Returns the object's parent object's sub name, or None. For objects parented to bones, this is the name of the bone.
|
getPIDeflection()Get the Object's Particle Interaction Deflection Setting.
|
getPIFalloff()Get the Object's Particle Interaction falloff.
|
getPIMaxDist()Get the Object's Particle Interaction MaxDist.
|
getPIPermf()Get the Object's Particle Interaction Permeability.
|
getPIRandomDamp()Get the Object's Particle Interaction RandomDamp.
|
getPIStregth()Get the Object's Particle Interaction Strength.
|
getPISurfaceDamp()Get the Object's Particle Interaction SurfaceDamp.
|
getPIType()Get the Object's Particle Interaction Type.
|
getPIUseMaxDist()Get the Object's Particle Interaction if using MaxDist.
|
getPose()Gets the current Pose of the object.
|
getProperty(name)Return a properties from this object based on name.
|
getSBDefaultGoal()Get the Object's SB DefaultGoal.
|
getSBErrorLimit()Get the Object's SB ErrorLimit.
|
getSBFriction()Get the Object's SB Friction.
|
getSBGoalFriction()Get the Object's SB GoalFriction.
|
getSBGoalSpring()Get the Object's SB GoalSpring.
|
getSBGravity()Get the Object's SB Gravity.
|
getSBInnerSpring()Get the Object's SB InnerSpring.
|
getSBInnerSpringFriction()Get the Object's SB InnerSpringFriction.
|
getSBMass()Get the Object's SB Mass.
|
getSBMaxGoal()Get the Object's SB MaxGoal.
|
getSBMinGoal()Get the Object's SB MinGoal.
|
getSBPostDef()get SoftBodies PostDef option
|
getSBStiffQuads()get SoftBodies StiffQuads option
|
getSBUseEdges()get SoftBodies UseEdges option
|
getSBUseGoal()get SoftBodies UseGoal option
|
getScriptLinks(event)Get a list with this Object's script links of type 'event'.
|
getSize(space)
|
getTimeOffset()Returns the time offset of the object's animation.
|
getTracked()Returns the object's tracked object.
|
getType()Returns the type of the object in 'Armature', 'Camera', 'Curve', 'Lamp', 'Lattice', 'MBall', 'Mesh', 'Surf', 'Empty', 'Wave' (deprecated) or 'unknown' in exceptional cases.
|
insertIpoKey(keytype)Inserts keytype values in object ipo at curframe. Uses module constants.
|
insertShapeKey()Insert a Shape Key in the current object. It applies to Objects of the type Mesh, Lattice, or Curve. |
isSB()Get if the Object's SB is Enabled.
|
isSelected()Returns the objects selection state in the current scene as a boolean value True or False.
|
join(objects)Uses the object as a base for all of the objects in the provided list to join into.
|
link(datablock)Links Object with ObData datablock provided in the argument. The data must match the Object's type, so you cannot link a Lamp to a Mesh type object.
|
makeDisplayList()Updates this object's display list. Blender uses display lists to store already transformed data (like a mesh with its vertices already modified by coordinate transformations and armature deformation). If the object isn't modified, there's no need to recalculate this data. This method is here for the *few cases* where a script may need it, like when toggling the "SubSurf" mode for a mesh: Example:import Blender scene= Blender.Scene.GetCurrent() object= scene.getActiveObject() object.modifiers.append(Blender.Modifier.Type.SUBSURF) object.makeDisplayList() Blender.Window.RedrawAll()If you try this example without the line to update the display list, the object will disappear from the screen until you press "SubSurf".
|
makeParent(objects, noninverse=0, fast=0)Makes the object the parent of the objects provided in the argument which must be a list of valid Objects.
|
makeParentDeform(objects, noninverse=0, fast=0)Makes the object the deformation parent of the objects provided in the argument which must be a list of valid Objects. The parent object must be a Curve or Armature.
|
makeParentVertex(objects, indices, noninverse=0, fast=0)Makes the object the vertex parent of the objects provided in the argument which must be a list of valid Objects. The parent object must be a Mesh, Curve or Surface.
|
makeTrack(tracked, fast=0)Make this Object track another.
|
removeAllProperties()Removes all properties from an object. |
removeProperty(property)Remove a property from an object.
|
select(boolean)Sets the object's selection state in the current scene. setting the selection will make this object the active object of this scene.
|
setDeltaLocation(delta_location)Sets the object's delta location which must be a vector triple.
|
setDrawMode(drawmode)Sets the object's drawing mode. The drawing mode can be a mix of modes. To enable these, add up the values.
|
setDrawType(drawtype)Sets the object's drawing type.
|
setEuler(euler)Sets the object's localspace rotation according to the specified Euler angles.
|
setIpo(ipo)Links an ipo to this object.
|
setLocation(x, y, z)Sets the object's location relative to the parent object (if any).
|
setMaterials(materials)Sets the materials. The argument must be a list 16 items or less. Each list element is either a Material or None. Also seecolbits .
|
setMatrix(matrix)Sets the object's matrix and updates its transformation.
|
setName(name)Sets the name of the object. A string longer then 20 characters will be shortened.
|
setPIDeflection(status)Set the the Object's Particle Interaction Deflection Setting. 0 = Off, 1 = on
|
setPIFalloff(falloff)Set the the Object's Particle Interaction falloff. Values between 0 to 10.0
|
setPIMaxDist(MaxDist)Set the the Object's Particle Interaction MaxDist. Values between 0 to 1000.0
|
setPIPerm(perm)Set the the Object's Particle Interaction Permeability. Values between 0 to 10.0
|
setPIRandomDamp(damp)Set the the Object's Particle Interaction RandomDamp. Values between 0 to 10.0
|
setPIStrength(strength)Set the the Object's Particle Interaction Strength. Values between -1000.0 to 1000.0
|
setPISurfaceDamp(damp)Set the the Object's Particle Interaction SurfaceDamp. Values between 0 to 10.0
|
setPIType(type)Set the the Object's Particle Interaction type. Use Module Constants
|
setPIUseMaxDist(status)Set the the Object's Particle Interaction MaxDist. 0 = Off, 1 = on
|
setSBDefaultGoal(goal)Set the the Object's SB DefaultGoal. Values between 0 to 1.0
|
setSBErrorLimit(err)Set the the Object's SB ErrorLimit. Values between 0 to 1.0
|
setSBFriction(frict)Set the the Object's SB Friction. Values between 0 to 10.0
|
setSBGoalFriction(gf)Set the the Object's SB GoalFriction. Values between 0 to 10.0
|
setSBGoalSpring(gs)Set the the Object's SB GoalSpring. Values between 0 to 0.999
|
setSBGravity(grav)Set the the Object's SB Gravity. Values between 0 to 10.0
|
setSBInnerSpring(sprr)Set the the Object's SB InnerSpring. Values between 0 to 0.999
|
setSBInnerSpringFriction(sprf)Set the the Object's SB InnerSpringFriction. Values between 0 to 10.0
|
setSBMass(mass)Set the the Object's SB Mass. Values between 0 to 50.0
|
setSBMaxGoal(mg)Set the the Object's SB MaxGoal. Values between 0 to 1.0
|
setSBMinGoal(mg)Set the the Object's SB MinGoal. Values between 0 to 1.0
|
setSBPostDef(switch)Enable / Disable SoftBodies PostDef option 1: on 0: off
|
setSBStiffQuads(switch)Enable / Disable SoftBodies StiffQuads option 1: on 0: off
|
setSBUseEdges(switch)Enable / Disable SoftBodies UseEdges option 1: on 0: off
|
setSBUseGoal(switch)Enable / Disable SoftBodies UseGoal option 1: on 0: off
|
setSize(x, y, z)Sets the object's size, relative to the parent object (if any), clamped
|
setTimeOffset(timeOffset)Sets the time offset of the object's animation.
|
shareFrom(object)Link data of object specified in the argument with self. This works only if self and the object specified are of the same type.
|
Instance Variable Details |
---|
actionStripsasequence of action
strips for the object.
|
constraintsasequence of constraints for the object.
|
dataThe data of the object. (Read-only) |
dlocThe delta (X,Y,Z) location coordinates of the object (vector). This variable applies to IPO Objects only. |
dLocXThe delta X location coordinate of the object. This variable applies to IPO Objects only. |
dLocYThe delta Y location coordinate of the object. This variable applies to IPO Objects only. |
dLocZThe delta Z location coordinate of the object. This variable applies to IPO Objects only. |
drawModeThe object's drawing mode used. The value can be a sum of: 2 - axis, 4 - texspace, 8 - drawname, 16 - drawimage, 32 - drawwire, 64 - xray. |
drawSizeThe drawsize for empty objects. 1.0. is default.
|
drawTypeThe object's drawing type used. 1 - Bounding box, 2 - wire, 3 - Solid, 4- Shaded, 5 - Textured. |
drotThe delta (X,Y,Z) rotation angles (in radians) of the object (vector). This variable applies to IPO Objects only. |
dRotXThe delta X rotation angle (in radians) of the object. This variable applies to IPO Objects only. |
dRotYThe delta Y rotation angle (in radians) of the object. This variable applies to IPO Objects only. |
dRotZThe delta Z rotation angle (in radians) of the object. This variable applies to IPO Objects only. |
dsizeThe delta (X,Y,Z) size of the object. |
dSizeXThe delta X size of the object. |
dSizeYThe delta Y size of the object. |
dSizeZThe delta Z size of the object. |
DupEndThe DupliFrame end frame. (Use withenableDupFrames )
|
DupGroupThe DupliGroup Animation Property. Assign a group to DupGroup to make this object an instance of that group. This does not enable or disable the dupliGroup option, for that use getDupliGroup and setDupliGroup. The dupliGroup is None when this object does not have a dupliGroup. (Use withenableDupGroup )
|
DupOffThe DupliFrame removal of every Nth frame for this object. (Use withenableDupFrames )
|
DupOnThe DupliFrames in sucsession between DupOff frames. (Use withenableDupFrames and DupOff > 0)
|
DupStaThe DupliFrame starting frame. (Use withenableDupFrames )
|
effectsThe list of particle effects associated with the object. (Read-only) |
enableDupGroupThe DupliGroup status of the object. True/False - Set DupGroup to a group for this to take effect, Use DupObjects to get the object data from this instance. (Use withDupObjects )
|
enableDupNoSpeedThe DupliNoSpeed status of the object. True/False - Use with enableDupFrames to ignore dupliFrame speed. (Use withenableDupFrames )
|
enableDupRotThe DupliRot status of the object. True/False - Use with enableDupVerts to rotate each instance by the vertex normal. (Use withenableDupVerts )
|
ipoThe ipo data associated with the object. (Read-only) |
LayersThe object layers (also check the newer attributelayers ). This value is a bitmask with at
least one position set for the 20 possible layers starting from the low
order bit. The easiest way to deal with these values in in hexadecimal
notation. Example:
ob.Layer = 0x04 # sets layer 3 ( bit pattern 0100 )After setting the Layer value, call Blender.Redraw( -1 ) to update the interface.
|
layersThe layers this object is visible in (also check the older attributeLayers ). This returns a list of integers in
the range [1, 20], each number representing the respective layer. Setting
is done by passing a list of ints or an empty list for no layers.
Example:
ob.layers = [] # object won't be visible ob.layers = [1, 4] # object visible only in layers 1 and 4 ls = o.layers ls.append([10]) o.layers = ls print ob.layers # will print: [1, 4, 10]Note: changes will only be visible after the screen (at least the 3d View and Buttons windows) is redrawn.
|
locThe (X,Y,Z) location coordinates of the object (vector). |
LocXThe X location coordinate of the object. |
LocYThe Y location coordinate of the object. |
LocZThe Z location coordinate of the object. |
matalias formatrix : the matrix of the object in world
space. (Read-only)
|
matrixThe matrix of the object in world space, same asmatrixWorld . (Read-only)
|
matrixLocalThe matrix of the object relative to its parent (ormatrixWorld if there is no parent).
(Read-only)
|
matrixWorldThe matrix of the object in world space. (Read-only) |
modifiersasequence of modifiers for the object.
|
nameThe name of the object, 21 chars max. |
parentThe parent object of the object. (Read-only) |
parentbonenameThe string name of the parent bone. |
rbFlagsRigid body flags.
|
rbMassRigid body mass. Must be a positive value.
|
rbShapeBoundTypeRigid body shape bound type.
|
rotThe (X,Y,Z) rotation angles (in radians) of the object (vector). |
RotXThe X rotation angle (in radians) of the object. |
RotYThe Y rotation angle (in radians) of the object. |
RotZThe Z rotation angle (in radians) of the object. |
selThe selection state of the object in the current scene, 1 is selected, 0 is unselected. (Selecting makes the object active) |
sizeThe (X,Y,Z) size of the object (vector). |
SizeXThe X size of the object. |
SizeYThe Y size of the object. |
SizeZThe Z size of the object. |
trackThe object tracking this object. (Read-only) |
usersThe number of users of the object. (Read-only)
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Jul 13 16:50:05 2006 | http://epydoc.sf.net |