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 Answer 1

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .