[Bf-blender-cvs] [f7836019b37] master: Fix incorrect poll function used for file path dropping

Julian Eisel noreply at git.blender.org
Fri Jul 30 19:08:07 CEST 2021


Commit: f7836019b37152558f6808f81eea6344aa8d9608
Author: Julian Eisel
Date:   Fri Jul 30 18:55:03 2021 +0200
Branches: master
https://developer.blender.org/rBf7836019b37152558f6808f81eea6344aa8d9608

Fix incorrect poll function used for file path dropping

The operator to drop file paths into the File Browser was just checking
if there's an active window. This wasn't really an issue since the
operator was only used as drop-operator for the File Browser. But the
operator would show up in the operator search. Plus, for asset browsing,
we'll also have to check the file browsing mode, so the more specific
poll function will be needed.

===================================================================

M	source/blender/editors/space_file/file_ops.c

===================================================================

diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 7c608e2115d..ac59b4ce7b5 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -2241,7 +2241,7 @@ void FILE_OT_filepath_drop(wmOperatorType *ot)
   ot->idname = "FILE_OT_filepath_drop";
 
   ot->exec = filepath_drop_exec;
-  ot->poll = WM_operator_winactive;
+  ot->poll = ED_operator_file_active;
 
   RNA_def_string_file_path(ot->srna, "filepath", "Path", FILE_MAX, "", "");
 }



More information about the Bf-blender-cvs mailing list