diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-08 00:51:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-08 00:54:55 +0300 |
commit | f12d2adc870e4bc032f49b9edae85c3b0366b406 (patch) | |
tree | 26b1b336bcbdbe37559df3a94febfe3aaa1e4a8e /release/scripts/templates_py/operator_modal_view3d_raycast.py | |
parent | c121bc62193ab22b37cf3d8cf7bd1d21205f1f3c (diff) |
RNA: Object.select_set use boolean, only select
- Was setting active state, making it necessary to backup/restore
active object in cases where this isn't needed.
Existing scripts are explicitly setting the active object when needed.
- Use a boolean select arg (toggle selection wasn't used anywhere).
- Add an optional view layer argument since scripts should be able to
operate outside the user context.
Diffstat (limited to 'release/scripts/templates_py/operator_modal_view3d_raycast.py')
-rw-r--r-- | release/scripts/templates_py/operator_modal_view3d_raycast.py | 2 |
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 613501143f7..103c13dc1c2 100644 --- a/release/scripts/templates_py/operator_modal_view3d_raycast.py +++ b/release/scripts/templates_py/operator_modal_view3d_raycast.py @@ -67,7 +67,7 @@ def main(context, event): # now we have the object under the mouse cursor, # we could do lots of stuff but for the example just select. if best_obj is not None: - best_obj.select_set(action='SELECT') + best_obj.select_set(True) context.view_layer.objects.active = best_obj |