From af2abce66a4b808454b8482defccb2ff08643f2d Mon Sep 17 00:00:00 2001 From: Pavlo Penenko Date: Sat, 24 Jan 2026 16:54:26 -0500 Subject: [PATCH 1/2] feat: Add VS Code tasks and CMake Presets --- .vscode/launch.json | 16 +++++ .vscode/settings.json | 47 +++++++++++++++ .vscode/tasks.json | 133 ++++++++++++++++++++++++++++++++++++++++++ CMakePresets.json | 64 ++++++++++++++++++++ 4 files changed, 260 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 CMakePresets.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..458e4848bf --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch MaterialXView", + "type": "cppvsdbg", + "request": "launch", + "program": "${workspaceFolder}/build/bin/Debug/MaterialXView.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/resources/Materials/Examples/StandardSurface", + "environment": [], + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..1b7784aaec --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,47 @@ +{ + "cmake.sourceDirectory": "${workspaceFolder}", + "files.associations": { + "xlocale": "cpp", + "xlocmon": "cpp", + "chrono": "cpp", + "functional": "cpp", + "future": "cpp", + "memory": "cpp", + "random": "cpp", + "ratio": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "variant": "cpp", + "xmemory0": "cpp", + "xtr1common": "cpp", + "xutility": "cpp", + "array": "cpp", + "compare": "cpp", + "format": "cpp", + "xmemory": "cpp", + "xstring": "cpp", + "deque": "cpp", + "list": "cpp", + "map": "cpp", + "queue": "cpp", + "set": "cpp", + "stack": "cpp", + "vector": "cpp", + "xhash": "cpp", + "xtree": "cpp", + "algorithm": "cpp", + "xiosbase": "cpp" + }, + "python.testing.pytestArgs": [ + "python/MaterialXTest" + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "python.testing.cwd": "${workspaceFolder}", + "python.defaultInterpreterPath": "C:\\Users\\tripc\\AppData\\Local\\Programs\\Python\\Python313\\python.exe", + "python.analysis.extraPaths": [ + "${workspaceFolder}/build/python", + "${workspaceFolder}/python" + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..7f16552fc9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,133 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Configure MaterialX", + "type": "shell", + "command": "cmake", + "args": [ + "--preset", + "default" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Configure MaterialX (Metashade)", + "type": "shell", + "command": "cmake", + "args": [ + "--preset", + "metashade" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Build MaterialX Debug", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "--preset", + "debug" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [ + "$msCompile", + "$gcc" + ], + "isBackground": false, + "dependsOn": "Configure MaterialX", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Build MaterialX Debug (Metashade)", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "--preset", + "debug-metashade" + ], + "group": "build", + "problemMatcher": [ + "$msCompile", + "$gcc" + ], + "isBackground": false, + "dependsOn": "Configure MaterialX (Metashade)", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Install MaterialX Debug", + "type": "shell", + "command": "cmake", + "args": [ + "--install", + "build", + "--config", + "Debug" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "dependsOn": "Build MaterialX Debug", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Build MaterialX Release (Metashade)", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "--preset", + "release-metashade" + ], + "group": "build", + "problemMatcher": [ + "$msCompile", + "$gcc" + ], + "isBackground": false, + "dependsOn": "Configure MaterialX (Metashade)", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Clean MaterialX", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "build", + "--target", + "clean" + ], + "group": "build", + "problemMatcher": [], + "isBackground": false, + "options": { + "cwd": "${workspaceFolder}" + } + } + ] +} \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000000..64fe1f0ead --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,64 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "windows-base", + "hidden": true, + "generator": "Visual Studio 17 2022", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/installed", + "MATERIALX_BUILD_VIEWER": "ON", + "MATERIALX_BUILD_GRAPH_EDITOR": "ON", + "MATERIALX_BUILD_PYTHON": "ON", + "MATERIALX_BUILD_TESTS": "ON", + "MATERIALX_BUILD_METASHADE": "OFF" + } + }, + { + "name": "default", + "inherits": "windows-base", + "displayName": "Default (Windows)", + "description": "Default build options for Windows (No Metashade)" + }, + { + "name": "metashade", + "inherits": "windows-base", + "displayName": "Metashade (Windows)", + "description": "Build with Metashade features enabled", + "cacheVariables": { + "MATERIALX_BUILD_METASHADE": "ON" + } + } + ], + "buildPresets": [ + { + "name": "debug", + "configurePreset": "default", + "configuration": "Debug", + "displayName": "Debug Build", + "description": "Debug build (Default)" + }, + { + "name": "debug-metashade", + "configurePreset": "metashade", + "configuration": "Debug", + "displayName": "Debug Build (Metashade)", + "description": "Debug build with Metashade" + }, + { + "name": "release", + "configurePreset": "default", + "configuration": "Release", + "displayName": "Release Build", + "description": "Release build" + }, + { + "name": "release-metashade", + "configurePreset": "metashade", + "configuration": "Release", + "displayName": "Release Build (Metashade)", + "description": "Release build with Metashade" + } + ] +} \ No newline at end of file From aeb453b41b39695d5579c8e8a38731765bd8ab85 Mon Sep 17 00:00:00 2001 From: Pavlo Penenko Date: Sat, 24 Jan 2026 21:54:31 -0500 Subject: [PATCH 2/2] fix: Remove user-specific settings per review --- .vscode/settings.json | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1b7784aaec..63207a9546 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,45 +1,11 @@ { "cmake.sourceDirectory": "${workspaceFolder}", - "files.associations": { - "xlocale": "cpp", - "xlocmon": "cpp", - "chrono": "cpp", - "functional": "cpp", - "future": "cpp", - "memory": "cpp", - "random": "cpp", - "ratio": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "utility": "cpp", - "variant": "cpp", - "xmemory0": "cpp", - "xtr1common": "cpp", - "xutility": "cpp", - "array": "cpp", - "compare": "cpp", - "format": "cpp", - "xmemory": "cpp", - "xstring": "cpp", - "deque": "cpp", - "list": "cpp", - "map": "cpp", - "queue": "cpp", - "set": "cpp", - "stack": "cpp", - "vector": "cpp", - "xhash": "cpp", - "xtree": "cpp", - "algorithm": "cpp", - "xiosbase": "cpp" - }, "python.testing.pytestArgs": [ "python/MaterialXTest" ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "python.testing.cwd": "${workspaceFolder}", - "python.defaultInterpreterPath": "C:\\Users\\tripc\\AppData\\Local\\Programs\\Python\\Python313\\python.exe", "python.analysis.extraPaths": [ "${workspaceFolder}/build/python", "${workspaceFolder}/python"