From 4d396c708f854b8b9649fc3fbecbbf4c9ebb8168 Mon Sep 17 00:00:00 2001 From: Sergo Pogosyan Date: Thu, 18 Oct 2018 12:10:02 -0400 Subject: [PATCH] Add .appleseed extension to project file when no extension is specified This fixes regression #233. --- .../appleseedrendererparamdlg.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp b/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp index 44d8899..5a7d711 100644 --- a/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp +++ b/src/appleseed-max-impl/appleseedrenderer/appleseedrendererparamdlg.cpp @@ -157,8 +157,7 @@ namespace enum { WM_UPDATE_CHECK_DATA = WM_USER + 101 }; - explicit AboutPanel( - IRendParams* rend_params) + explicit AboutPanel(IRendParams* rend_params) : m_rend_params(rend_params) { m_rollup = @@ -298,6 +297,22 @@ namespace enable_disable_controls(); return TRUE; + case WM_CUSTEDIT_ENTER: + switch (LOWORD(wparam)) + { + case IDC_TEXT_PROJECT_FILEPATH: + { + MSTR project_file; + m_text_project_filepath->GetText(project_file); + project_file = replace_extension(project_file, L".appleseed"); + m_text_project_filepath->SetText(project_file); + return TRUE; + } + + default: + return FALSE; + } + case WM_COMMAND: switch (LOWORD(wparam)) {