API reference : bpy.context.scene.objects.active = obj is no longer possible #72883

Closed
opened 2020-01-03 18:12:09 +01:00 by Alba Málaga · 4 comments

Blender Version
Broken: Blender 2.81a

Short description of error

In the quick start document inside the API reference
https://docs.blender.org/api/current/info_quickstart.html
we can read
"But bpy.context.scene.objects.active = obj will work as expected."

This is not true in Blender 2.81a.

Possible fix

One way of selecting objects from the API using bpy.context in Blender 2.81a is as follows

 cube = bpy.data.objects["Cube"]
 cube.select_set( state = True, view_layer = bpy.context.view_layer )
 bpy.context.view_layer.objects.active = cube
**Blender Version** Broken: Blender 2.81a **Short description of error** In the quick start document inside the API reference https://docs.blender.org/api/current/info_quickstart.html we can read "But `bpy.context.scene.objects.active = obj` will work as expected." This is not true in Blender 2.81a. **Possible fix** One way of selecting objects from the API using bpy.context in Blender 2.81a is as follows ``` cube = bpy.data.objects["Cube"] cube.select_set( state = True, view_layer = bpy.context.view_layer ) bpy.context.view_layer.objects.active = cube
Author

Added subscriber: @albamath

Added subscriber: @albamath

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

This issue was referenced by blender/blender@189e96ba68

This issue was referenced by blender/blender@189e96ba687c88bf40f86ba64e5054c70ebde95b
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Aaron Carlisle self-assigned this 2020-02-10 20:09:08 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-manual#72883
No description provided.