Package bpy :: Module types :: Class Object
[hide private]
[frames] | no frames]

Class Object


The Object Object

Object datablock defining an object in a scene..

References

Nested Classes [hide private]
  GameObjectSettings
Game engine related settings for the object.
Instance Methods [hide private]
Mesh
create_mesh(apply_modifiers, settings)
Create a Mesh datablock with modifiers applied.
 
create_dupli_list()
Create a list of dupli objects for this object, needs to be freed manually with free_dupli_list.
 
free_dupli_list()
Free the list of dupli objects.
VertexGroup
add_vertex_group(name)
Add vertex group to object.
 
add_vertex_to_group(vertex_index, group, weight, type)
Add vertex to a vertex group.
Object
find_armature()
Find armature influencing this object as a parent or via a modifier.
 
make_display_list()
Update object's display data.
boolean
is_visible()
Determine if object is visible in active scene.
 
animation_data_clear()
Clear animation on this this ID. (Inherited from bpy.types.ID)
AnimData
animation_data_create()
Create animation data to this ID, note that not all ID types support this. (Inherited from bpy.types.ID)
ID
copy()
Create a copy of this datablock (not supported for all datablocks). (Inherited from bpy.types.ID)
Instance Variables [hide private]
Material active_material
Active material being displayed.
int in [0, inf] active_material_index
Index of active material slot.
ParticleSystem (readonly) active_particle_system
Active particle system being displayed
int in [0, inf] active_particle_system_index
Index of active particle system slot.
ShapeKey (readonly) active_shape_key
Current shape key.
int in [-32768, 32767] active_shape_key_index
Current shape key index.
VertexGroup (readonly) active_vertex_group
Vertex groups of the object.
int in [-32768, 32767] active_vertex_group_index
Active index in vertex group array.
AnimData (readonly) animation_data
Animation data for this datablock.
CollisionSettings (readonly) collision
Settings for using the objects as a collider in physics simulation.
float array of 4 items in [-inf, inf] color
Object color and alpha, used when faces have the ObColor mode enabled.
ObjectConstraints Collection of Constraint (readonly) constraints
Constraints of the object.
ID data
Object data.
float array of 3 items in [-inf, inf] delta_location
Extra added translation to object location.
float array of 3 items in [-inf, inf] delta_rotation_euler
Extra added rotation to the rotation of the object (when using Euler rotations).
float array of 4 items in [-inf, inf] delta_rotation_quaternion
Extra added rotation to the rotation of the object (when using Quaternion rotations).
float array of 3 items in [-inf, inf] delta_scale
Extra added scaling to the scale of the object.
float array of 3 items in [-inf, inf] dimensions
Absolute bounding box dimensions of the object.
boolean draw_axis
Displays the object's origin and axis
boolean draw_bounds
Displays the object's bounds.
enum draw_bounds_type
Object boundary display type.
boolean draw_name
Displays the object's name.
boolean draw_texture_space
Displays the object's texture space.
boolean draw_transparent
Enables transparent materials for the object (Mesh only).
boolean draw_wire
Adds the object's wireframe over solid drawing.
boolean dupli_faces_inherit_scale
Scale dupli based on face size.
float in [0.001, 10000] dupli_faces_scale
Scale the DupliFace objects.
int in [-300000, 300000] dupli_frames_end
End frame for DupliFrames.
boolean dupli_frames_no_speed
Set dupliframes to still, regardless of frame.
int in [0, 300000] dupli_frames_off
Recurring frames to exclude from the Dupliframes.
int in [1, 300000] dupli_frames_on
Number of frames to use between DupOff frames.
int in [-300000, 300000] dupli_frames_start
Start frame for DupliFrames.
Group dupli_group
Instance an existing group.
Collection of DupliObject (readonly) dupli_list
Object duplis.
enum dupli_type
If not None, object duplication method to use.
boolean dupli_verts_rotation
Rotate dupli according to vertex normal.
float in [0.01, 10] empty_draw_size
Size of of display for empties in the viewport.
enum empty_draw_type
Viewport display style for empties.
boolean fake_user
Saves this datablock even if it has no users (Inherited from bpy.types.ID)
FieldSettings (readonly) field
Settings for using the objects as a field in physics simulation.
GameObjectSettings (readonly) game
Game engine related settings for the object.
GreasePencil grease_pencil
Grease Pencil datablock
boolean array of 20 items layers
Layers the object is on.
Library (readonly) library
Library file the datablock is linked from. (Inherited from bpy.types.ID)
float array of 3 items in [-inf, inf] location
Location of the object.
boolean array of 3 items lock_location
Lock editing of location in the interface.
boolean array of 3 items lock_rotation
Lock editing of rotation in the interface.
boolean lock_rotation_w
Lock editing of 'angle' component of four-component rotations in the interface.
boolean lock_rotations_4d
Lock editing of four component rotations by components (instead of as Eulers).
boolean array of 3 items lock_scale
Lock editing of scale in the interface.
Collection of MaterialSlot (readonly) materials
Material slots in the object.
float array of 16 items in [-inf, inf] matrix
Transformation matrix.
enum max_draw_type
Maximum draw type to display object with in viewport.
enum (readonly) mode
Object interaction mode.
ObjectModifiers Collection of Modifier (readonly) modifiers
Modifiers affecting the geometric data of the Object.
string name
Unique datablock ID name. (Inherited from bpy.types.ID)
Object parent
Parent Object
string parent_bone
Name of parent bone in case of a bone parenting relation.
enum parent_type
Type of parent relation.
int array of 3 items (readonly) in [0, inf] parent_vertices
Indices of vertices in cases of a vertex parenting relation.
Collection of ParticleSystem (readonly) particle_systems
Particle systems emitted from the object.
int in [0, 32767] pass_index
Index # for the IndexOB render pass.
Pose (readonly) pose
Current pose for armatures.
Action (readonly) pose_library
Action used as a pose library for armatures.
Object (readonly) proxy
Library object this proxy object controls.
Object (readonly) proxy_group
Library group duplicator object this proxy object controls.
boolean restrict_render
Restrict renderability.
boolean restrict_select
Restrict selection in the viewport.
boolean restrict_view
Restrict visibility in the viewport.
float array of 4 items in [-inf, inf] rotation_axis_angle
Angle of Rotation for Axis-Angle rotation representation.
float array of 3 items in [-inf, inf] rotation_euler
Rotation in Eulers.
enum rotation_mode
Rotation Mode in...
float array of 4 items in [-inf, inf] rotation_quaternion
Rotation in Quaternions.
float array of 3 items in [-inf, inf] scale
Scaling of the object.
boolean selected
Object selection state.
boolean shape_key_edit_mode
Apply shape keys in edit mode (for Meshes only).
boolean shape_key_lock
Always show the current Shape for this Object.
boolean slow_parent
Create a delay in the parent relationship.
SoftBodySettings (readonly) soft_body
Settings for soft body simulation.
boolean tag
Tools can use this to tag data, (initial state is undefined). (Inherited from bpy.types.ID)
float in [-300000, 300000] time_offset
Animation offset in frames for IPO's and dupligroup instances.
boolean time_offset_add_parent
Add the parents time offset value
boolean time_offset_edit
Use time offset when inserting keys and display time offset for IPO and action views.
boolean time_offset_parent
Apply the time offset to this objects parent relationship.
boolean time_offset_particle
Let the time offset work on the particle effect.
Object track
Object being tracked to define the rotation (Old Track).
enum track_axis
Tracking axis pointing to the another object.
boolean track_override_parent
Override rotation from parenting.
enum (readonly) type
Type of Object.
enum up_axis
Specify the axis that points up.
int (readonly) in [0, 32767] users
Number of times this datablock is referenced. (Inherited from bpy.types.ID)
Collection of VertexGroup (readonly) vertex_groups
Vertex groups of the object.
boolean x_ray
Makes the object draw in front of others.
Method Details [hide private]

