I was trying to save history of changes to Python script by using Info
Editor type. Here is my example script:
bpy.ops.mesh.primitive_plane_add(radius=1, view_align=False, enter_editmode=False, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.transform.resize(value=(-7.70136, -7.70136, -7.70136), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.context.space_data.context = 'PHYSICS'
bpy.ops.rigidbody.object_add()
bpy.context.object.rigid_body.type = 'PASSIVE'
bpy.ops.rigidbody.object_add()
bpy.context.space_data.context = 'OBJECT'
bpy.context.space_data.context = 'PHYSICS'
bpy.context.object.rigid_body.collision_shape = 'BOX'
bpy.context.space_data.context = 'OBJECT'
bpy.context.space_data.context = 'WORLD'
bpy.context.space_data.context = 'OBJECT'
bpy.context.object.scale[0] = 2
bpy.context.object.scale[1] = 1
bpy.context.object.scale[2] = 0.5
bpy.context.object.scale[1] = 0.7
bpy.context.object.location[2] = 0.5
bpy.context.object.scale[2] = 0.3
bpy.context.object.location[2] = 0.3
bpy.context.object.scale[0] = 3
bpy.context.object.location[1] = 1.5
bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(0, 0, 0), "constraint_axis":(False, False, False), "constraint_orientation":'GLOBAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False})
bpy.context.object.location[1] = -1.5
bpy.context.area.type = 'INFO'
History of changes: I made, manually (in 3d editor) two physical blocks lying on plane.
Now I want to get same effect by pasting saved script into python console - but I got this:
Apparently the interpreter took and resized planes to shape of blocks, but it couldn't hold idea of 'BOX' object. What do I do wrong?