Fix incorrect active object setting in scripts.

This commit is contained in:
Brecht Van Lommel
2018-07-24 11:18:45 +02:00
parent 9284c051d6
commit 31c49493d1
6 changed files with 15 additions and 15 deletions

View File

@@ -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):