diff options
author | Hans Goudey <h.goudey@me.com> | 2022-07-25 19:59:33 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-07-25 19:59:33 +0300 |
commit | 00a3533429133f3be782a4e7d19938a0898f0d29 (patch) | |
tree | 26e0e5de4e65df46ffb0327b6eae4db57bd27665 /source/blender/editors/include/ED_curves.h | |
parent | 739136caca5cbe73d0478583d44a3d0d36137b42 (diff) |
Curves: Unify poll functions, add message with no surface
The "snap to surface" operators now have "disabled" poll messages
when there is no surface object.
The implementation in most curves operators is also unified.
The goal is to avoid having to define and use the poll failure messages
in multiple places, to reduce the boilerplate that tends to be
necessary to add an operator, and to increase the likelihood that
operators are implemented with proper poll messages.
Differential Revision: https://developer.blender.org/D15528
Diffstat (limited to 'source/blender/editors/include/ED_curves.h')
-rw-r--r-- | source/blender/editors/include/ED_curves.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_curves.h b/source/blender/editors/include/ED_curves.h index 0817241a5c2..00831ff7cc3 100644 --- a/source/blender/editors/include/ED_curves.h +++ b/source/blender/editors/include/ED_curves.h @@ -26,10 +26,14 @@ void ED_operatortypes_curves(void); namespace blender::ed::curves { bke::CurvesGeometry primitive_random_sphere(int curves_size, int points_per_curve); -bool selection_operator_poll(bContext *C); bool has_anything_selected(const Curves &curves_id); VectorSet<Curves *> get_unique_editable_curves(const bContext &C); void ensure_surface_deformation_node_exists(bContext &C, Object &curves_ob); +bool editable_curves_with_surface_poll(bContext *C); +bool curves_with_surface_poll(bContext *C); +bool editable_curves_poll(bContext *C); +bool curves_poll(bContext *C); + } // namespace blender::ed::curves #endif |