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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user