Package bpy :: Package ops :: Module object
[hide private]
[frames] | no frames]

Module object

Functions [hide private]
 
add(type='EMPTY', view_align=False, enter_editmode=False)
Add an object to the scene.
 
armature_add(view_align=False, enter_editmode=False)
Add an armature object to the scene.
 
constraint_add(type='')
Add a constraint to the active object.
 
constraint_add_with_targets(type='')
Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones.
 
constraints_clear()
Clear all the constraints for the active Object only.
 
convert(target='MESH', keep_original=False)
Convert selected objects to another type.
 
curve_add(type='BEZIER_CURVE', view_align=False, enter_editmode=False)
Add a curve object to the scene.
 
delete()
Delete selected objects.
 
duplicate(linked=False, mode=1)
Duplicate selected objects.
 
duplicate_move()
(undocumented operator)
 
duplicate_move_linked()
(undocumented operator)
 
duplicates_make_real()
Make dupli objects attached to this object real.
 
editmode_toggle()
Toggle object's editmode.
 
effector_add(type='FORCE', view_align=False, enter_editmode=False)
Add an empty object with a physics effector to the scene.
 
explode_refresh()
Refresh data in the Explode modifier.
 
game_property_new()
(undocumented operator)
 
game_property_remove(index=0)
(undocumented operator)
 
group_add(group='ADD_NEW')
(undocumented operator)
 
group_instance_add(type='', view_align=False)
Add a dupligroup instance.
 
group_remove()
(undocumented operator)
 
hook_add_newob()
Hook selected vertices to the first selected Object.
 
hook_add_selob()
Hook selected vertices to the first selected Object.
 
hook_assign(modifier='')
Assign the selected vertices to a hook.
 
hook_recenter(modifier='')
Set hook center to cursor position.
 
hook_remove(modifier='')
Remove a hook from the active object.
 
hook_reset(modifier='')
Recalculate and and clear offset transformation.
 
hook_select(modifier='')
Selects effected vertices on mesh.
 
join()
Join selected objects into active object.
 
join_shapes()
Merge selected objects to shapes of active object.
 
lamp_add(type='POINT', view_align=False)
Add a lamp object to the scene.
 
location_apply()
Apply the object's location to its data.
 
location_clear()
Clear the object's location.
 
make_links_data(type='OBDATA')
Make links from the active object to other selected objects.
 
make_links_scene(type='Scene')
Make linked data local to each object.
 
make_local(type='SELECTED_OBJECTS')
Make library linked datablocks local to this file.
 
make_single_user(type='ALL', object=False, obdata=False, material=False, texture=False, animation=False)
Make linked data local to each object.
 
material_slot_add()
Add a new material slot or duplicate the selected one.
 
material_slot_assign()
Assign the material in the selected material slot to the selected vertices.
 
material_slot_copy()
Copies materials to other selected objects.
 
material_slot_deselect()
Deselect vertices assigned to the selected material slot.
 
material_slot_remove()
Remove the selected material slot.
 
material_slot_select()
Select vertices assigned to the selected material slot.
 
meshdeform_bind()
Bind mesh to cage in mesh deform modifier.
 
metaball_add(type='MBALL_BALL', view_align=False, enter_editmode=False)
Add an metaball object to the scene.
 
mode_set(mode='', toggle=False)
Sets the object interaction mode.
 
modifier_add(type='SUBSURF')
Add a modifier to the active object.
 
modifier_apply(apply_as='DATA')
Apply modifier and remove from the stack.
 
modifier_convert()
Convert particles to a mesh object.
 
modifier_copy()
Duplicate modifier at the same position in the stack.
 
modifier_move_down()
Move modifier down in the stack.
 
modifier_move_up()
Move modifier up in the stack.
 
modifier_remove()
Remove a modifier from the active object.
 
