Blender 2.70
- Create a new project,
- change to Screenlayout to 'Scripting'
- Create a new script file by pressing the "+ New" button on the bottom menubar
- Paste the code below into the window.
- Run the script. Notice all is well.
- Delete the newly added cude
- Run the script again. Notice the hilite is orange. This means in python it is not active or selected
____ Code _____
import bpy
bpy.ops.object.select_all(action="DESELECT")
bpy.data.objects["Cube"].select = True
bpy.ops.object.duplicate_move_linked(OBJECT_OT_duplicate={"linked":True, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(2, 2, 2), "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), "texture_space":False, "remove_on_cancel":False, "release_confirm":False})