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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-24 12:18:45 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-24 12:27:05 +0300
commit31c49493d14a68d4f7bf35162c6b16765d1433a0 (patch)
treed80cbd63cff1495a359d20c1ab8cec6d4deb8ae4 /release/scripts/templates_py/operator_modal_view3d_raycast.py
parent9284c051d62833960ff836f2f48bf5a3b18b369c (diff)
Fix incorrect active object setting in scripts.
Diffstat (limited to 'release/scripts/templates_py/operator_modal_view3d_raycast.py')
-rw-r--r--release/scripts/templates_py/operator_modal_view3d_raycast.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/templates_py/operator_modal_view3d_raycast.py b/release/scripts/templates_py/operator_modal_view3d_raycast.py
index e3b63813fc4..613501143f7 100644
--- a/release/scripts/templates_py/operator_modal_view3d_raycast.py
+++ b/release/scripts/templates_py/operator_modal_view3d_raycast.py
@@ -68,7 +68,7 @@ def main(context, event):
# we could do lots of stuff but for the example just select.
if best_obj is not None:
best_obj.select_set(action='SELECT')
- context.scene.objects.active = best_obj
+ context.view_layer.objects.active = best_obj
class ViewOperatorRayCast(bpy.types.Operator):