create_mesh(apply_modifiers, settings)

 

Create a Mesh datablock with modifiers applied.

Parameters:
  • apply_modifiers (boolean)
  • settings (enum)
Returns: Mesh
Mesh created from object, remove it if it is only used for export.

add_vertex_group(name)

 

Add vertex group to object.

Parameters:
  • name (string)
Returns: VertexGroup
New vertex group.

add_vertex_to_group(vertex_index, group, weight, type)

 

Add vertex to a vertex group.

Parameters:
  • type (enum)
  • group (VertexGroup)
  • weight (float)
  • vertex_index (int)

find_armature()

 

Find armature influencing this object as a parent or via a modifier.

Returns: Object
Armature object influencing this object or NULL.

is_visible()

 

Determine if object is visible in active scene.

Returns: boolean
Object visibility.

Instance Variable Details [hide private]

draw_bounds_type

Object boundary display type. in...
  • BOX
  • SPHERE
  • CYLINDER
  • CONE
  • POLYHEDER
Type:
enum

dupli_type

If not None, object duplication method to use. in...
  • NONE
  • FRAMES
  • VERTS
  • FACES
  • GROUP
Type:
enum

empty_draw_type

Viewport display style for empties. in...
  • ARROWS
  • SINGLE_ARROW
  • PLAIN_AXES
  • CIRCLE
  • CUBE
  • SPHERE
  • CONE
Type:
enum

max_draw_type

Maximum draw type to display object with in viewport. in...
  • BOUNDS
  • WIRE
  • SOLID
  • TEXTURED
Type:
enum

mode

Object interaction mode. in...
  • OBJECT
  • EDIT
  • SCULPT
  • VERTEX_PAINT
  • WEIGHT_PAINT
  • TEXTURE_PAINT
  • PARTICLE_EDIT
  • POSE
Type:
enum (readonly)

parent_bone

Name of parent bone in case of a bone parenting relation. (maximum length of 32)
Type:
string

parent_type

Type of parent relation. in...
  • OBJECT
  • CURVE
  • KEY
  • ARMATURE
  • LATTICE
  • VERTEX
  • VERTEX_3
  • BONE
Type:
enum

rotation_mode

Rotation Mode in...
  • QUATERNION
  • XYZ
  • XZY
  • YXZ
  • YZX
  • ZXY
  • ZYX
  • AXIS_ANGLE
Type:
enum

track_axis

Tracking axis pointing to the another object. in...
  • POSX
  • POSY
  • POSZ
  • NEGX
  • NEGY
  • NEGZ
Type:
enum

type

Type of Object. in...
  • EMPTY
  • MESH
  • CURVE
  • SURFACE
  • TEXT
  • META
  • LAMP
  • CAMERA
  • WAVE
  • LATTICE
  • ARMATURE
Type:
enum (readonly)

up_axis

Specify the axis that points up. in...
  • X
  • Y
  • Z
Type:
enum