简体   繁体   English

如何使用3d的max 2016 SDK(C ++)在插件中添加保存文件对话框?

[英]How to add save file dialog in plug-in using 3d's max 2016 SDK (C++)?

I'm currently using 3d's Max 2016 SDK via MV Studio 2012. I've created usual project with Plugin Wizard, it creates panel with text and button (and does many actions inside the code, but that is not the theme). 我目前正在通过MV Studio 2012使用3d的Max 2016 SDK。我已经使用插件向导创建了常规项目,它创建了带有文本和按钮的面板(并在代码中执行了许多操作,但这不是主题)。 So, now I want to add some button to activate Windows File Dialog to choose path (folder) and name of .bin-file that will be created afterwards. 所以,现在我想添加一些按钮来激活Windows文件对话框,以选择之后将创建的路径(文件夹)和.bin文件的名称。

I tried to find something in the toolbox at the resource editor but have not succeed. 我试图在资源编辑器的工具箱中找到一些东西,但没有成功。 What should I do? 我该怎么办?

As you said, you can use directly winapi to create your dialog, but the aesthetic result of the window should differ a bit from dialog already used in 3dsMax. 正如您所说,您可以直接使用winapi来创建对话框,但窗口的美学效果应该与3dsMax中已经使用的对话框略有不同。 Autodesk has made a lot of UI controls by themselves (or patched winapi ones) and provide their access in the SDK to have something homogeneous between the application and plugins. Autodesk自己制作了很多UI控件(或修补了winapi),并在SDK中提供了访问权限,以便在应用程序和插件之间实现同类。

What you are looking for here, is the function named DoMaxSaveAsDialog and should be available in Interface8. 你在这里寻找的是名为DoMaxSaveAsDialog的函数,应该在Interface8中可用。

Interface8 Class Reference Interface8类参考

The problem is solved de-facto. 事实上解决了这个问题。 Just used pushbutton and GetSaveFileName function from windows.h header. 刚从windows.h头文件中使用了pushbutton和GetSaveFileName函数。 For details, read here: how to save file with GetSaveFileName in win32? 有关详细信息,请阅读: 如何在win32中使用GetSaveFileName保存文件?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM