Can you access which files you have selected in file browser using ImportHelper?
filepath return only last one selected.
I mean in something like that:
class ImportSomeData(Operator, ImportHelper):
bl_idname = "import_test.some_data"
bl_label = "Import Some Data"
def execute(self, context):
return read_some_data(context, self.filepath)
def read_some_data(context, filepath):
#I want to know what i selected there
class ImportSomeData(Operator, ImportHelper):
bl_idname = "import_test.some_data"
bl_label = "Import Some Data"
files = CollectionProperty(name='File paths', type=bpy.types.OperatorFileListElement)
def execute(self, context):
for filepath in files:
return read_some_data(context, filepath)
def read_some_data(context, filepath):
#I want to know what i selected there
Hi There,
I’m a total beginner and wasted hours to achieve this, but can’t I’ve tried chatGPT, BingAI, read google but for me it never gives more then one file path back. I want load multiple jpg-s and tif-s with filebrowser.