Fix #139364: FileHandler example for shader editor does not work

This commit is contained in:
Jacques Lucke
2025-05-24 18:46:42 +02:00
parent 8ea045d299
commit d35351fdc8

View File

@@ -1109,8 +1109,18 @@ static bool node_color_drop_poll(bContext *C, wmDrag *drag, const wmEvent * /*ev
return (drag->type == WM_DRAG_COLOR) && !UI_but_active_drop_color(C);
}
static bool node_import_file_drop_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
static bool node_import_file_drop_poll(bContext *C, wmDrag *drag, const wmEvent * /*event*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
if (!snode) {
return false;
}
if (!snode->edittree) {
return false;
}
if (snode->edittree->type != NTREE_GEOMETRY) {
return false;
}
if (drag->type != WM_DRAG_PATH) {
return false;
}