Using Python 101 in Blender

Ok using Python Console or Text Edtior
Open up a defult scene
where I have camera , cube , lamp

what are the steps in deleselect the cube?

So I can get ready to select cube again or the lamp or camera

bpy.ops.object.select_all(action=‘TOGGLE’) # This will deselect all selected objects
bpy.ops.object.select_pattern(pattern=‘Cube’) # This will select the object named ‘Cube’. Replace the string ‘Cube’ to select a different object, e.g. ‘Lamp’

You can also manually change the selections without using the python operators.

bpy.data.objects[‘Cube’].select = False # To deselect the cube
bpy.data.objects[‘Lamp’].select = True # To select the lamp

I hope that helps.

Yes Thanks and this time I check to make sure I am subscribed for receive an email and subscribed
to this thread So when some one awnswer back I will be notified

but at this time until I get real Comfort it all about selecting and deselecting

jordan001 I try this out and get back to this thread

Ok here is just selecting the cube

import bpy # speak to belnders API using python

bpy.ops.object.select_all(action=‘DESELECT’)

this will deselect the defult cube

bpy.ops.object.select_pattern(pattern=“camera”)

this should select the camera

bpy.ops.object.select_all(action=‘DESELECT’)

this will deselect the camera

bpy.ops.object.select_pattern(pattern=“lamp”)

this will select the lamp

bpy.ops.object.select_all(action=‘DESELECT’)

this will deselect the lamp

bpy.ops.object.select_pattern(pattern=“cube”)

this will select the defult cube