Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-02-11 03:27:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-11 03:27:01 +0300
commit7d6c08beb8e0c90ec95242fefde440834ac85488 (patch)
treeba24b152396098fa7b0b1b5816db3bd310f9a935 /doc
parent1c61f3e018d383bad52a179e1241e37b234b0b0d (diff)
Doc: simplify T72883 fix
Code example made it seem setting the active object was more complex than a single assignment.
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/rst/info_quickstart.rst6
1 files changed, 1 insertions, 5 deletions
diff --git a/doc/python_api/rst/info_quickstart.rst b/doc/python_api/rst/info_quickstart.rst
index 996169a5227..f4de6b955e5 100644
--- a/doc/python_api/rst/info_quickstart.rst
+++ b/doc/python_api/rst/info_quickstart.rst
@@ -230,11 +230,7 @@ though they may be changed by running API functions or by using the data API.
So ``bpy.context.active_object = obj`` will raise an error.
-But the following will work as expected:
-
- >>> obj = bpy.data.objects["Cube"]
- >>> obj.select_set(state = True, view_layer = bpy.context.view_layer)
- >>> bpy.context.view_layer.objects.active = obj
+But ``bpy.context.view_layer.objects.active = obj`` works as expected.
The context attributes change depending on where they are accessed.
The 3D Viewport has different context members than the Python Console,