0
$\begingroup$

How can I deselect Text in the outliner? bpy.ops.object.select_all(action='DESELECT') will not work for this. I can just click with the mouse on Plane in the outliner and it works, but I want to do this in Python and didn't find a way yet. enter image description here

$\endgroup$
1
$\begingroup$

That highlight is indicating the current active object. I was about to tell you that you can't really do that, since most of that data is read-only, but after some stubborn, extra googling, it turns out you actually can!

bpy.context.view_layer.objects.active = None

I guess we both learned something new today.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.