Fix #139364: FileHandler example for shader editor does not work
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user