diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc index 07b268a79b2..aacd00f847f 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc @@ -3318,7 +3318,7 @@ static void GREASE_PENCIL_OT_reproject(wmOperatorType *ot) /* callbacks */ ot->invoke = WM_menu_invoke; ot->exec = grease_pencil_reproject_exec; - ot->poll = editable_grease_pencil_poll; + ot->poll = editable_grease_pencil_with_region_view3d_poll; ot->ui = grease_pencil_reproject_ui; /* flags */ @@ -3782,7 +3782,7 @@ static void GREASE_PENCIL_OT_texture_gradient(wmOperatorType *ot) ot->invoke = grease_pencil_texture_gradient_invoke; ot->modal = grease_pencil_texture_gradient_modal; ot->exec = grease_pencil_texture_gradient_exec; - ot->poll = editable_grease_pencil_poll; + ot->poll = editable_grease_pencil_with_region_view3d_poll; ot->cancel = WM_gesture_straightline_cancel; /* Flags. */ diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_ops.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_ops.cc index b607d28126f..b4fc52039ad 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_ops.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_ops.cc @@ -64,6 +64,11 @@ bool editable_grease_pencil_poll(bContext *C) return true; } +bool editable_grease_pencil_with_region_view3d_poll(bContext *C) +{ + return ED_operator_region_view3d_active(C) && editable_grease_pencil_poll(C); +} + bool active_grease_pencil_layer_poll(bContext *C) { const GreasePencil *grease_pencil = blender::ed::greasepencil::from_context(*C); diff --git a/source/blender/editors/include/ED_grease_pencil.hh b/source/blender/editors/include/ED_grease_pencil.hh index 345de98ca2a..dfa33bc0df7 100644 --- a/source/blender/editors/include/ED_grease_pencil.hh +++ b/source/blender/editors/include/ED_grease_pencil.hh @@ -317,6 +317,7 @@ 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); +bool editable_grease_pencil_with_region_view3d_poll(bContext *C); bool active_grease_pencil_layer_poll(bContext *C); bool active_grease_pencil_layer_group_poll(bContext *C); bool editable_grease_pencil_point_selection_poll(bContext *C); diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index a7568024259..f40dbdce512 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -2267,6 +2267,12 @@ static bool interface_panel_affects_output(DrawGroupInputsContext &ctx, for (const bNodeTreeInterfaceItem *item : panel.items()) { if (item->item_type == NODE_INTERFACE_SOCKET) { const auto &socket = *reinterpret_cast(item); + if (socket.flag & NODE_INTERFACE_SOCKET_HIDE_IN_MODIFIER) { + continue; + } + if (!(socket.flag & NODE_INTERFACE_SOCKET_INPUT)) { + continue; + } const int input_index = ctx.nmd.node_group->interface_input_index(socket); if (ctx.input_usages[input_index]) { return true;