Files
test/scripts/startup
quackarooni ce88d773db Fix: Nodes: bad ui for adding panel toggles
Adding panel toggles in nodegroups have somewhat of a UX antipattern. When
running the operator, it checks for conditions that indicate it should not run,
and if those are hit, it cancels execution and mentions the invalid condition in
the footer bar.

This is not ideal, the user should not have to call the operator to find out
whether it can be called.

Why it got implemented like this is likely a consequence of all interface items
being the same "New Item" operator. Poll functions cannot use operator
properties, so variants of the same operator cannot check for different
conditions for execution.

This is a problem for panel toggles, as they have more restrictions to when they
can be added that don't apply to other interface items.

This patch creates a separate operator for adding panel toggles. This allows the
condition checks to be implemented in the poll function, which enables greying
out the operator buttons and showing on tooltips what condition is invalid.

Pull Request: https://projects.blender.org/blender/blender/pulls/146379
2025-10-16 18:37:22 +02:00
..