Fix: Compiler warning related to grease_pencil_context_poll

Declare this function in `ED_grease_pencil.hh`.
Move the implementation to `grease_pencil_ops.cc` with the other poll
functions.
This commit is contained in:
Falk David
2024-10-04 12:36:01 +02:00
parent 7191608a98
commit c54d5d833b
3 changed files with 7 additions and 6 deletions

View File

@@ -26,12 +26,6 @@
namespace blender::ed::greasepencil {
bool grease_pencil_context_poll(bContext *C)
{
GreasePencil *grease_pencil = blender::ed::greasepencil::from_context(*C);
return grease_pencil != nullptr;
}
void select_layer_channel(GreasePencil &grease_pencil, bke::greasepencil::Layer *layer)
{
using namespace blender::bke::greasepencil;

View File

@@ -25,6 +25,12 @@
namespace blender::ed::greasepencil {
bool grease_pencil_context_poll(bContext *C)
{
GreasePencil *grease_pencil = blender::ed::greasepencil::from_context(*C);
return grease_pencil != nullptr;
}
bool active_grease_pencil_poll(bContext *C)
{
Object *object = CTX_data_active_object(C);

View File

@@ -285,6 +285,7 @@ bool ensure_active_keyframe(const Scene &scene,
void create_keyframe_edit_data_selected_frames_list(KeyframeEditData *ked,
const bke::greasepencil::Layer &layer);
bool grease_pencil_context_poll(bContext *C);
bool active_grease_pencil_poll(bContext *C);
bool active_grease_pencil_material_poll(bContext *C);
bool editable_grease_pencil_poll(bContext *C);