move_to_layer(layer=(False, False, False, False, False, False, False, False, False...)
Move the object to different layers.
 
multires_higher_levels_delete()
(undocumented operator)
 
multires_subdivide()
Add a new level of subdivision.
 
origin_clear()
Clear the object's origin.
 
origin_set(type='GEOMETRY_ORIGIN')
Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor
 
parent_clear(type='CLEAR')
Clear the object's parenting.
 
parent_no_inverse_set()
Set the object's parenting without setting the inverse parent correction.
 
parent_set(type='OBJECT')
Set the object's parenting.
 
particle_system_add()
Add a particle system.
 
particle_system_remove()
Remove the selected particle system.
 
posemode_toggle()
Enables or disables posing/selecting bones
 
proxy_make(object='', group_object='')
Add empty object to become local replacement data of a library-linked object
 
restrictview_clear()
Reveal the object by setting the restrictview flag.
 
restrictview_set(unselected=False)
Hide the object by setting the restrictview flag.
 
retopology()
TODO - doc
 
rigify()
TODO - doc
 
rigify_graph()
TODO - doc
 
rigify_rig2py()
TODO - doc
 
rigify_test()
TODO - doc
 
rotation_apply()
Apply the object's rotation to its data.
 
rotation_clear()
Clear the object's rotation.
 
scale_apply()
Apply the object's scale to its data.
 
scale_clear()
Clear the object's scale.
 
select_all(action='TOGGLE')
Change selection of all visible objects in scene.
 
select_by_layer(extend=False, layer=1)
Select all visible objects on a layer.
 
select_by_type(extend=False, type='MESH')
Select all visible objects that are of a type.
 
select_grouped(extend=False, type='CHILDREN_RECURSIVE')
Select all visible objects grouped by various properties.
 
select_inverse()
Invert selection of all visible objects.
 
select_linked(extend=False, type='OBDATA')
Select all visible objects that are linked.
 
select_mirror(extend=False)
Select the Mirror objects of the selected object eg.
 
select_name(name='', extend=False)
Select an object with this name
 
select_pattern(pattern='*', case_sensitive=False, extend=True)
Select object matching a naming pattern.
 
select_random(extend=False, percent=0.5)
Set select on random visible objects.
 
shade_flat()
(undocumented operator)
 
shade_smooth()
(undocumented operator)
 
shape_key_add()
(undocumented operator)
 
shape_key_clear()
Clear weights for all shape keys.
 
shape_key_mirror()
(undocumented operator)
 
shape_key_move(type='UP')
(undocumented operator)
 
shape_key_remove()
(undocumented operator)
 
slow_parent_clear()
Clear the object's slow parent.
 
slow_parent_set()
Set the object's slow parent.
 
subsurf_set(level=1)
Sets a Subdivision Surface Level (1-5)
 
surface_add(type='NURBS_CURVE', view_align=False, enter_editmode=False)
Add a surface object to the scene.
 
text_add(view_align=False, enter_editmode=False)
Add a text object to the scene
 
track_clear(type='CLEAR')
Clear tracking constraint or flag from object.
 
track_set(type='TRACKTO')
Make the object track another object, either by constraint or old way or locked track.
 
vertex_group_add()
(undocumented operator)
 
vertex_group_assign(new=False)
(undocumented operator)
 
vertex_group_blend()
 
vertex_group_clean(limit=0.01, all_groups=False, keep_single=False)
Remove Vertex Group assignments which aren't required.
 
vertex_group_copy()
(undocumented operator)
 
vertex_group_copy_to_linked()
Copy Vertex Groups to all users of the same Geometry data.
 
vertex_group_deselect()
(undocumented operator)
 
vertex_group_invert(auto_assign=True, auto_remove=True)
(undocumented operator)
 
vertex_group_levels(offset=0.0, gain=1.0)
(undocumented operator)
 
vertex_group_normalize()
(undocumented operator)
 
vertex_group_normalize_all(lock_active=True)
(undocumented operator)
 
vertex_group_remove(all=False)
(undocumented operator)
 
vertex_group_remove_from(all=False)
(undocumented operator)
 
vertex_group_select()
(undocumented operator)
 
vertex_group_set_active(group='')
Set the active vertex group.
 
vertex_parent_set()
Parent selected objects to the selected vertices.
 
visual_transform_apply()
Apply the object's visual transformation to its data.
Function Details [hide private]

add(type='EMPTY', view_align=False, enter_editmode=False)

 

Add an object to the scene.

Parameters:
  • type (enum) - in (MESH, CURVE, SURFACE, META, TEXT, ARMATURE, LATTICE, EMPTY, CAMERA, LAMP)
  • view_align (boolean)
  • enter_editmode (boolean)

armature_add(view_align=False, enter_editmode=False)

 

Add an armature object to the scene.

Parameters:
  • view_align (boolean)
  • enter_editmode (boolean)

constraint_add(type='')

 

Add a constraint to the active object.

Parameters:
  • type (enum) - in (COPY_LOCATION, COPY_ROTATION, COPY_SCALE, LIMIT_DISTANCE, LIMIT_LOCATION, LIMIT_ROTATION, LIMIT_SCALE, TRANSFORM, CLAMP_TO, DAMPED_TRACK, IK, LOCKED_TRACK, SPLINE_IK, STRETCH_TO, TRACK_TO, ACTION, CHILD_OF, FLOOR, FOLLOW_PATH, RIGID_BODY_JOINT, SCRIPT, SHRINKWRAP)

constraint_add_with_targets(type='')

 

Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones.

Parameters:
  • type (enum) - in (COPY_LOCATION, COPY_ROTATION, COPY_SCALE, LIMIT_DISTANCE, LIMIT_LOCATION, LIMIT_ROTATION, LIMIT_SCALE, TRANSFORM, CLAMP_TO, DAMPED_TRACK, IK, LOCKED_TRACK, SPLINE_IK, STRETCH_TO, TRACK_TO, ACTION, CHILD_OF, FLOOR, FOLLOW_PATH, RIGID_BODY_JOINT, SCRIPT, SHRINKWRAP)

convert(target='MESH', keep_original=False)

 

Convert selected objects to another type.

Parameters:
  • target (enum) - Type of object to convert to. in (CURVE, MESH)
  • keep_original (boolean)

curve_add(type='BEZIER_CURVE', view_align=False, enter_editmode=False)

 

Add a curve object to the scene.

Parameters:
  • type (enum) - in (BEZIER_CURVE, BEZIER_CIRCLE, NURBS_CURVE, NURBS_CIRCLE, PATH)
  • view_align (boolean)
  • enter_editmode (boolean)

duplicate(linked=False, mode=1)

 

Duplicate selected objects.

Parameters:
  • mode (int) - in (0, inf)
  • linked (boolean)

effector_add(type='FORCE', view_align=False, enter_editmode=False)

 

Add an empty object with a physics effector to the scene.

Parameters:
  • type (enum) - in (FORCE, WIND, VORTEX, MAGNET, HARMONIC, CHARGE, LENNARDJ, TEXTURE, GUIDE, BOID, TURBULENCE, DRAG)
  • view_align (boolean)
  • enter_editmode (boolean)

game_property_remove(index=0)

 

(undocumented operator)

Parameters:
  • index (int) - Property index to remove in (0, inf)

group_add(group='ADD_NEW')

 

(undocumented operator)

Parameters:
  • group (enum) - Group to add object to. in (ADD_NEW)

group_instance_add(type='', view_align=False)

 

Add a dupligroup instance.

Parameters:
  • type (enum) - in ()
  • view_align (boolean)

hook_assign(modifier='')

 

Assign the selected vertices to a hook.

Parameters:
  • modifier (enum) - Modifier number to assign to. in ()

hook_recenter(modifier='')

 

Set hook center to cursor position.

Parameters:
  • modifier (enum) - Modifier number to assign to. in ()

hook_remove(modifier='')

 

Remove a hook from the active object.

Parameters:
  • modifier (enum) - Modifier number to remove. in ()

hook_reset(modifier='')

 

Recalculate and and clear offset transformation.

Parameters:
  • modifier (enum) - Modifier number to assign to. in ()

hook_select(modifier='')

 

Selects effected vertices on mesh.

Parameters:
  • modifier (enum) - Modifier number to remove. in ()

lamp_add(type='POINT', view_align=False)

 

Add a lamp object to the scene.

Parameters:
  • type (enum) - in (POINT, SUN, SPOT, HEMI, AREA)
  • view_align (boolean)

make_links_data(type='OBDATA')

 

Make links from the active object to other selected objects.

Parameters:
  • type (enum) - in (OBDATA, MATERIAL, ANIMATION, DUPLIGROUP)

make_links_scene(type='Scene')

 

Make linked data local to each object.

Parameters:
  • type (enum) - in ()

make_local(type='SELECTED_OBJECTS')

 

Make library linked datablocks local to this file.

Parameters:
  • type (enum) - in (SELECTED_OBJECTS, SELECTED_OBJECTS_DATA, ALL)

make_single_user(type='ALL', object=False, obdata=False, material=False, texture=False, animation=False)

 

Make linked data local to each object.

Parameters:
  • type (enum) - in (SELECTED_OBJECTS, ALL)
  • object (boolean)
  • obdata (boolean)
  • material (boolean)
  • texture (boolean)
  • animation (boolean)

metaball_add(type='MBALL_BALL', view_align=False, enter_editmode=False)

 

Add an metaball object to the scene.

Parameters:
  • type (enum) - in (MBALL_BALL, MBALL_TUBE, MBALL_PLANE, MBALL_CUBE, MBALL_ELLIPSOID)
  • view_align (boolean)
  • enter_editmode (boolean)

mode_set(mode='', toggle=False)

 

Sets the object interaction mode.

Parameters:
  • mode (enum) - in (OBJECT, EDIT, SCULPT, VERTEX_PAINT, WEIGHT_PAINT, TEXTURE_PAINT, PARTICLE_EDIT, POSE)
  • toggle (boolean)

modifier_add(type='SUBSURF')

 

Add a modifier to the active object.

Parameters:
  • type (enum) - in (ARRAY, BEVEL, BOOLEAN, BUILD, DECIMATE, EDGE_SPLIT, MASK, MIRROR, MULTIRES, SUBSURF, UV_PROJECT, ARMATURE, CAST, CURVE, DISPLACE, HOOK, LATTICE, MESH_DEFORM, SHRINKWRAP, SIMPLE_DEFORM, SMOOTH, WAVE, CLOTH, COLLISION, EXPLODE, FLUID_SIMULATION, PARTICLE_INSTANCE, PARTICLE_SYSTEM, SMOKE, SOFT_BODY, SURFACE)

modifier_apply(apply_as='DATA')

 

Apply modifier and remove from the stack.

Parameters:
  • apply_as (enum) - How to apply the modifier to the geometry in (DATA, SHAPE)

move_to_layer(layer=(False, False, False, False, False, False, False, False, False...)

 

Move the object to different layers.

Parameters:
  • layer (boolean array of 20 items)

origin_set(type='GEOMETRY_ORIGIN')

 

Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor

Parameters:
  • type (enum) - in (GEOMETRY_ORIGIN, ORIGIN_GEOMETRY, ORIGIN_CURSOR)

parent_clear(type='CLEAR')

 

Clear the object's parenting.

Parameters:
  • type (enum) - in (CLEAR, CLEAR_KEEP_TRANSFORM, CLEAR_INVERSE)

parent_set(type='OBJECT')

 

Set the object's parenting.

Parameters:
  • type (enum) - in (OBJECT, ARMATURE, ARMATURE_NAME, ARMATURE_AUTO, ARMATURE_ENVELOPE, BONE, CURVE, FOLLOW, PATH_CONST, LATTICE, VERTEX, TRIA)

proxy_make(object='', group_object='')

 

Add empty object to become local replacement data of a library-linked object

Parameters:
  • object (string)
  • group_object (string)

restrictview_set(unselected=False)

 

Hide the object by setting the restrictview flag.

Parameters:
  • unselected (boolean)

select_all(action='TOGGLE')

 

Change selection of all visible objects in scene.

Parameters:
  • action (enum) - Selection action to execute in (TOGGLE, SELECT, DESELECT, INVERT)

select_by_layer(extend=False, layer=1)

 

Select all visible objects on a layer.

Parameters:
  • layer (int) - in (1, 20)
  • extend (boolean)

select_by_type(extend=False, type='MESH')

 

Select all visible objects that are of a type.

Parameters:
  • type (enum) - in (MESH, CURVE, SURFACE, META, TEXT, ARMATURE, LATTICE, EMPTY, CAMERA, LAMP)
  • extend (boolean)

select_grouped(extend=False, type='CHILDREN_RECURSIVE')

 

Select all visible objects grouped by various properties.

Parameters:
  • type (enum) - in (CHILDREN_RECURSIVE, CHILDREN, PARENT, SIBLINGS, TYPE, LAYER, GROUP, HOOK, PASS, COLOR, PROPERTIES)
  • extend (boolean)

select_linked(extend=False, type='OBDATA')

 

Select all visible objects that are linked.

Parameters:
  • type (enum) - in (OBDATA, MATERIAL, TEXTURE, DUPGROUP, PARTICLE)
  • extend (boolean)

select_mirror(extend=False)

 

Select the Mirror objects of the selected object eg. L.sword -> R.sword

Parameters:
  • extend (boolean)

select_name(name='', extend=False)

 

Select an object with this name

Parameters:
  • name (string)
  • extend (boolean)

select_pattern(pattern='*', case_sensitive=False, extend=True)

 

Select object matching a naming pattern.

Parameters:
  • pattern (string)
  • extend (boolean)
  • case_sensitive (boolean)

select_random(extend=False, percent=0.5)

 

Set select on random visible objects.

Parameters:
  • percent (float) - percentage of objects to randomly select in (0, 1)
  • extend (boolean)

shape_key_move(type='UP')

 

(undocumented operator)

Parameters:
  • type (enum) - in (UP, DOWN)

subsurf_set(level=1)

 

Sets a Subdivision Surface Level (1-5)

Parameters:
  • level (int) - in (0, 6)

surface_add(type='NURBS_CURVE', view_align=False, enter_editmode=False)

 

Add a surface object to the scene.

Parameters:
  • type (enum) - in (NURBS_CURVE, NURBS_CIRCLE, NURBS_SURFACE, NURBS_TUBE, NURBS_SPHERE, NURBS_DONUT)
  • view_align (boolean)
  • enter_editmode (boolean)

text_add(view_align=False, enter_editmode=False)

 

Add a text object to the scene

Parameters:
  • view_align (boolean)
  • enter_editmode (boolean)

track_clear(type='CLEAR')

 

Clear tracking constraint or flag from object.

Parameters:
  • type (enum) - in (CLEAR, CLEAR_KEEP_TRANSFORM)

track_set(type='TRACKTO')

 

Make the object track another object, either by constraint or old way or locked track.

Parameters:
  • type (enum) - in (TRACKTO, LOCKTRACK, OLDTRACK)

vertex_group_assign(new=False)

 

(undocumented operator)

Parameters:
  • new (boolean)

vertex_group_clean(limit=0.01, all_groups=False, keep_single=False)

 

Remove Vertex Group assignments which aren't required.

Parameters:
  • limit (float) - Remove weights under this limit. in (0, 1)
  • keep_single (boolean)
  • all_groups (boolean)

vertex_group_invert(auto_assign=True, auto_remove=True)

 

(undocumented operator)

Parameters:
  • auto_assign (boolean)
  • auto_remove (boolean)

vertex_group_levels(offset=0.0, gain=1.0)

 

(undocumented operator)

Parameters:
  • offset (float) - Value to add to weights. in (-1, 1)
  • gain (float) - Value to multiply weights by. in (0, inf)

vertex_group_normalize_all(lock_active=True)

 

(undocumented operator)

Parameters:
  • lock_active (boolean)

vertex_group_remove(all=False)

 

(undocumented operator)

Parameters:
  • all (boolean)

vertex_group_remove_from(all=False)

 

(undocumented operator)

Parameters:
  • all (boolean)

vertex_group_set_active(group='')

 

Set the active vertex group.

Parameters:
  • group (enum) - Vertex group to set as active. in ()