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:
@@ -25,5 +25,5 @@ view_layer.active_layer_collection.collection.objects.link(light_object)
|
||||
light_object.location = (5.0, 5.0, 5.0)
|
||||
|
||||
# And finally select it and make it active.
|
||||
light_object.select_set('SELECT')
|
||||
light_object.select_set(True)
|
||||
view_layer.objects.active = light_object
|
||||
|
Reference in New Issue
Block a user