2
$\begingroup$

We can use properties provided by bpy.types.Panel.layout.prop(..., toggle=True), that provides a toggle like behaviour it.

but, how to bring this toggling behaviour for buttons? There's no toggle functionality for, bpy.types.Panel.layout.row().operator(...).

$\endgroup$

1 Answer 1

3
$\begingroup$

An operator is not a property.

Setting the toggle behaviour for a Boolean property's layout, changes the markup to a button look, rather than a checkbox As with the checkbox it changes when setting from True to False or vice versa.

An operator layout is rendered as a button which calls the operator, rather than setting a property.

Code can be attached for when a boolean property is updated. See example here https://blender.stackexchange.com/a/147144/15543

$\endgroup$

You must log in to answer this question.

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