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.
This commit is contained in:
@@ -313,7 +313,7 @@ class CLIP_OT_bundles_to_mesh(Operator):
|
||||
ob = bpy.data.objects.new(name="Tracks", object_data=mesh)
|
||||
ob.matrix_world = matrix
|
||||
context.collection.objects.link(ob)
|
||||
ob.select_set('SELECT')
|
||||
ob.select_set(True)
|
||||
context.view_layer.objects.active = ob
|
||||
else:
|
||||
self.report({'WARNING'}, "No usable tracks selected")
|
||||
|
||||
Reference in New Issue
Block a user