Skip to main content
added 97 characters in body
Source Link
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)
 
# to select the object in the 3D viewport,

current_state = bpy.data.objects["Cube"].select_get()
# retrieving the current state

# this way you can also select multiple objects

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here

https://docs.blender.org/api/current/bpy.types.LayerObjects.html#bpy.types.LayerObjects


⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)
 
# to select the object in the 3D viewport,
# this way you can also select multiple objects

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here

https://docs.blender.org/api/current/bpy.types.LayerObjects.html#bpy.types.LayerObjects


⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)
# to select the object in the 3D viewport,

current_state = bpy.data.objects["Cube"].select_get()
# retrieving the current state

# this way you can also select multiple objects

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here

https://docs.blender.org/api/current/bpy.types.LayerObjects.html#bpy.types.LayerObjects


⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
added 91 characters in body
Source Link
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)

# to select the object in the 3D viewport,
# this way you can also select multiple objects

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here

https://docs.blender.org/api/current/bpy.types.LayerObjects.html#bpy.types.LayerObjects


⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)

# to select the object in the 3D viewport,
# this way you can also select multiple objects

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here


⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)

# to select the object in the 3D viewport,
# this way you can also select multiple objects

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here

https://docs.blender.org/api/current/bpy.types.LayerObjects.html#bpy.types.LayerObjects


⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
added 236 characters in body
Source Link
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)

# to select the object in the 3D viewport,
# this way you can also select multiple objects 

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here


Pre⚠Older Version of API 2.879

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8

bpy.data.objects["Cube"].select_set(True)

# to select the object in the 3D viewport,
# this way you can also select multiple objects

Pre 2.8

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)

# to select the object in the 3D viewport,
# this way you can also select multiple objects 

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

enter image description here


⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object
added 77 characters in body
Source Link
Loading
added 4 characters in body
Source Link
Loading
Source Link
Loading