ce88d773db7395c921179f1505e8bb0debf3f156
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
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
