C++ API Reference
fileDialog/fileDialog.h
// ===========================================================================
// Copyright 2025 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk license
// agreement provided at the time of installation or download, or which
// otherwise accompanies this software in either electronic or hard copy form.
// ===========================================================================
#ifndef _fileDialog_h
#define _fileDialog_h
#include <maya/MPxFileDialog.h>
class ExampleFileDialog : public MPxFileDialog
{
public:
ExampleFileDialog() = default;
~ExampleFileDialog() override = default;
static void* creator(){
return new ExampleFileDialog();
};
// Override the widget() method to return a QWidget
void* widget() override;
// Override the selectedFiles() method to return the selected files
MStringArray selectedFiles() const override;
bool isAcceptOpenSupported() override { return true; };
bool isAcceptSaveSupported() override { return false; };
bool isFileSuppored(const MString &filename) override { return true; } ;
static MString fLoadPath;
private:
MStringArray fSelectedFiles;
};
#endif // _fileDialog_h
// ==========================================================================