Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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"
}
Comment on lines +4 to +14
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This launch configuration uses a Windows-specific debugger type ("cppvsdbg") and hardcoded Windows paths (.exe extension, Windows-style path separators). Since MaterialX is a cross-platform project supporting Windows, macOS, and Linux, consider:

  1. Adding platform-specific launch configurations for macOS (using "lldb") and Linux (using "gdb")
  2. Documenting that this configuration is Windows-only in the name or description
  3. Using VS Code variables and conditional configurations where possible to support multiple platforms

The hardcoded path to MaterialXView.exe will only work on Windows systems with Visual Studio builds.

Copilot uses AI. Check for mistakes.
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cmake.sourceDirectory": "${workspaceFolder}",
"python.testing.pytestArgs": [
"python/MaterialXTest"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.cwd": "${workspaceFolder}",
"python.analysis.extraPaths": [
"${workspaceFolder}/build/python",
"${workspaceFolder}/python"
]
}
133 changes: 133 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -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}"
}
},
Comment on lines +95 to +114
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tasks are missing a "Build MaterialX Release" task (without Metashade). Currently, there are build tasks for:

  • Build MaterialX Debug (line 35)
  • Build MaterialX Debug (Metashade) (line 58)
  • Build MaterialX Release (Metashade) (line 96)

But no corresponding "Build MaterialX Release" task that uses the "release" build preset defined in CMakePresets.json (line 50-55). This creates an inconsistency where users can build Debug with and without Metashade, but can only build Release with Metashade enabled.

Copilot uses AI. Check for mistakes.
{
"label": "Clean MaterialX",
"type": "shell",
"command": "cmake",
"args": [
"--build",
"build",
"--target",
"clean"
],
"group": "build",
"problemMatcher": [],
"isBackground": false,
"options": {
"cwd": "${workspaceFolder}"
}
}
]
}
Comment on lines +1 to +133
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VS Code tasks defined here use CMake presets that are only defined for Windows in CMakePresets.json. Since this tasks file will be used by all contributors regardless of platform, the tasks will fail on macOS and Linux systems. The tasks should either:

  1. Be platform-conditional (using VS Code's platform-specific task syntax)
  2. Reference CMake presets that exist for all platforms
  3. Be moved to user-specific configuration files

Additionally, tasks like "Install MaterialX Debug" assume a Windows-style Debug configuration, which may not apply to Unix Makefiles generators used on other platforms.

Copilot uses AI. Check for mistakes.
64 changes: 64 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Comment on lines +1 to +64
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CMake presets file is Windows-specific (using "Visual Studio 17 2022" generator) but is placed at the repository root where it will apply to all users on all platforms. MaterialX is a cross-platform project that supports Windows, macOS, and Linux. Consider one of the following approaches:

  1. Add presets for macOS (Xcode, Unix Makefiles) and Linux (Unix Makefiles, Ninja) platforms
  2. Rename or organize the file to indicate it's Windows-specific (e.g., CMakePresets-Windows.json and provide platform-specific alternatives)
  3. Use CMakeUserPresets.json instead, which is typically git-ignored and allows per-user configuration without forcing platform-specific settings on all contributors

Copilot uses AI. Check for mistakes.
Loading