From 923ffd9ec9edfe109e7437be675f7693f460af08 Mon Sep 17 00:00:00 2001
From: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
Date: Mon, 30 Sep 2024 17:13:55 -0700
Subject: [PATCH 01/80] Updated markdown documentation files (#2037)
Changes:
- Replaced relative image sources with absolute image URLs so that images load when viewed at https://pypi.org/project/MaterialX/ and when integrating the contents into the new Python API documentation
- Streamlined headline levels: page title (if any) uses `#`, first level uses `##`, second level uses `###`, etc.
- Updated the approach for formatting image galleries
- Streamlined figure captions to format colons in **bold**
- Used HTML comment syntax for comments in XML blocks
- Other minor formatting changes, e.g. formatting the `MaterialXView` executable in a code font
---
README.md | 44 +++++++++------
documents/DeveloperGuide/GraphEditor.md | 35 ++++++------
documents/DeveloperGuide/MainPage.md | 30 +++++-----
documents/DeveloperGuide/ShaderGeneration.md | 42 +++++++-------
documents/DeveloperGuide/Viewer.md | 58 ++++++++++++--------
5 files changed, 117 insertions(+), 92 deletions(-)
diff --git a/README.md b/README.md
index 41e7d5aeca..fdd06680a4 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/LICENSE)
@@ -7,18 +7,18 @@
[![Build Status](https://github.com/AcademySoftwareFoundation/MaterialX/workflows/main/badge.svg?branch=main)](https://github.com/AcademySoftwareFoundation/MaterialX/actions?query=branch%3Amain)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6025/badge)](https://bestpractices.coreinfrastructure.org/projects/6025)
-### Introduction
+## Introduction
MaterialX is an open standard for representing rich material and look-development content in computer graphics, enabling its platform-independent description and exchange across applications and renderers. Launched at [Industrial Light & Magic](https://www.ilm.com/) in 2012, MaterialX has been a key technology in their feature films and real-time experiences since _Star Wars: The Force Awakens_ and _Millennium Falcon: Smugglers Run_. The project was released as open source in 2017, with companies including Sony Pictures Imageworks, Pixar, Autodesk, Adobe, and SideFX contributing to its ongoing development. In 2021, MaterialX became the seventh hosted project of the [Academy Software Foundation](https://www.aswf.io/).
-### Quick Start for Developers
+## Quick Start for Developers
- Download the latest version of the [CMake](https://cmake.org/) build system.
- Point CMake to the root of the MaterialX library and generate C++ projects for your platform and compiler.
- Select the `MATERIALX_BUILD_PYTHON` option to build Python bindings.
- Select the `MATERIALX_BUILD_VIEWER` option to build the MaterialX viewer.
-### Supported Platforms
+## Supported Platforms
The MaterialX codebase requires a compiler with support for C++17, and can be built with any of the following:
@@ -28,35 +28,47 @@ The MaterialX codebase requires a compiler with support for C++17, and can be bu
The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.6 and greater.
-### MaterialX Viewer
+## MaterialX Viewer
The [MaterialX Viewer](documents/DeveloperGuide/Viewer.md) leverages shader generation to build GLSL shaders from MaterialX graphs, rendering the results using the NanoGUI framework.
**Figure 1:** Procedural and uniform materials in the MaterialX viewer
-
-
-
-
+
+
+
+
**Figure 2:** Textured, color-space-managed materials in the MaterialX viewer
-
-
+
+
-### Open Chess Set
+## Open Chess Set
The Open Chess Set is an open reference asset, consisting of a [MaterialX file](resources/Materials/Examples/StandardSurface/standard_surface_chess_set.mtlx) in the Standard Surface shading model and a [geometry file](resources/Geometry) in the glTF format. It was authored by Moeen Sayed and Mujtaba Sayed, and was contributed to the MaterialX project by Side Effects.
**Figure 3:** The Open Chess Set, rendered in Arnold for Maya
-
+![The Open Chess Set rendered in Arnold for Maya](https://raw.githubusercontent.com/AcademySoftwareFoundation/MaterialX/main/documents/Images/OpenChessSet_Arnold_01.png)
**Figure 4:** The Open Chess Set, rendered in Karma XPU for Houdini
-
+![The Open Chess Set rendered in Karma XPU for Houdini](https://raw.githubusercontent.com/AcademySoftwareFoundation/MaterialX/main/documents/Images/OpenChessSet_Karma_01.png)
-### Pre-Built Binaries
+## Pre-Built Binaries
The following packages contain pre-built binaries for the latest release, including the MaterialX viewer, Python libraries, and example assets:
@@ -64,7 +76,7 @@ The following packages contain pre-built binaries for the latest release, includ
- [MacOS (Xcode 15, Python 3.12)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_MacOS_Xcode_15_Python312.zip)
- [Linux (GCC 14, Python 3.12)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_Linux_GCC_14_Python312.zip)
-### Additional Resources
+## Additional Resources
- The [Developer Guide](http://www.materialx.org/docs/api/index.html) contains a developer-oriented overview of MaterialX with API documentation.
- The [Python Scripts](python/Scripts) folder contains standalone examples of MaterialX Python code.
diff --git a/documents/DeveloperGuide/GraphEditor.md b/documents/DeveloperGuide/GraphEditor.md
index aaac7b75a2..394754c309 100644
--- a/documents/DeveloperGuide/GraphEditor.md
+++ b/documents/DeveloperGuide/GraphEditor.md
@@ -2,29 +2,30 @@
The MaterialX Graph Editor is an example application for visualizing, creating, and editing MaterialX graphs. It utilizes the ImGui framework as well as additional ImGui extensions such as the Node Editor.
-### Example Images
+## Example Images
**Figure 1:** MaterialX Graph Editor with procedural marble example
-
-## Building The MaterialX Graph Editor
+![MaterialX Graph Editor with procedural marble example](https://github.com/AcademySoftwareFoundation/MaterialX/raw/main/documents/Images/MaterialXGraphEditor_Marble.png)
+
+## Building the MaterialX Graph Editor
Select the `MATERIALX_BUILD_GRAPH_EDITOR` option in CMake to build the MaterialX Graph Editor. Installation will copy the **MaterialXGraphEditor** executable to a `/bin` directory within the selected install folder.
-### Summary of Graph Editor Features
+## Summary of Graph Editor Features
-1. **Load Material**: Load a material document in the MTLX format.
-2. **Save Material**: Save out a graph as a mterial document in MTLX format.
-3. **New Material**: Clear all information to set up for the creation of a new material
-4. **Node Property Editor**: View or edit properties of the selected node.
-5. **Render View**: View the rendered material.
+1. **`Load Material`**: Load a material document in the MTLX format.
+2. **`Save Material`**: Save out a graph as a mterial document in MTLX format.
+3. **`New Material`**: Clear all information to set up for the creation of a new material
+4. **`Node Property Editor`**: View or edit properties of the selected node.
+5. **`Render View`**: View the rendered material.
-### Buttons
+## Buttons
-To display a new material and graph, click the `Load Material` button and and navigate to the [Example Materials](../../resources/Materials/Examples) folder, which contains a selection of materials in the MTLX format, and select a document to load. The Graph Editor will display the graph hierarchy of the selected document for visualization and editing.
+To display a new material and graph, click the `Load Material` button and and navigate to the [Materials/Examples](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/resources/Materials/Examples) folder, which contains a selection of materials in the MTLX format, and select a document to load. The Graph Editor will display the graph hierarchy of the selected document for visualization and editing.
To save out changes to the graphs as MTLX files click the `Save Material` button. This will save the position of the nodes in the graph for future use as well.
-### Editor Window
+## Editor Window
The MaterialX document is displayed as nodes in the Editor window. When a file is intially loaded the material node, surface shader node, and any enclosing nodegraphs will be displayed. Double-clicking on a nodegraph, or any node defined as a subgraph, will display the contents of that graph.
@@ -40,19 +41,19 @@ Another type of node present in the `Add Node` pop-up is the group, or backgroun
To search the editor window for a specific node use `CTRL` + `F` to bring up the search bar.
-### Node Property Editor
+## Node Property Editor
When a node is selected in the graph, its information is displayed on the left-hand column in the `Node Property Editor`. This editor displays the name of the node, its category, its inputs, the input name, types and values. Inputs that are connected to other nodes will not display a value.
This is where a node's properties such as its name and input values can be adjusted. When an input value is changed the material is automatically updated to reflect that change. The node info button displays the `doc` string for the selected node and its inputs if they exist. This `doc` string is currently read only.
The show All Inputs checkbox displays all possible inputs for a node. With the box unchecked only inputs that have a connection or have had a value set will be shown. Only these inputs will be saved out when the graph is saved.
-### Render View
+## Render View
Above the `Node Property Editor`, the `Render View` displays the current material on the Arnold Shader Ball. If inside a subgraph it will display the material associated with that subgraph; otherwise it will display the output of the selected node. It automatically updates when any changes are made to the graph.
To adjust the relative sizes of the Node Property Editor and Render View windows, drag the separator between these windows in the application. The render view window camera can be changed using the left or right mouse buttons to manipulate the shader ball.
-### Keyboard Shortcuts
+## Keyboard Shortcuts
- `TAB`: Add Node Popup
- `Right Click`: pan along the editor
@@ -66,7 +67,7 @@ To adjust the relative sizes of the Node Property Editor and Render View windows
- `+` : Zoom in with the camera when mouse is over the Render View Window.
- `-` : Zoom out with the camera when mouse is over the Render View Window.
-### Command-Line Options
+## Command-Line Options
The following are common command-line options for MaterialXGraphEditor, and a complete list can be displayed with the `--help` option.
- `--material [FILENAME]` : Specify the filename of the MTLX document to be displayed in the graph editor
@@ -75,7 +76,7 @@ The following are common command-line options for MaterialXGraphEditor, and a co
- `--library [FILEPATH]` : Specify an additional data library folder (e.g. 'vendorlib', 'studiolib'). This relative path will be appended to each location in the data search path when loading data libraries.
- `--captureFilename [FILENAME]` : Specify the filename to which the first rendered frame should be written
-### Known Limitations
+## Known Limitations
- Creating new connections using the `channels` attribute of an input is not yet supported, though existing `channels` connections will be displayed in graphs.
- Assigning a new `colorspace` attribute to an input is not yet supported, though existing `colorspace` attributes on inputs will be respected by the render view.
diff --git a/documents/DeveloperGuide/MainPage.md b/documents/DeveloperGuide/MainPage.md
index 9cf0a0d8e0..155c58eb4d 100644
--- a/documents/DeveloperGuide/MainPage.md
+++ b/documents/DeveloperGuide/MainPage.md
@@ -2,14 +2,14 @@
MaterialX is an open standard for representing rich material and look-development content in computer graphics, enabling its platform-independent description and exchange across applications and renderers. Launched at [Industrial Light & Magic](https://www.ilm.com/) in 2012, MaterialX has been a key technology in their feature films and real-time experiences since _Star Wars: The Force Awakens_ and _Millennium Falcon: Smugglers Run_. The project was released as open source in 2017, with companies including Sony Pictures Imageworks, Pixar, Autodesk, Adobe, and SideFX contributing to its ongoing development. In 2021, MaterialX became the seventh hosted project of the [Academy Software Foundation](https://www.aswf.io/).
-### Quick Start for Developers
+## Quick Start for Developers
- Download the latest version of the [CMake](https://cmake.org/) build system.
- Point CMake to the root of the MaterialX library and generate C++ projects for your platform and compiler.
- Select the `MATERIALX_BUILD_PYTHON` option to build Python bindings.
- Select the `MATERIALX_BUILD_VIEWER` option to build the MaterialX viewer.
-### Supported Platforms
+## Supported Platforms
The MaterialX codebase requires a compiler with support for C++17, and can be built with any of the following:
@@ -19,9 +19,9 @@ The MaterialX codebase requires a compiler with support for C++17, and can be bu
The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.6 and greater.
-### Building MaterialX
+## Building MaterialX
-#### Building MaterialX C++
+### Building MaterialX C++
The MaterialX C++ libraries are automatically included when building MaterialX through CMake.
@@ -32,7 +32,7 @@ To enable OpenImageIO support in MaterialX builds, the following additional opti
See the [MaterialX Unit Tests](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/source/MaterialXTest) page for documentation on shader generation and render testing in GLSL, OSL, and MDL.
-#### Building MaterialX Python
+### Building MaterialX Python
By default, the `MATERIALX_BUILD_PYTHON` option will use the active version of Python in the developer's path. To select a specific version of Python, use one or more of the following advanced options:
@@ -44,32 +44,32 @@ Additional options for the generation of MaterialX Python include the following:
- `MATERIALX_PYTHON_OCIO_DIR`: Path to a folder containing the default OCIO configuration to be packaged with MaterialX Python. The recommended OpenColorIO configuration for MaterialX is [ACES 1.2](https://github.com/colour-science/OpenColorIO-Configs/tree/feature/aces-1.2-config/aces_1.2).
- `MATERIALX_PYTHON_PYBIND11_DIR`: Path to a folder containing the PyBind11 source to be used in building MaterialX Python. Defaults to the included PyBind11 source.
-#### Building The MaterialX Viewer
+### Building The MaterialX Viewer
-Select the `MATERIALX_BUILD_VIEWER` option to build the MaterialX Viewer. Installation will copy the **MaterialXView** executable to a `bin/` directory within the selected install folder.
+Select the `MATERIALX_BUILD_VIEWER` option to build the MaterialX Viewer. Installation will copy the `MaterialXView` executable to a `bin/` directory within the selected install folder.
-#### Building API Documentation
+### Building API Documentation
To generate HTML documentation for the MaterialX C++ API, make sure a version of [Doxygen](https://www.doxygen.org/) is on your path, and select the advanced option `MATERIALX_BUILD_DOCS` in CMake. This option will add a target named `MaterialXDocs` to your project, which can be built as an independent step from your development environment.
-### Installing MaterialX
+## Installing MaterialX
Building the `install` target of your project will install the MaterialX C++ and Python libraries to the folder specified by the `CMAKE_INSTALL_PREFIX` setting, and will install MaterialX Python as a third-party library in your Python environment. Installation of MaterialX Python as a third-party library can be disabled by setting `MATERIALX_INSTALL_PYTHON` to `OFF`.
-### MaterialX Versioning
+## MaterialX Versioning
-The MaterialX codebase uses a modified semantic versioning system where the *major* and *minor* versions match that of the corresponding MaterialX [specification](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/Specification/MaterialX.Specification.md), and the *build* version represents engineering advances within that specification version. MaterialX documents are similarly marked with the specification version they were authored in, and they are valid to load into any MaterialX codebase with an equal or higher specification version.
+The MaterialX codebase uses a modified semantic versioning system where the *major* and *minor* versions match that of the corresponding [MaterialX Specification](https://materialx.org/Specification.html), and the *build* version represents engineering advances within that specification version. MaterialX documents are similarly marked with the specification version they were authored in, and they are valid to load into any MaterialX codebase with an equal or higher specification version.
-Upgrading of MaterialX documents from earlier versions is handled at import time by the `Document::upgradeVersion` method, which applies the syntax and node interface upgrades that have occurred in previous specification revisions. This allows the syntax conventions of MaterialX and the names and interfaces of nodes to evolve over time, without invalidating documents from earlier versions.
+Upgrading of MaterialX documents from earlier versions is handled at import time by the `Document::upgradeVersion()` method, which applies the syntax and node interface upgrades that have occurred in previous specification revisions. This allows the syntax conventions of MaterialX and the names and interfaces of nodes to evolve over time, without invalidating documents from earlier versions.
-#### MaterialX API Changes
+### MaterialX API Changes
The following rules describe the categories of changes to the [MaterialX API](https://materialx.org/docs/api/classes.html) that are allowed in version upgrades:
- In *build* version upgrades, only non-breaking changes to the MaterialX API are allowed. For any API call that is modified in a build version upgrade, backwards compatibility should be maintained using deprecated C++ and Python wrappers for the original API call.
- In *minor* and *major* version upgrades, breaking changes to the MaterialX API are allowed, though their benefit should be carefully weighed against their cost. Any breaking changes to API calls should be highlighted in the release notes for the new version.
-#### MaterialX Data Library Changes
+### MaterialX Data Library Changes
The following rules describe the categories of changes to the [MaterialX Data Libraries](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/libraries) that are allowed in version upgrades:
@@ -77,7 +77,7 @@ The following rules describe the categories of changes to the [MaterialX Data Li
- In *minor* version upgrades, changes to the names and interfaces of MaterialX nodes are allowed, with the requirement that version upgrade logic be used to maintain the validity and visual interpretation of documents from earlier versions.
- In *major* version upgrades, changes to the syntax rules of MaterialX documents are allowed, with the requirement that version upgrade logic be used to maintain the validity and visual interpretation of documents from earlier versions. These changes usually require synchronized updates to both the MaterialX API and data libraries.
-### Additional Links
+## Additional Links
- The main [MaterialX website](http://www.materialx.org) provides background on the project's history, industry collaborations, and recent presentations.
- The [Python Scripts](https://github.com/materialx/MaterialX/tree/main/python/Scripts) folder contains standalone examples of MaterialX Python code.
diff --git a/documents/DeveloperGuide/ShaderGeneration.md b/documents/DeveloperGuide/ShaderGeneration.md
index 01bd823ec4..594715fb39 100644
--- a/documents/DeveloperGuide/ShaderGeneration.md
+++ b/documents/DeveloperGuide/ShaderGeneration.md
@@ -1,13 +1,13 @@
# Shader Generation
## 1.1 Scope
-A shader generation framework is implemented as part of MaterialX. This can help applications to transform the agnostic MaterialX data description into executable shader code for a specific renderer. A library module named MaterialXGenShader contains the core shader generation features, and support for specific languages resides in separate libraries, e.g. [MaterialXGenGlsl](/source/MaterialXGenGlsl), [MaterialXGenOsl](/source/MaterialXGenOsl).
+A shader generation framework is implemented as part of MaterialX. This can help applications to transform the agnostic MaterialX data description into executable shader code for a specific renderer. A library module named MaterialXGenShader contains the core shader generation features, and support for specific languages resides in separate libraries, e.g. [MaterialXGenGlsl](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/source/MaterialXGenGlsl), [MaterialXGenOsl](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/source/MaterialXGenOsl).
Note that this system has no runtime and the output produced is source code, not binary executable code. The source code produced needs to be compiled by a shading language compiler before being executed by the renderer. See Figure 1 for a high level overview of the system.
-![Shader generation with multiple shader generators](/documents/Images/shadergen.png)
+![Shader generation with multiple shader generators](https://raw.githubusercontent.com/AcademySoftwareFoundation/MaterialX/main/documents/Images/shadergen.png)
-**Figure 1**: Shader generation with multiple shader generators.
+**Figure 1:** Shader generation with multiple shader generators.
## 1.2 Languages and Shader Generators
The MaterialX description is free from device specific details and all implementation details needs to be taken care of by shader generators. There is one shader generator for each supported shading language. However for each language there can also be variations needed for different renderers. For example; OpenGL renderers supporting GLSL can use forward rendering or deferred rendering, each with very different requirements for how the shaders are constructed. Another example is different renderers supporting OSL but with different sets of closures or closure parameters. Hence a separate shader generator can be defined for each language/target combination.
@@ -28,11 +28,11 @@ In the following sub-sections each of these methods are explained. For all metho
### 1.3.1 Inline Expression
Provided code generators support a very simple expression language for inlining code. This is useful for simple nodes where the operation can be expressed as a single line of code. Inlining will reduce the number of function calls and produce more compact code. The syntax to use is the same as the target shading language, with the addition of using the node’s input ports as variables wrapped in double curly brackets: `{{input}}`. The code generator will replace these variables with values assigned or connected to the respective inputs. Figure 2 gives an example.
-Connecting the expression to the nodedef is done using an `` element as seen in
+Connecting the expression to the `nodedef` is done using an `` element as seen in
Figure 2. The first option is to keep inline code in a file. The file extension is used to differentiate inline expressions from source code functions, using `filename.inline`. The second option is to directly embed the inlined code using `sourcecode`. This is the recommended approach for inlining if there the logic can fit on one line of code.
```xml
-// Nodedef elements for node
+
@@ -43,14 +43,14 @@ Figure 2. The first option is to keep inline code in a file. The file extension
-<... more types ...>
+
-// Implementation elements for node
+
-<... more types ...>
+
-// Nodedef elements for node
+
@@ -63,26 +63,26 @@ Figure 2. The first option is to keep inline code in a file. The file extension
-<... more types ...>
+
-// Implementation elements for node
+
-<... more types ...>
+
```
```c++
// File 'mx_add.inline' contains:
{{in1}} + {{in2}}
```
-**Figure 2**: Inline expressions for implementing nodes `` and ``. The code for `` is stored in an additional file, while the code for `` is specified as part of the
+**Figure 2:** Inline expressions for implementing nodes `` and ``. The code for `` is stored in an additional file, while the code for `` is specified as part of the
`` declaration.
### 1.3.2 Shading Language Function
-For nodes that can’t be implemented by inline expressions a function definition can be used instead. The function signature should match the nodedefs interface with inputs and outputs. See Figure 3 for an example. Connecting the source code to the nodedef is done using an `` element, see the [MaterialX specification](../Specification/MaterialX.v1.36.Spec.pdf) for more information.
+For nodes that can’t be implemented by inline expressions a function definition can be used instead. The function signature should match the nodedefs interface with inputs and outputs. See Figure 3 for an example. Connecting the source code to the nodedef is done using an `` element, see the [MaterialX Specification](https://materialx.org/Specification.html) for more information.
```xml
-// Nodedef element
+
@@ -97,7 +97,7 @@ For nodes that can’t be implemented by inline expressions a function definitio
-// Implementation element
+
```
```c++
@@ -115,7 +115,7 @@ void mx_image_color3(string file, string layer, color defaultvalue,
"wrap", uaddressmode);
}
```
-**Figure 3**: Shading language function's implementation for node `` in OSL.
+**Figure 3:** Shading language function's implementation for node `` in OSL.
### 1.3.3 Node Graph Implementation
As an alternative to defining source code, there is also an option to reference a nodegraph as the implementation of a nodedef. The only requirement is that the nodegraph and nodedef have matching inputs and outputs.
@@ -147,7 +147,7 @@ This is useful for creating a compound for a set of nodes performing some common
```
-**Figure 4**: Checker node implementation using a nodegraph.
+**Figure 4:** Checker node implementation using a nodegraph.
### 1.3.4 Dynamic Code Generation
In some situations static source code is not enough to implement a node. The code might need to be customized depending on parameters set on the node. Or for a hardware render target vertex streams or uniform inputs might need to be created in order to supply the data needed for the node implementation.
@@ -192,7 +192,7 @@ OslShaderGenerator::OslShaderGenerator() :
...
}
```
-**Figure 5**: C++ class for dynamic code generation.
+**Figure 5:** C++ class for dynamic code generation.
## 1.4 Shader Generation Steps
This section outlines the steps taken in general to produce a shader from the MaterialX description. The `ShaderGenerator` base class and its supporting classes will handle this for you, but it’s good to know the steps involved if custom changes are needed to support a new target.
@@ -305,7 +305,7 @@ class TexCoordGlsl : public ShaderNodeImpl
}
};
```
-**Figure 6**: Implementation of node `texcoord` in GLSL. Using a `ShaderNodeImpl` sub-class in order to control shader variable creation and code generation into separate shader stages.
+**Figure 6:** Implementation of node `texcoord` in GLSL. Using a `ShaderNodeImpl` sub-class in order to control shader variable creation and code generation into separate shader stages.
### 1.6.2 Variable Naming Convention
@@ -353,4 +353,4 @@ Uniform variables
| u_lightData[] | struct | Array of struct LightData holding parameters for active light sources. The `LightData` struct is built dynamically depending on requirements for bound light shaders. |
| u_\UnitTarget[] | integer | An attribute indicating the target unit for a given unit type definition (\). |
-**Figure 7** : Listing of predefined variables with their binding rules.
+**Figure 7:** Listing of predefined variables with their binding rules.
diff --git a/documents/DeveloperGuide/Viewer.md b/documents/DeveloperGuide/Viewer.md
index 1d3a1d7dcf..388132ff47 100644
--- a/documents/DeveloperGuide/Viewer.md
+++ b/documents/DeveloperGuide/Viewer.md
@@ -2,60 +2,72 @@
The MaterialX Viewer leverages shader generation to build GLSL shaders from MaterialX graphs, rendering the results using the NanoGUI framework. The standard set of pattern and physically based shading nodes is supported, and libraries of custom nodes can be included as additional library paths.
-### Example Images
+## Example Images
**Figure 1:** Procedural and uniform materials in the MaterialX viewer
-
-
-
-
+
+
+
+
**Figure 2:** Textured, color-space-managed materials in the MaterialX viewer
-
-
+
+
## Building The MaterialX Viewer
Select the `MATERIALX_BUILD_VIEWER` option in CMake to build the MaterialX Viewer. Installation will copy the **MaterialXView** executable to a `/bin` directory within the selected install folder.
-### Summary of Viewer Options
+## Summary of Viewer Options
-1. **Load Mesh**: Load a new geometry in the OBJ or glTF format.
-2. **Load Material**: Load a material document in the MTLX format.
-3. **Load Environment**: Load a lat-long environment light in the HDR format.
-4. **Property Editor**: View or edit properties of the current material.
-5. **Advanced Settings** : Asset and rendering options.
+1. **`Load Mesh`**: Load a new geometry in the OBJ or glTF format.
+2. **`Load Material`**: Load a material document in the MTLX format.
+3. **`Load Environment`**: Load a lat-long environment light in the HDR format.
+4. **`Property Editor`**: View or edit properties of the current material.
+5. **`Advanced Settings`** : Asset and rendering options.
-### Geometry
+## Geometry
-The default display geometry for the MaterialX viewer is the Arnold Shader Ball, which was contributed to the MaterialX project by the Solid Angle team at Autodesk. To change the display geometry, click `Load Mesh` and navigate to the [Geometry](../../resources/Geometry) folder for additional models in the OBJ format.
+The default display geometry for the MaterialX viewer is the Arnold Shader Ball, which was contributed to the MaterialX project by the Solid Angle team at Autodesk. To change the display geometry, click `Load Mesh` and navigate to the [Geometry](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/resources/Geometry) folder for additional models in the OBJ format.
If a loaded geometry contains more than one geometric group, then a `Select Geometry` drop-down box will appear, allowing the user to select which group is active. The active geometric group will be used for subsequent actions such as material assignment and rendering property changes.
-### Materials
+## Materials
-To change the displayed material, click `Load Material` and navigate to the [Materials/Examples/StandardSurface](../../resources/Materials/Examples/StandardSurface) or [Materials/Examples/UsdPreviewSurface](../../resources/Materials/Examples/UsdPreviewSurface) folders, which contain a selection of example materials in the MTLX format.
+To change the displayed material, click `Load Material` and navigate to the [Materials/Examples/StandardSurface](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/resources/Materials/Examples/StandardSurface) or [Materials/Examples/UsdPreviewSurface](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/resources/Materials/Examples/UsdPreviewSurface) folders, which contain a selection of example materials in the MTLX format.
Once a material is loaded into the viewer, its parameters may be inspected and adjusted by clicking the `Property Editor` and scrolling through the list of parameters. An edited material may be saved to the file system by clicking `Save Material`.
Multiple material documents can be combined in a single session by navigating to `Advanced Settings` and enabling `Merge Materials`. Loading new materials with this setting enabled will add them to the current material list, where they can be assigned to geometry via the `Assigned Material` drop-down box. Alternatively the `LEFT` and `RIGHT` arrows can be used to cycle through the list of available materials.
-If a material document containing `look` elements is loaded into the viewer, then any material assignments within the look will be applied to geometric groups that match the specified geometry strings. See [standard_surface_look_brass_tiled.mtlx](../../resources/Materials/Examples/StandardSurface/standard_surface_look_brass_tiled.mtlx) for an example of a material document containing look elements.
+If a material document containing `look` elements is loaded into the viewer, then any material assignments within the look will be applied to geometric groups that match the specified geometry strings. See [standard_surface_look_brass_tiled.mtlx](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/resources/Materials/Examples/StandardSurface/standard_surface_look_brass_tiled.mtlx) for an example of a material document containing look elements.
-### Lighting
+## Lighting
-The default lighting environment for the viewer is the San Giuseppe Bridge environment from HDRI Haven. To load another environment into the viewer, click `Load Environment` and navigate to the [Lights](../../resources/Lights) folder, or load any HDR environment in the latitude-longitude format. If the HDR file on disk has a companion MaterialX document with a matching name, then this document will be loaded as the direct lighting rig for the environment; otherwise only indirect lighting will be rendered. If the HDR file on disk has a companion image in an `irradiance` subfolder, then this image will be loaded as the diffuse convolution of the environment; otherwise, a diffuse convolution will be generated at load-time using spherical harmonics.
+The default lighting environment for the viewer is the San Giuseppe Bridge environment from HDRI Haven. To load another environment into the viewer, click `Load Environment` and navigate to the [Lights](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/resources/Lights) folder, or load any HDR environment in the latitude-longitude format. If the HDR file on disk has a companion MaterialX document with a matching name, then this document will be loaded as the direct lighting rig for the environment; otherwise only indirect lighting will be rendered. If the HDR file on disk has a companion image in an `irradiance` subfolder, then this image will be loaded as the diffuse convolution of the environment; otherwise, a diffuse convolution will be generated at load-time using spherical harmonics.
Shadow maps from the primary directional light may be enabled with the `Shadow Map` option under `Advanced Settings`. Ambient occlusion, if available for the given geometry, may be enabled with the `Ambient Occlusion` option. The fidelity of environment lighting may be improved by increasing the value of `Environment Samples`, though this requires additional GPU resources and can affect the interactivity of the viewer.
-### Images
+## Images
By default, the MaterialX viewer loads and saves image files using `stb_image`, which supports commmon 8-bit formats such as JPEG, PNG, TGA, and BMP, as well as the HDR format for high-dynamic-range images. If you need access to additional image formats such as EXR and TIFF, then the MaterialX viewer can be built with support for `OpenImageIO`. To build MaterialX with OpenImageIO, check the `MATERIALX_BUILD_OIIO` option in CMake, and specify the location of your OpenImageIO installation with the `MATERIALX_OIIO_DIR` option.
-### Keyboard Shortcuts
+## Keyboard Shortcuts
- `R`: Reload the current material from file. Hold `SHIFT` to reload all standard libraries as well.
- `G`: Save the current GLSL shader source to file.
@@ -74,7 +86,7 @@ By default, the MaterialX viewer loads and saves image files using `stb_image`,
- `+` : Zoom in with the camera.
- `-` : Zoom out with the camera.
-### Command-Line Options
+## Command-Line Options
The following are common command-line options for MaterialXView, and a complete list can be displayed with the `--help` option.
- `--material [FILENAME]` : Specify the filename of the MTLX document to be displayed in the viewer
From 29477f743575688cfd0ec4a937dafb1c7a1319ac Mon Sep 17 00:00:00 2001
From: Hridiza Roy <52705197+hridizaroy@users.noreply.github.com>
Date: Tue, 1 Oct 2024 12:32:42 -0400
Subject: [PATCH 02/80] Fix memory leaks in viewer property editor (#2043)
Fixed memory leaks in Viewer by making sure that _gridLayout3 in PropertyEditor gets connected to the top-level NanoGUI parent
---
source/MaterialXView/Editor.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/source/MaterialXView/Editor.cpp b/source/MaterialXView/Editor.cpp
index 090937d6e5..abba9ce10e 100644
--- a/source/MaterialXView/Editor.cpp
+++ b/source/MaterialXView/Editor.cpp
@@ -631,6 +631,8 @@ void PropertyEditor::updateContents(Viewer* viewer)
{
ng::Widget* twoColumns = new ng::Widget(_container);
twoColumns->set_layout(_gridLayout2);
+ ng::Widget* threeColumns = new ng::Widget(_container);
+ threeColumns->set_layout(_gridLayout3);
ng::Label* modelLabel = new ng::Label(twoColumns, "Shading Model");
modelLabel->set_font_size(20);
modelLabel->set_font("sans-bold");
From 0653e1da3753291616aa7be048738cd4aa9d9ddf Mon Sep 17 00:00:00 2001
From: rherrera-ilm
Date: Wed, 2 Oct 2024 13:41:57 -0700
Subject: [PATCH 03/80] Added attribute strings to Element class in Python API
(#2047)
This change fixes #1545
---
source/PyMaterialX/PyMaterialXCore/PyElement.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/source/PyMaterialX/PyMaterialXCore/PyElement.cpp b/source/PyMaterialX/PyMaterialXCore/PyElement.cpp
index 6e846c120e..9f35770e8b 100644
--- a/source/PyMaterialX/PyMaterialXCore/PyElement.cpp
+++ b/source/PyMaterialX/PyMaterialXCore/PyElement.cpp
@@ -103,6 +103,15 @@ void bindPyElement(py::module& mod)
py::arg("geom") = mx::EMPTY_STRING)
.def("asString", &mx::Element::asString)
.def("__str__", &mx::Element::asString)
+ .def_readonly_static("NAME_ATTRIBUTE", &mx::Element::NAME_ATTRIBUTE)
+ .def_readonly_static("FILE_PREFIX_ATTRIBUTE", &mx::Element::FILE_PREFIX_ATTRIBUTE)
+ .def_readonly_static("GEOM_PREFIX_ATTRIBUTE", &mx::Element::GEOM_PREFIX_ATTRIBUTE)
+ .def_readonly_static("COLOR_SPACE_ATTRIBUTE", &mx::Element::COLOR_SPACE_ATTRIBUTE)
+ .def_readonly_static("INHERIT_ATTRIBUTE", &mx::Element::INHERIT_ATTRIBUTE)
+ .def_readonly_static("NAMESPACE_ATTRIBUTE", &mx::Element::NAMESPACE_ATTRIBUTE)
+ .def_readonly_static("DOC_ATTRIBUTE", &mx::Element::DOC_ATTRIBUTE)
+ .def_readonly_static("XPOS_ATTRIBUTE", &mx::Element::XPOS_ATTRIBUTE)
+ .def_readonly_static("YPOS_ATTRIBUTE", &mx::Element::YPOS_ATTRIBUTE)
BIND_ELEMENT_FUNC_INSTANCE(Collection)
BIND_ELEMENT_FUNC_INSTANCE(Document)
BIND_ELEMENT_FUNC_INSTANCE(GeomInfo)
From 860b8d476ec73f4f939bb59c5f3f57ecf8e9442d Mon Sep 17 00:00:00 2001
From: Ethan Dobrowolski <67444514+edobrowo@users.noreply.github.com>
Date: Thu, 3 Oct 2024 11:23:49 -0400
Subject: [PATCH 04/80] Add support for viewdirection space in hardware shading
(#2036)
This addresses issue #1656.
Previously, attribute `space` in node `viewdirection_vector3` was unused by GLSL and MSL implementations. This change correctly transforms the view direction from world space to the specified space.
---
.../Nodes/HwViewDirectionNode.cpp | 26 ++++++++++++++++---
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/source/MaterialXGenShader/Nodes/HwViewDirectionNode.cpp b/source/MaterialXGenShader/Nodes/HwViewDirectionNode.cpp
index 819ac93029..9c92897be4 100644
--- a/source/MaterialXGenShader/Nodes/HwViewDirectionNode.cpp
+++ b/source/MaterialXGenShader/Nodes/HwViewDirectionNode.cpp
@@ -14,20 +14,31 @@ ShaderNodeImplPtr HwViewDirectionNode::create()
return std::make_shared();
}
-void HwViewDirectionNode::createVariables(const ShaderNode&, GenContext&, Shader& shader) const
+void HwViewDirectionNode::createVariables(const ShaderNode& node, GenContext&, Shader& shader) const
{
ShaderStage& vs = shader.getStage(Stage::VERTEX);
ShaderStage& ps = shader.getStage(Stage::PIXEL);
addStageInput(HW::VERTEX_INPUTS, Type::VECTOR3, HW::T_IN_POSITION, vs);
- addStageConnector(HW::VERTEX_DATA, Type::VECTOR3, HW::T_POSITION_WORLD, vs, ps);
+
+ const ShaderInput* spaceInput = node.getInput(SPACE);
+ const int space = spaceInput ? spaceInput->getValue()->asA() : OBJECT_SPACE;
+
addStageUniform(HW::PRIVATE_UNIFORMS, Type::VECTOR3, HW::T_VIEW_POSITION, ps);
+ addStageConnector(HW::VERTEX_DATA, Type::VECTOR3, HW::T_POSITION_WORLD, vs, ps);
+ if (space == OBJECT_SPACE || space == MODEL_SPACE)
+ {
+ addStageUniform(HW::PRIVATE_UNIFORMS, Type::MATRIX44, HW::T_WORLD_INVERSE_TRANSPOSE_MATRIX, ps);
+ }
}
void HwViewDirectionNode::emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const
{
const HwShaderGenerator& shadergen = static_cast(context.getShaderGenerator());
+ const ShaderInput* spaceInput = node.getInput(SPACE);
+ const int space = spaceInput ? spaceInput->getValue()->asA() : OBJECT_SPACE;
+
DEFINE_SHADER_STAGE(stage, Stage::VERTEX)
{
VariableBlock& vertexData = stage.getOutputBlock(HW::VERTEX_DATA);
@@ -44,10 +55,17 @@ void HwViewDirectionNode::emitFunctionCall(const ShaderNode& node, GenContext& c
{
VariableBlock& vertexData = stage.getInputBlock(HW::VERTEX_DATA);
const string prefix = shadergen.getVertexDataPrefix(vertexData);
- ShaderPort* position = vertexData[HW::T_POSITION_WORLD];
shadergen.emitLineBegin(stage);
shadergen.emitOutput(node.getOutput(), true, false, context, stage);
- shadergen.emitString(" = normalize(" + prefix + position->getVariable() + " - " + HW::T_VIEW_POSITION + ")", stage);
+ ShaderPort* position = vertexData[HW::T_POSITION_WORLD];
+ if (space == WORLD_SPACE)
+ {
+ shadergen.emitString(" = normalize(" + prefix + position->getVariable() + " - " + HW::T_VIEW_POSITION + ")", stage);
+ }
+ else
+ {
+ shadergen.emitString(" = normalize((" + HW::T_WORLD_INVERSE_TRANSPOSE_MATRIX + " * vec4(" + prefix + position->getVariable() + " - " + HW::T_VIEW_POSITION + ", 0.0)).xyz)", stage);
+ }
shadergen.emitLineEnd(stage);
}
}
From a11792ae92fb4ba0c6fe4410e0a9b0673c0dc74c Mon Sep 17 00:00:00 2001
From: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
Date: Thu, 3 Oct 2024 08:33:40 -0700
Subject: [PATCH 05/80] Improvements to PyMaterialX docstrings (#2039)
This PR tweaks the docstrings of all PyMaterialX* modules to be more descriptive.
---
source/PyMaterialX/PyMaterialXCore/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXFormat/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXGenGlsl/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXGenMdl/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXGenOsl/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXGenShader/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXRender/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXRenderGlsl/PyModule.cpp | 2 +-
source/PyMaterialX/PyMaterialXRenderMsl/PyModule.mm | 2 +-
source/PyMaterialX/PyMaterialXRenderOsl/PyModule.cpp | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/source/PyMaterialX/PyMaterialXCore/PyModule.cpp b/source/PyMaterialX/PyMaterialXCore/PyModule.cpp
index e2e8a0080f..c22b7de841 100644
--- a/source/PyMaterialX/PyMaterialXCore/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXCore/PyModule.cpp
@@ -26,7 +26,7 @@ void bindPyVariant(py::module& mod);
PYBIND11_MODULE(PyMaterialXCore, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXCore library";
+ mod.doc() = "Core MaterialX elements and graph traversal.";
bindPyElement(mod);
bindPyTraversal(mod);
diff --git a/source/PyMaterialX/PyMaterialXFormat/PyModule.cpp b/source/PyMaterialX/PyMaterialXFormat/PyModule.cpp
index 3965f48753..469ec43590 100644
--- a/source/PyMaterialX/PyMaterialXFormat/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXFormat/PyModule.cpp
@@ -13,7 +13,7 @@ void bindPyUtil(py::module& mod);
PYBIND11_MODULE(PyMaterialXFormat, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXFormat library";
+ mod.doc() = "Cross-platform support for document serialization and file utilities.";
// PyMaterialXFormat depends on types defined in PyMaterialXCore
PYMATERIALX_IMPORT_MODULE(PyMaterialXCore);
diff --git a/source/PyMaterialX/PyMaterialXGenGlsl/PyModule.cpp b/source/PyMaterialX/PyMaterialXGenGlsl/PyModule.cpp
index 9ab46e514d..448e1f4321 100644
--- a/source/PyMaterialX/PyMaterialXGenGlsl/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXGenGlsl/PyModule.cpp
@@ -14,7 +14,7 @@ void bindPyVkShaderGenerator(py::module& mod);
PYBIND11_MODULE(PyMaterialXGenGlsl, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXGenGlsl library";
+ mod.doc() = "Shader generation using the OpenGL Shading Language.";
// PyMaterialXGenGlsl depends on types defined in PyMaterialXGenShader
PYMATERIALX_IMPORT_MODULE(PyMaterialXGenShader);
diff --git a/source/PyMaterialX/PyMaterialXGenMdl/PyModule.cpp b/source/PyMaterialX/PyMaterialXGenMdl/PyModule.cpp
index a34b28a729..f656f9a395 100644
--- a/source/PyMaterialX/PyMaterialXGenMdl/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXGenMdl/PyModule.cpp
@@ -11,7 +11,7 @@ void bindPyMdlShaderGenerator(py::module& mod);
PYBIND11_MODULE(PyMaterialXGenMdl, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXGenMdl library";
+ mod.doc() = "Shader generation using the Material Definition Language.";
// PyMaterialXGenMdl depends on types defined in PyMaterialXGenShader
PYMATERIALX_IMPORT_MODULE(PyMaterialXGenShader);
diff --git a/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp b/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp
index b3dcdb10a8..454f04c9ee 100644
--- a/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp
@@ -12,7 +12,7 @@ void bindPyMslResourceBindingContext(py::module &mod);
PYBIND11_MODULE(PyMaterialXGenMsl, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXGenMsl library";
+ mod.doc() = "Shader generation using the Metal Shading Language.";
// PyMaterialXGenMsl depends on types defined in PyMaterialXGenShader
PYMATERIALX_IMPORT_MODULE(PyMaterialXGenShader);
diff --git a/source/PyMaterialX/PyMaterialXGenOsl/PyModule.cpp b/source/PyMaterialX/PyMaterialXGenOsl/PyModule.cpp
index 54d7d2439a..a503bacab5 100644
--- a/source/PyMaterialX/PyMaterialXGenOsl/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXGenOsl/PyModule.cpp
@@ -11,7 +11,7 @@ void bindPyOslShaderGenerator(py::module& mod);
PYBIND11_MODULE(PyMaterialXGenOsl, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXGenOsl library";
+ mod.doc() = "Shader generation using Open Shading Language.";
// PyMaterialXGenOsl depends on types defined in PyMaterialXGenShader
PYMATERIALX_IMPORT_MODULE(PyMaterialXGenShader);
diff --git a/source/PyMaterialX/PyMaterialXGenShader/PyModule.cpp b/source/PyMaterialX/PyMaterialXGenShader/PyModule.cpp
index f3dc613bff..a3f9911f33 100644
--- a/source/PyMaterialX/PyMaterialXGenShader/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXGenShader/PyModule.cpp
@@ -24,7 +24,7 @@ void bindPyUnitSystem(py::module& mod);
PYBIND11_MODULE(PyMaterialXGenShader, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXGenShader library";
+ mod.doc() = "Core shader generation support for MaterialX.";
bindPyColorManagement(mod);
bindPyShaderPort(mod);
diff --git a/source/PyMaterialX/PyMaterialXRender/PyModule.cpp b/source/PyMaterialX/PyMaterialXRender/PyModule.cpp
index bbf9688403..450b1dda69 100644
--- a/source/PyMaterialX/PyMaterialXRender/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXRender/PyModule.cpp
@@ -23,7 +23,7 @@ void bindPyCgltfLoader(py::module& mod);
PYBIND11_MODULE(PyMaterialXRender, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXRender library";
+ mod.doc() = "Core rendering support for MaterialX.";
// PyMaterialXRender depends on types defined in PyMaterialXCore
PYMATERIALX_IMPORT_MODULE(PyMaterialXCore);
diff --git a/source/PyMaterialX/PyMaterialXRenderGlsl/PyModule.cpp b/source/PyMaterialX/PyMaterialXRenderGlsl/PyModule.cpp
index d0ef04158d..69f5b3d353 100644
--- a/source/PyMaterialX/PyMaterialXRenderGlsl/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXRenderGlsl/PyModule.cpp
@@ -14,7 +14,7 @@ void bindPyTextureBaker(py::module& mod);
PYBIND11_MODULE(PyMaterialXRenderGlsl, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXRenderGlsl library";
+ mod.doc() = "Rendering support for the OpenGL Shading Language.";
// PyMaterialXRenderGlsl depends on types defined in PyMaterialXRender
PYMATERIALX_IMPORT_MODULE(PyMaterialXRender);
diff --git a/source/PyMaterialX/PyMaterialXRenderMsl/PyModule.mm b/source/PyMaterialX/PyMaterialXRenderMsl/PyModule.mm
index f4d0dbeaeb..63bd933591 100644
--- a/source/PyMaterialX/PyMaterialXRenderMsl/PyModule.mm
+++ b/source/PyMaterialX/PyMaterialXRenderMsl/PyModule.mm
@@ -14,7 +14,7 @@
PYBIND11_MODULE(PyMaterialXRenderMsl, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXRenderMsl library";
+ mod.doc() = "Rendering support for the Metal Shading Language.";
// PyMaterialXRenderMsl depends on types defined in PyMaterialXRender
PYMATERIALX_IMPORT_MODULE(PyMaterialXRender);
diff --git a/source/PyMaterialX/PyMaterialXRenderOsl/PyModule.cpp b/source/PyMaterialX/PyMaterialXRenderOsl/PyModule.cpp
index 4019d364ab..c013afef89 100644
--- a/source/PyMaterialX/PyMaterialXRenderOsl/PyModule.cpp
+++ b/source/PyMaterialX/PyMaterialXRenderOsl/PyModule.cpp
@@ -11,7 +11,7 @@ void bindPyOslRenderer(py::module& mod);
PYBIND11_MODULE(PyMaterialXRenderOsl, mod)
{
- mod.doc() = "Module containing Python bindings for the MaterialXRenderOsl library";
+ mod.doc() = "Rendering support for Open Shading Language.";
// PyMaterialXRenderOsl depends on types defined in PyMaterialXRender
PYMATERIALX_IMPORT_MODULE(PyMaterialXRender);
From 8357e1402bd875c8204ad8e8ac970ff6c1638cd6 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Sat, 5 Oct 2024 17:08:57 -0700
Subject: [PATCH 06/80] Updates to GitHub CI (#2050)
- Move static analysis testing to MacOS 14, which is a more optimized environment and has a more recent version of cppcheck.
- Upgrade to MacOS 13, as the MacOS 12 environment is now considered deprecated in GitHub CI.
---
.github/workflows/main.yml | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d6baf5dc10..dc73409606 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -37,8 +37,6 @@ jobs:
compiler: gcc
compiler_version: "14"
python: 3.12
- static_analysis: ON
- cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Linux_GCC_CoverageAnalysis
os: ubuntu-24.04
@@ -63,10 +61,10 @@ jobs:
test_render: ON
clang_format: ON
- - name: MacOS_Xcode_13_Python39
- os: macos-12
+ - name: MacOS_Xcode_14_Python39
+ os: macos-13
compiler: xcode
- compiler_version: "13.1"
+ compiler_version: "14.1"
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
python: 3.9
@@ -75,6 +73,8 @@ jobs:
compiler: xcode
compiler_version: "14.3"
python: 3.11
+ static_analysis: ON
+ cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: MacOS_Xcode_15_Python312
os: macos-14
@@ -245,10 +245,14 @@ jobs:
working-directory: build
- name: Static Analysis Tests
- if: matrix.static_analysis == 'ON' && runner.os == 'Linux'
+ if: matrix.static_analysis == 'ON'
run: |
- sudo apt-get install cppcheck
- cppcheck --project=build/compile_commands.json --error-exitcode=1 --suppress=*:*/External/* --suppress=*:*/NanoGUI/*
+ if [ "${{ runner.os }}" = "Linux" ]; then
+ sudo apt-get install cppcheck
+ else
+ brew install cppcheck
+ fi
+ cppcheck --project=build/compile_commands.json --error-exitcode=1 --suppress=normalCheckLevelMaxBranches --suppress=*:*/External/* --suppress=*:*/NanoGUI/*
- name: Initialize Virtual Framebuffer
if: matrix.test_render == 'ON' && runner.os == 'Linux'
From 19d69283f52e4d207ae412936371730011240bb1 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Sun, 6 Oct 2024 20:30:13 -0700
Subject: [PATCH 07/80] Update JavaScript packages (#2052)
This changelist updates all referenced JavaScript packages to their latest version via 'npm audit'.
---
javascript/MaterialXTest/package-lock.json | 1487 ++++++++++----------
javascript/MaterialXTest/package.json | 12 +-
javascript/MaterialXView/package-lock.json | 412 +++---
javascript/MaterialXView/package.json | 2 +-
4 files changed, 930 insertions(+), 983 deletions(-)
diff --git a/javascript/MaterialXTest/package-lock.json b/javascript/MaterialXTest/package-lock.json
index 4bd40a8468..d40a804991 100644
--- a/javascript/MaterialXTest/package-lock.json
+++ b/javascript/MaterialXTest/package-lock.json
@@ -9,17 +9,17 @@
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
- "@babel/core": "^7.24.7",
- "@babel/preset-env": "^7.24.7",
- "@babel/register": "^7.24.6",
- "chai": "^4.4.1",
+ "@babel/core": "^7.25.7",
+ "@babel/preset-env": "^7.25.7",
+ "@babel/register": "^7.25.7",
+ "chai": "^4.5.0",
"copyfiles": "^2.4.1",
- "karma": "^6.4.3",
+ "karma": "^6.4.4",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.2.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
- "mocha": "^10.4.0",
+ "mocha": "^10.7.3",
"rimraf": "^3.0.2"
}
},
@@ -38,13 +38,13 @@
}
},
"node_modules/@babel/code-frame": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz",
- "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz",
+ "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/highlight": "^7.24.7",
+ "@babel/highlight": "^7.25.7",
"picocolors": "^1.0.0"
},
"engines": {
@@ -52,9 +52,9 @@
}
},
"node_modules/@babel/compat-data": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz",
- "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.7.tgz",
+ "integrity": "sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -62,22 +62,22 @@
}
},
"node_modules/@babel/core": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz",
- "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.7.tgz",
+ "integrity": "sha512-yJ474Zv3cwiSOO9nXJuqzvwEeM+chDuQ8GJirw+pZ91sCGCyOZ3dJkVE09fTV0VEVzXyLWhh3G/AolYTPX7Mow==",
"dev": true,
"license": "MIT",
"dependencies": {
"@ampproject/remapping": "^2.2.0",
- "@babel/code-frame": "^7.24.7",
- "@babel/generator": "^7.24.7",
- "@babel/helper-compilation-targets": "^7.24.7",
- "@babel/helper-module-transforms": "^7.24.7",
- "@babel/helpers": "^7.24.7",
- "@babel/parser": "^7.24.7",
- "@babel/template": "^7.24.7",
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7",
+ "@babel/code-frame": "^7.25.7",
+ "@babel/generator": "^7.25.7",
+ "@babel/helper-compilation-targets": "^7.25.7",
+ "@babel/helper-module-transforms": "^7.25.7",
+ "@babel/helpers": "^7.25.7",
+ "@babel/parser": "^7.25.7",
+ "@babel/template": "^7.25.7",
+ "@babel/traverse": "^7.25.7",
+ "@babel/types": "^7.25.7",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -93,58 +93,58 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz",
- "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz",
+ "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.24.7",
+ "@babel/types": "^7.25.7",
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25",
- "jsesc": "^2.5.1"
+ "jsesc": "^3.0.2"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-annotate-as-pure": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz",
- "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.7.tgz",
+ "integrity": "sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.24.7"
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-builder-binary-assignment-operator-visitor": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz",
- "integrity": "sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.7.tgz",
+ "integrity": "sha512-12xfNeKNH7jubQNm7PAkzlLwEmCs1tfuX3UjIw6vP6QXi+leKh6+LyC/+Ed4EIQermwd58wsyh070yjDHFlNGg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/traverse": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-compilation-targets": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz",
- "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz",
+ "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/compat-data": "^7.24.7",
- "@babel/helper-validator-option": "^7.24.7",
- "browserslist": "^4.22.2",
+ "@babel/compat-data": "^7.25.7",
+ "@babel/helper-validator-option": "^7.25.7",
+ "browserslist": "^4.24.0",
"lru-cache": "^5.1.1",
"semver": "^6.3.1"
},
@@ -153,20 +153,18 @@
}
},
"node_modules/@babel/helper-create-class-features-plugin": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz",
- "integrity": "sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.7.tgz",
+ "integrity": "sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.24.7",
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-function-name": "^7.24.7",
- "@babel/helper-member-expression-to-functions": "^7.24.7",
- "@babel/helper-optimise-call-expression": "^7.24.7",
- "@babel/helper-replace-supers": "^7.24.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7",
- "@babel/helper-split-export-declaration": "^7.24.7",
+ "@babel/helper-annotate-as-pure": "^7.25.7",
+ "@babel/helper-member-expression-to-functions": "^7.25.7",
+ "@babel/helper-optimise-call-expression": "^7.25.7",
+ "@babel/helper-replace-supers": "^7.25.7",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7",
+ "@babel/traverse": "^7.25.7",
"semver": "^6.3.1"
},
"engines": {
@@ -177,14 +175,14 @@
}
},
"node_modules/@babel/helper-create-regexp-features-plugin": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz",
- "integrity": "sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.7.tgz",
+ "integrity": "sha512-byHhumTj/X47wJ6C6eLpK7wW/WBEcnUeb7D0FNc/jFQnQVw7DOso3Zz5u9x/zLrFVkHa89ZGDbkAa1D54NdrCQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.24.7",
- "regexpu-core": "^5.3.1",
+ "@babel/helper-annotate-as-pure": "^7.25.7",
+ "regexpu-core": "^6.1.1",
"semver": "^6.3.1"
},
"engines": {
@@ -211,86 +209,45 @@
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
}
},
- "node_modules/@babel/helper-environment-visitor": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz",
- "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/types": "^7.24.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-function-name": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz",
- "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/template": "^7.24.7",
- "@babel/types": "^7.24.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-hoist-variables": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz",
- "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/types": "^7.24.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
"node_modules/@babel/helper-member-expression-to-functions": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz",
- "integrity": "sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.7.tgz",
+ "integrity": "sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/traverse": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-module-imports": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz",
- "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz",
+ "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/traverse": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-module-transforms": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz",
- "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz",
+ "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-module-imports": "^7.24.7",
- "@babel/helper-simple-access": "^7.24.7",
- "@babel/helper-split-export-declaration": "^7.24.7",
- "@babel/helper-validator-identifier": "^7.24.7"
+ "@babel/helper-module-imports": "^7.25.7",
+ "@babel/helper-simple-access": "^7.25.7",
+ "@babel/helper-validator-identifier": "^7.25.7",
+ "@babel/traverse": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -300,22 +257,22 @@
}
},
"node_modules/@babel/helper-optimise-call-expression": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz",
- "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.7.tgz",
+ "integrity": "sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.24.7"
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-plugin-utils": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz",
- "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz",
+ "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -323,15 +280,15 @@
}
},
"node_modules/@babel/helper-remap-async-to-generator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz",
- "integrity": "sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.7.tgz",
+ "integrity": "sha512-kRGE89hLnPfcz6fTrlNU+uhgcwv0mBE4Gv3P9Ke9kLVJYpi4AMVVEElXvB5CabrPZW4nCM8P8UyyjrzCM0O2sw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.24.7",
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-wrap-function": "^7.24.7"
+ "@babel/helper-annotate-as-pure": "^7.25.7",
+ "@babel/helper-wrap-function": "^7.25.7",
+ "@babel/traverse": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -341,15 +298,15 @@
}
},
"node_modules/@babel/helper-replace-supers": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz",
- "integrity": "sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.7.tgz",
+ "integrity": "sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-member-expression-to-functions": "^7.24.7",
- "@babel/helper-optimise-call-expression": "^7.24.7"
+ "@babel/helper-member-expression-to-functions": "^7.25.7",
+ "@babel/helper-optimise-call-expression": "^7.25.7",
+ "@babel/traverse": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -359,50 +316,37 @@
}
},
"node_modules/@babel/helper-simple-access": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz",
- "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz",
+ "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/traverse": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-skip-transparent-expression-wrappers": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz",
- "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-split-export-declaration": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz",
- "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.7.tgz",
+ "integrity": "sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.24.7"
+ "@babel/traverse": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-string-parser": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz",
- "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz",
+ "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -410,9 +354,9 @@
}
},
"node_modules/@babel/helper-validator-identifier": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz",
- "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz",
+ "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -420,9 +364,9 @@
}
},
"node_modules/@babel/helper-validator-option": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz",
- "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz",
+ "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -430,43 +374,42 @@
}
},
"node_modules/@babel/helper-wrap-function": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz",
- "integrity": "sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.7.tgz",
+ "integrity": "sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-function-name": "^7.24.7",
- "@babel/template": "^7.24.7",
- "@babel/traverse": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/template": "^7.25.7",
+ "@babel/traverse": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helpers": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz",
- "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz",
+ "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/template": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/template": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/highlight": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz",
- "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz",
+ "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-validator-identifier": "^7.24.7",
+ "@babel/helper-validator-identifier": "^7.25.7",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0",
"picocolors": "^1.0.0"
@@ -476,11 +419,14 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz",
- "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.7.tgz",
+ "integrity": "sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==",
"dev": true,
"license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.25.7"
+ },
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -489,14 +435,30 @@
}
},
"node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz",
- "integrity": "sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.7.tgz",
+ "integrity": "sha512-UV9Lg53zyebzD1DwQoT9mzkEKa922LNUp5YkTJ6Uta0RbyXaQNUgcvSt7qIu1PpPzVb6rd10OVNTzkyBGeVmxQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/traverse": "^7.25.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": {
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.7.tgz",
+ "integrity": "sha512-GDDWeVLNxRIkQTnJn2pDOM1pkCgYdSqPeT1a9vh9yIqu2uzzgw1zcqEb+IJOhy+dTBMlNdThrDIksr2o09qrrQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -506,13 +468,13 @@
}
},
"node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz",
- "integrity": "sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.7.tgz",
+ "integrity": "sha512-wxyWg2RYaSUYgmd9MR0FyRGyeOMQE/Uzr1wzd/g5cf5bwi9A4v6HFdDm7y1MgDtod/fLOSTZY6jDgV0xU9d5bA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -522,15 +484,15 @@
}
},
"node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz",
- "integrity": "sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.7.tgz",
+ "integrity": "sha512-Xwg6tZpLxc4iQjorYsyGMyfJE7nP5MV8t/Ka58BgiA7Jw0fRqQNcANlLfdJ/yvBt9z9LD2We+BEkT7vLqZRWng==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7",
- "@babel/plugin-transform-optional-chaining": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7",
+ "@babel/plugin-transform-optional-chaining": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -540,14 +502,14 @@
}
},
"node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz",
- "integrity": "sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.7.tgz",
+ "integrity": "sha512-UVATLMidXrnH+GMUIuxq55nejlj02HP7F5ETyBONzP6G87fPBogG4CH6kxrSrdIuAjdwNO9VzyaYsrZPscWUrw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/traverse": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -638,13 +600,13 @@
}
},
"node_modules/@babel/plugin-syntax-import-assertions": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz",
- "integrity": "sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.7.tgz",
+ "integrity": "sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -654,13 +616,13 @@
}
},
"node_modules/@babel/plugin-syntax-import-attributes": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz",
- "integrity": "sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz",
+ "integrity": "sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -823,13 +785,13 @@
}
},
"node_modules/@babel/plugin-transform-arrow-functions": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz",
- "integrity": "sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.7.tgz",
+ "integrity": "sha512-EJN2mKxDwfOUCPxMO6MUI58RN3ganiRAG/MS/S3HfB6QFNjroAMelQo/gybyYq97WerCBAZoyrAoW8Tzdq2jWg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -839,16 +801,16 @@
}
},
"node_modules/@babel/plugin-transform-async-generator-functions": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz",
- "integrity": "sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.7.tgz",
+ "integrity": "sha512-4B6OhTrwYKHYYgcwErvZjbmH9X5TxQBsaBHdzEIB4l71gR5jh/tuHGlb9in47udL2+wVUcOz5XXhhfhVJwEpEg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-remap-async-to-generator": "^7.24.7",
- "@babel/plugin-syntax-async-generators": "^7.8.4"
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-remap-async-to-generator": "^7.25.7",
+ "@babel/plugin-syntax-async-generators": "^7.8.4",
+ "@babel/traverse": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -858,15 +820,15 @@
}
},
"node_modules/@babel/plugin-transform-async-to-generator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz",
- "integrity": "sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.7.tgz",
+ "integrity": "sha512-ZUCjAavsh5CESCmi/xCpX1qcCaAglzs/7tmuvoFnJgA1dM7gQplsguljoTg+Ru8WENpX89cQyAtWoaE0I3X3Pg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-module-imports": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-remap-async-to-generator": "^7.24.7"
+ "@babel/helper-module-imports": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-remap-async-to-generator": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -876,13 +838,13 @@
}
},
"node_modules/@babel/plugin-transform-block-scoped-functions": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz",
- "integrity": "sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.7.tgz",
+ "integrity": "sha512-xHttvIM9fvqW+0a3tZlYcZYSBpSWzGBFIt/sYG3tcdSzBB8ZeVgz2gBP7Df+sM0N1850jrviYSSeUuc+135dmQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -892,13 +854,13 @@
}
},
"node_modules/@babel/plugin-transform-block-scoping": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz",
- "integrity": "sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.7.tgz",
+ "integrity": "sha512-ZEPJSkVZaeTFG/m2PARwLZQ+OG0vFIhPlKHK/JdIMy8DbRJ/htz6LRrTFtdzxi9EHmcwbNPAKDnadpNSIW+Aow==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -908,14 +870,14 @@
}
},
"node_modules/@babel/plugin-transform-class-properties": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz",
- "integrity": "sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.7.tgz",
+ "integrity": "sha512-mhyfEW4gufjIqYFo9krXHJ3ElbFLIze5IDp+wQTxoPd+mwFb1NxatNAwmv8Q8Iuxv7Zc+q8EkiMQwc9IhyGf4g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-create-class-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -925,14 +887,14 @@
}
},
"node_modules/@babel/plugin-transform-class-static-block": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz",
- "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.7.tgz",
+ "integrity": "sha512-rvUUtoVlkDWtDWxGAiiQj0aNktTPn3eFynBcMC2IhsXweehwgdI9ODe+XjWw515kEmv22sSOTp/rxIRuTiB7zg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-create-class-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-class-static-block": "^7.14.5"
},
"engines": {
@@ -943,19 +905,17 @@
}
},
"node_modules/@babel/plugin-transform-classes": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz",
- "integrity": "sha512-CFbbBigp8ln4FU6Bpy6g7sE8B/WmCmzvivzUC6xDAdWVsjYTXijpuuGJmYkAaoWAzcItGKT3IOAbxRItZ5HTjw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.7.tgz",
+ "integrity": "sha512-9j9rnl+YCQY0IGoeipXvnk3niWicIB6kCsWRGLwX241qSXpbA4MKxtp/EdvFxsc4zI5vqfLxzOd0twIJ7I99zg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.24.7",
- "@babel/helper-compilation-targets": "^7.24.7",
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-function-name": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-replace-supers": "^7.24.7",
- "@babel/helper-split-export-declaration": "^7.24.7",
+ "@babel/helper-annotate-as-pure": "^7.25.7",
+ "@babel/helper-compilation-targets": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-replace-supers": "^7.25.7",
+ "@babel/traverse": "^7.25.7",
"globals": "^11.1.0"
},
"engines": {
@@ -966,14 +926,14 @@
}
},
"node_modules/@babel/plugin-transform-computed-properties": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz",
- "integrity": "sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.7.tgz",
+ "integrity": "sha512-QIv+imtM+EtNxg/XBKL3hiWjgdLjMOmZ+XzQwSgmBfKbfxUjBzGgVPklUuE55eq5/uVoh8gg3dqlrwR/jw3ZeA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/template": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/template": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -983,13 +943,13 @@
}
},
"node_modules/@babel/plugin-transform-destructuring": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz",
- "integrity": "sha512-19eJO/8kdCQ9zISOf+SEUJM/bAUIsvY3YDnXZTupUCQ8LgrWnsG/gFB9dvXqdXnRXMAM8fvt7b0CBKQHNGy1mw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.7.tgz",
+ "integrity": "sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -999,14 +959,14 @@
}
},
"node_modules/@babel/plugin-transform-dotall-regex": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz",
- "integrity": "sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.7.tgz",
+ "integrity": "sha512-kXzXMMRzAtJdDEgQBLF4oaiT6ZCU3oWHgpARnTKDAqPkDJ+bs3NrZb310YYevR5QlRo3Kn7dzzIdHbZm1VzJdQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-create-regexp-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1016,13 +976,13 @@
}
},
"node_modules/@babel/plugin-transform-duplicate-keys": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz",
- "integrity": "sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.7.tgz",
+ "integrity": "sha512-by+v2CjoL3aMnWDOyCIg+yxU9KXSRa9tN6MbqggH5xvymmr9p4AMjYkNlQy4brMceBnUyHZ9G8RnpvT8wP7Cfg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1031,14 +991,31 @@
"@babel/core": "^7.0.0-0"
}
},
+ "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": {
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.7.tgz",
+ "integrity": "sha512-HvS6JF66xSS5rNKXLqkk7L9c/jZ/cdIVIcoPVrnl8IsVpLggTjXs8OWekbLHs/VtYDDh5WXnQyeE3PPUGm22MA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
"node_modules/@babel/plugin-transform-dynamic-import": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz",
- "integrity": "sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.7.tgz",
+ "integrity": "sha512-UvcLuual4h7/GfylKm2IAA3aph9rwvAM2XBA0uPKU3lca+Maai4jBjjEVUS568ld6kJcgbouuumCBhMd/Yz17w==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3"
},
"engines": {
@@ -1049,14 +1026,14 @@
}
},
"node_modules/@babel/plugin-transform-exponentiation-operator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz",
- "integrity": "sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.7.tgz",
+ "integrity": "sha512-yjqtpstPfZ0h/y40fAXRv2snciYr0OAoMXY/0ClC7tm4C/nG5NJKmIItlaYlLbIVAWNfrYuy9dq1bE0SbX0PEg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1066,13 +1043,13 @@
}
},
"node_modules/@babel/plugin-transform-export-namespace-from": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz",
- "integrity": "sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.7.tgz",
+ "integrity": "sha512-h3MDAP5l34NQkkNulsTNyjdaR+OiB0Im67VU//sFupouP8Q6m9Spy7l66DcaAQxtmCqGdanPByLsnwFttxKISQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3"
},
"engines": {
@@ -1083,14 +1060,14 @@
}
},
"node_modules/@babel/plugin-transform-for-of": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz",
- "integrity": "sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.7.tgz",
+ "integrity": "sha512-n/TaiBGJxYFWvpJDfsxSj9lEEE44BFM1EPGz4KEiTipTgkoFVVcCmzAL3qA7fdQU96dpo4gGf5HBx/KnDvqiHw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1100,15 +1077,15 @@
}
},
"node_modules/@babel/plugin-transform-function-name": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz",
- "integrity": "sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.7.tgz",
+ "integrity": "sha512-5MCTNcjCMxQ63Tdu9rxyN6cAWurqfrDZ76qvVPrGYdBxIj+EawuuxTu/+dgJlhK5eRz3v1gLwp6XwS8XaX2NiQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-compilation-targets": "^7.24.7",
- "@babel/helper-function-name": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-compilation-targets": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/traverse": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1118,13 +1095,13 @@
}
},
"node_modules/@babel/plugin-transform-json-strings": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz",
- "integrity": "sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.7.tgz",
+ "integrity": "sha512-Ot43PrL9TEAiCe8C/2erAjXMeVSnE/BLEx6eyrKLNFCCw5jvhTHKyHxdI1pA0kz5njZRYAnMO2KObGqOCRDYSA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-json-strings": "^7.8.3"
},
"engines": {
@@ -1135,13 +1112,13 @@
}
},
"node_modules/@babel/plugin-transform-literals": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz",
- "integrity": "sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.7.tgz",
+ "integrity": "sha512-fwzkLrSu2fESR/cm4t6vqd7ebNIopz2QHGtjoU+dswQo/P6lwAG04Q98lliE3jkz/XqnbGFLnUcE0q0CVUf92w==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1151,13 +1128,13 @@
}
},
"node_modules/@babel/plugin-transform-logical-assignment-operators": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz",
- "integrity": "sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.7.tgz",
+ "integrity": "sha512-iImzbA55BjiovLyG2bggWS+V+OLkaBorNvc/yJoeeDQGztknRnDdYfp2d/UPmunZYEnZi6Lg8QcTmNMHOB0lGA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
},
"engines": {
@@ -1168,13 +1145,13 @@
}
},
"node_modules/@babel/plugin-transform-member-expression-literals": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz",
- "integrity": "sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.7.tgz",
+ "integrity": "sha512-Std3kXwpXfRV0QtQy5JJcRpkqP8/wG4XL7hSKZmGlxPlDqmpXtEPRmhF7ztnlTCtUN3eXRUJp+sBEZjaIBVYaw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1184,14 +1161,14 @@
}
},
"node_modules/@babel/plugin-transform-modules-amd": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz",
- "integrity": "sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.7.tgz",
+ "integrity": "sha512-CgselSGCGzjQvKzghCvDTxKHP3iooenLpJDO842ehn5D2G5fJB222ptnDwQho0WjEvg7zyoxb9P+wiYxiJX5yA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-module-transforms": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-module-transforms": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1201,15 +1178,15 @@
}
},
"node_modules/@babel/plugin-transform-modules-commonjs": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz",
- "integrity": "sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.7.tgz",
+ "integrity": "sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-module-transforms": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-simple-access": "^7.24.7"
+ "@babel/helper-module-transforms": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-simple-access": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1219,16 +1196,16 @@
}
},
"node_modules/@babel/plugin-transform-modules-systemjs": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz",
- "integrity": "sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.7.tgz",
+ "integrity": "sha512-t9jZIvBmOXJsiuyOwhrIGs8dVcD6jDyg2icw1VL4A/g+FnWyJKwUfSSU2nwJuMV2Zqui856El9u+ElB+j9fV1g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-hoist-variables": "^7.24.7",
- "@babel/helper-module-transforms": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-validator-identifier": "^7.24.7"
+ "@babel/helper-module-transforms": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-validator-identifier": "^7.25.7",
+ "@babel/traverse": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1238,14 +1215,14 @@
}
},
"node_modules/@babel/plugin-transform-modules-umd": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz",
- "integrity": "sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.7.tgz",
+ "integrity": "sha512-p88Jg6QqsaPh+EB7I9GJrIqi1Zt4ZBHUQtjw3z1bzEXcLh6GfPqzZJ6G+G1HBGKUNukT58MnKG7EN7zXQBCODw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-module-transforms": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-module-transforms": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1255,14 +1232,14 @@
}
},
"node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz",
- "integrity": "sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.7.tgz",
+ "integrity": "sha512-BtAT9LzCISKG3Dsdw5uso4oV1+v2NlVXIIomKJgQybotJY3OwCwJmkongjHgwGKoZXd0qG5UZ12JUlDQ07W6Ow==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-create-regexp-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1272,13 +1249,13 @@
}
},
"node_modules/@babel/plugin-transform-new-target": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz",
- "integrity": "sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.7.tgz",
+ "integrity": "sha512-CfCS2jDsbcZaVYxRFo2qtavW8SpdzmBXC2LOI4oO0rP+JSRDxxF3inF4GcPsLgfb5FjkhXG5/yR/lxuRs2pySA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1288,13 +1265,13 @@
}
},
"node_modules/@babel/plugin-transform-nullish-coalescing-operator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz",
- "integrity": "sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.7.tgz",
+ "integrity": "sha512-FbuJ63/4LEL32mIxrxwYaqjJxpbzxPVQj5a+Ebrc8JICV6YX8nE53jY+K0RZT3um56GoNWgkS2BQ/uLGTjtwfw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
},
"engines": {
@@ -1305,13 +1282,13 @@
}
},
"node_modules/@babel/plugin-transform-numeric-separator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz",
- "integrity": "sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.7.tgz",
+ "integrity": "sha512-8CbutzSSh4hmD+jJHIA8vdTNk15kAzOnFLVVgBSMGr28rt85ouT01/rezMecks9pkU939wDInImwCKv4ahU4IA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-numeric-separator": "^7.10.4"
},
"engines": {
@@ -1322,16 +1299,16 @@
}
},
"node_modules/@babel/plugin-transform-object-rest-spread": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz",
- "integrity": "sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.7.tgz",
+ "integrity": "sha512-1JdVKPhD7Y5PvgfFy0Mv2brdrolzpzSoUq2pr6xsR+m+3viGGeHEokFKsCgOkbeFOQxfB1Vt2F0cPJLRpFI4Zg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-compilation-targets": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-compilation-targets": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
- "@babel/plugin-transform-parameters": "^7.24.7"
+ "@babel/plugin-transform-parameters": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1341,14 +1318,14 @@
}
},
"node_modules/@babel/plugin-transform-object-super": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz",
- "integrity": "sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.7.tgz",
+ "integrity": "sha512-pWT6UXCEW3u1t2tcAGtE15ornCBvopHj9Bps9D2DsH15APgNVOTwwczGckX+WkAvBmuoYKRCFa4DK+jM8vh5AA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-replace-supers": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-replace-supers": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1358,13 +1335,13 @@
}
},
"node_modules/@babel/plugin-transform-optional-catch-binding": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz",
- "integrity": "sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.7.tgz",
+ "integrity": "sha512-m9obYBA39mDPN7lJzD5WkGGb0GO54PPLXsbcnj1Hyeu8mSRz7Gb4b1A6zxNX32ZuUySDK4G6it8SDFWD1nCnqg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3"
},
"engines": {
@@ -1375,14 +1352,14 @@
}
},
"node_modules/@babel/plugin-transform-optional-chaining": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz",
- "integrity": "sha512-tK+0N9yd4j+x/4hxF3F0e0fu/VdcxU18y5SevtyM/PCFlQvXbR0Zmlo2eBrKtVipGNFzpq56o8WsIIKcJFUCRQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.7.tgz",
+ "integrity": "sha512-h39agClImgPWg4H8mYVAbD1qP9vClFbEjqoJmt87Zen8pjqK8FTPUwrOXAvqu5soytwxrLMd2fx2KSCp2CHcNg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7",
"@babel/plugin-syntax-optional-chaining": "^7.8.3"
},
"engines": {
@@ -1393,13 +1370,13 @@
}
},
"node_modules/@babel/plugin-transform-parameters": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz",
- "integrity": "sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.7.tgz",
+ "integrity": "sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1409,14 +1386,14 @@
}
},
"node_modules/@babel/plugin-transform-private-methods": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz",
- "integrity": "sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.7.tgz",
+ "integrity": "sha512-KY0hh2FluNxMLwOCHbxVOKfdB5sjWG4M183885FmaqWWiGMhRZq4DQRKH6mHdEucbJnyDyYiZNwNG424RymJjA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-create-class-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1426,15 +1403,15 @@
}
},
"node_modules/@babel/plugin-transform-private-property-in-object": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz",
- "integrity": "sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.7.tgz",
+ "integrity": "sha512-LzA5ESzBy7tqj00Yjey9yWfs3FKy4EmJyKOSWld144OxkTji81WWnUT8nkLUn+imN/zHL8ZQlOu/MTUAhHaX3g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.24.7",
- "@babel/helper-create-class-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-annotate-as-pure": "^7.25.7",
+ "@babel/helper-create-class-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"@babel/plugin-syntax-private-property-in-object": "^7.14.5"
},
"engines": {
@@ -1445,13 +1422,13 @@
}
},
"node_modules/@babel/plugin-transform-property-literals": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz",
- "integrity": "sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.7.tgz",
+ "integrity": "sha512-lQEeetGKfFi0wHbt8ClQrUSUMfEeI3MMm74Z73T9/kuz990yYVtfofjf3NuA42Jy3auFOpbjDyCSiIkTs1VIYw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1461,13 +1438,13 @@
}
},
"node_modules/@babel/plugin-transform-regenerator": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz",
- "integrity": "sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.7.tgz",
+ "integrity": "sha512-mgDoQCRjrY3XK95UuV60tZlFCQGXEtMg8H+IsW72ldw1ih1jZhzYXbJvghmAEpg5UVhhnCeia1CkGttUvCkiMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
"regenerator-transform": "^0.15.2"
},
"engines": {
@@ -1478,13 +1455,13 @@
}
},
"node_modules/@babel/plugin-transform-reserved-words": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz",
- "integrity": "sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.7.tgz",
+ "integrity": "sha512-3OfyfRRqiGeOvIWSagcwUTVk2hXBsr/ww7bLn6TRTuXnexA+Udov2icFOxFX9abaj4l96ooYkcNN1qi2Zvqwng==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1494,13 +1471,13 @@
}
},
"node_modules/@babel/plugin-transform-shorthand-properties": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz",
- "integrity": "sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.7.tgz",
+ "integrity": "sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1510,14 +1487,14 @@
}
},
"node_modules/@babel/plugin-transform-spread": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz",
- "integrity": "sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.7.tgz",
+ "integrity": "sha512-Mm6aeymI0PBh44xNIv/qvo8nmbkpZze1KvR8MkEqbIREDxoiWTi18Zr2jryfRMwDfVZF9foKh060fWgni44luw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1527,13 +1504,13 @@
}
},
"node_modules/@babel/plugin-transform-sticky-regex": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz",
- "integrity": "sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.7.tgz",
+ "integrity": "sha512-ZFAeNkpGuLnAQ/NCsXJ6xik7Id+tHuS+NT+ue/2+rn/31zcdnupCdmunOizEaP0JsUmTFSTOPoQY7PkK2pttXw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1543,13 +1520,13 @@
}
},
"node_modules/@babel/plugin-transform-template-literals": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz",
- "integrity": "sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.7.tgz",
+ "integrity": "sha512-SI274k0nUsFFmyQupiO7+wKATAmMFf8iFgq2O+vVFXZ0SV9lNfT1NGzBEhjquFmD8I9sqHLguH+gZVN3vww2AA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1559,13 +1536,13 @@
}
},
"node_modules/@babel/plugin-transform-typeof-symbol": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz",
- "integrity": "sha512-VtR8hDy7YLB7+Pet9IarXjg/zgCMSF+1mNS/EQEiEaUPoFXCVsHG64SIxcaaI2zJgRiv+YmgaQESUfWAdbjzgg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.7.tgz",
+ "integrity": "sha512-OmWmQtTHnO8RSUbL0NTdtpbZHeNTnm68Gj5pA4Y2blFNh+V4iZR68V1qL9cI37J21ZN7AaCnkfdHtLExQPf2uA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1575,13 +1552,13 @@
}
},
"node_modules/@babel/plugin-transform-unicode-escapes": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz",
- "integrity": "sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.7.tgz",
+ "integrity": "sha512-BN87D7KpbdiABA+t3HbVqHzKWUDN3dymLaTnPFAMyc8lV+KN3+YzNhVRNdinaCPA4AUqx7ubXbQ9shRjYBl3SQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1591,14 +1568,14 @@
}
},
"node_modules/@babel/plugin-transform-unicode-property-regex": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz",
- "integrity": "sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.7.tgz",
+ "integrity": "sha512-IWfR89zcEPQGB/iB408uGtSPlQd3Jpq11Im86vUgcmSTcoWAiQMCTOa2K2yNNqFJEBVICKhayctee65Ka8OB0w==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-create-regexp-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1608,14 +1585,14 @@
}
},
"node_modules/@babel/plugin-transform-unicode-regex": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz",
- "integrity": "sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.7.tgz",
+ "integrity": "sha512-8JKfg/hiuA3qXnlLx8qtv5HWRbgyFx2hMMtpDDuU2rTckpKkGu4ycK5yYHwuEa16/quXfoxHBIApEsNyMWnt0g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-create-regexp-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1625,14 +1602,14 @@
}
},
"node_modules/@babel/plugin-transform-unicode-sets-regex": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz",
- "integrity": "sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.7.tgz",
+ "integrity": "sha512-YRW8o9vzImwmh4Q3Rffd09bH5/hvY0pxg+1H1i0f7APoUeg12G7+HhLj9ZFNIrYkgBXhIijPJ+IXypN0hLTIbw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7"
+ "@babel/helper-create-regexp-features-plugin": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
@@ -1642,28 +1619,29 @@
}
},
"node_modules/@babel/preset-env": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.7.tgz",
- "integrity": "sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.7.tgz",
+ "integrity": "sha512-Gibz4OUdyNqqLj+7OAvBZxOD7CklCtMA5/j0JgUEwOnaRULsPDXmic2iKxL2DX2vQduPR5wH2hjZas/Vr/Oc0g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/compat-data": "^7.24.7",
- "@babel/helper-compilation-targets": "^7.24.7",
- "@babel/helper-plugin-utils": "^7.24.7",
- "@babel/helper-validator-option": "^7.24.7",
- "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7",
- "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7",
- "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7",
- "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.7",
+ "@babel/compat-data": "^7.25.7",
+ "@babel/helper-compilation-targets": "^7.25.7",
+ "@babel/helper-plugin-utils": "^7.25.7",
+ "@babel/helper-validator-option": "^7.25.7",
+ "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.7",
+ "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.7",
+ "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.7",
+ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.7",
+ "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.7",
"@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
"@babel/plugin-syntax-async-generators": "^7.8.4",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3",
- "@babel/plugin-syntax-import-assertions": "^7.24.7",
- "@babel/plugin-syntax-import-attributes": "^7.24.7",
+ "@babel/plugin-syntax-import-assertions": "^7.25.7",
+ "@babel/plugin-syntax-import-attributes": "^7.25.7",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-syntax-json-strings": "^7.8.3",
"@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
@@ -1675,59 +1653,60 @@
"@babel/plugin-syntax-private-property-in-object": "^7.14.5",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
- "@babel/plugin-transform-arrow-functions": "^7.24.7",
- "@babel/plugin-transform-async-generator-functions": "^7.24.7",
- "@babel/plugin-transform-async-to-generator": "^7.24.7",
- "@babel/plugin-transform-block-scoped-functions": "^7.24.7",
- "@babel/plugin-transform-block-scoping": "^7.24.7",
- "@babel/plugin-transform-class-properties": "^7.24.7",
- "@babel/plugin-transform-class-static-block": "^7.24.7",
- "@babel/plugin-transform-classes": "^7.24.7",
- "@babel/plugin-transform-computed-properties": "^7.24.7",
- "@babel/plugin-transform-destructuring": "^7.24.7",
- "@babel/plugin-transform-dotall-regex": "^7.24.7",
- "@babel/plugin-transform-duplicate-keys": "^7.24.7",
- "@babel/plugin-transform-dynamic-import": "^7.24.7",
- "@babel/plugin-transform-exponentiation-operator": "^7.24.7",
- "@babel/plugin-transform-export-namespace-from": "^7.24.7",
- "@babel/plugin-transform-for-of": "^7.24.7",
- "@babel/plugin-transform-function-name": "^7.24.7",
- "@babel/plugin-transform-json-strings": "^7.24.7",
- "@babel/plugin-transform-literals": "^7.24.7",
- "@babel/plugin-transform-logical-assignment-operators": "^7.24.7",
- "@babel/plugin-transform-member-expression-literals": "^7.24.7",
- "@babel/plugin-transform-modules-amd": "^7.24.7",
- "@babel/plugin-transform-modules-commonjs": "^7.24.7",
- "@babel/plugin-transform-modules-systemjs": "^7.24.7",
- "@babel/plugin-transform-modules-umd": "^7.24.7",
- "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7",
- "@babel/plugin-transform-new-target": "^7.24.7",
- "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
- "@babel/plugin-transform-numeric-separator": "^7.24.7",
- "@babel/plugin-transform-object-rest-spread": "^7.24.7",
- "@babel/plugin-transform-object-super": "^7.24.7",
- "@babel/plugin-transform-optional-catch-binding": "^7.24.7",
- "@babel/plugin-transform-optional-chaining": "^7.24.7",
- "@babel/plugin-transform-parameters": "^7.24.7",
- "@babel/plugin-transform-private-methods": "^7.24.7",
- "@babel/plugin-transform-private-property-in-object": "^7.24.7",
- "@babel/plugin-transform-property-literals": "^7.24.7",
- "@babel/plugin-transform-regenerator": "^7.24.7",
- "@babel/plugin-transform-reserved-words": "^7.24.7",
- "@babel/plugin-transform-shorthand-properties": "^7.24.7",
- "@babel/plugin-transform-spread": "^7.24.7",
- "@babel/plugin-transform-sticky-regex": "^7.24.7",
- "@babel/plugin-transform-template-literals": "^7.24.7",
- "@babel/plugin-transform-typeof-symbol": "^7.24.7",
- "@babel/plugin-transform-unicode-escapes": "^7.24.7",
- "@babel/plugin-transform-unicode-property-regex": "^7.24.7",
- "@babel/plugin-transform-unicode-regex": "^7.24.7",
- "@babel/plugin-transform-unicode-sets-regex": "^7.24.7",
+ "@babel/plugin-transform-arrow-functions": "^7.25.7",
+ "@babel/plugin-transform-async-generator-functions": "^7.25.7",
+ "@babel/plugin-transform-async-to-generator": "^7.25.7",
+ "@babel/plugin-transform-block-scoped-functions": "^7.25.7",
+ "@babel/plugin-transform-block-scoping": "^7.25.7",
+ "@babel/plugin-transform-class-properties": "^7.25.7",
+ "@babel/plugin-transform-class-static-block": "^7.25.7",
+ "@babel/plugin-transform-classes": "^7.25.7",
+ "@babel/plugin-transform-computed-properties": "^7.25.7",
+ "@babel/plugin-transform-destructuring": "^7.25.7",
+ "@babel/plugin-transform-dotall-regex": "^7.25.7",
+ "@babel/plugin-transform-duplicate-keys": "^7.25.7",
+ "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.7",
+ "@babel/plugin-transform-dynamic-import": "^7.25.7",
+ "@babel/plugin-transform-exponentiation-operator": "^7.25.7",
+ "@babel/plugin-transform-export-namespace-from": "^7.25.7",
+ "@babel/plugin-transform-for-of": "^7.25.7",
+ "@babel/plugin-transform-function-name": "^7.25.7",
+ "@babel/plugin-transform-json-strings": "^7.25.7",
+ "@babel/plugin-transform-literals": "^7.25.7",
+ "@babel/plugin-transform-logical-assignment-operators": "^7.25.7",
+ "@babel/plugin-transform-member-expression-literals": "^7.25.7",
+ "@babel/plugin-transform-modules-amd": "^7.25.7",
+ "@babel/plugin-transform-modules-commonjs": "^7.25.7",
+ "@babel/plugin-transform-modules-systemjs": "^7.25.7",
+ "@babel/plugin-transform-modules-umd": "^7.25.7",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.7",
+ "@babel/plugin-transform-new-target": "^7.25.7",
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.7",
+ "@babel/plugin-transform-numeric-separator": "^7.25.7",
+ "@babel/plugin-transform-object-rest-spread": "^7.25.7",
+ "@babel/plugin-transform-object-super": "^7.25.7",
+ "@babel/plugin-transform-optional-catch-binding": "^7.25.7",
+ "@babel/plugin-transform-optional-chaining": "^7.25.7",
+ "@babel/plugin-transform-parameters": "^7.25.7",
+ "@babel/plugin-transform-private-methods": "^7.25.7",
+ "@babel/plugin-transform-private-property-in-object": "^7.25.7",
+ "@babel/plugin-transform-property-literals": "^7.25.7",
+ "@babel/plugin-transform-regenerator": "^7.25.7",
+ "@babel/plugin-transform-reserved-words": "^7.25.7",
+ "@babel/plugin-transform-shorthand-properties": "^7.25.7",
+ "@babel/plugin-transform-spread": "^7.25.7",
+ "@babel/plugin-transform-sticky-regex": "^7.25.7",
+ "@babel/plugin-transform-template-literals": "^7.25.7",
+ "@babel/plugin-transform-typeof-symbol": "^7.25.7",
+ "@babel/plugin-transform-unicode-escapes": "^7.25.7",
+ "@babel/plugin-transform-unicode-property-regex": "^7.25.7",
+ "@babel/plugin-transform-unicode-regex": "^7.25.7",
+ "@babel/plugin-transform-unicode-sets-regex": "^7.25.7",
"@babel/preset-modules": "0.1.6-no-external-plugins",
"babel-plugin-polyfill-corejs2": "^0.4.10",
- "babel-plugin-polyfill-corejs3": "^0.10.4",
+ "babel-plugin-polyfill-corejs3": "^0.10.6",
"babel-plugin-polyfill-regenerator": "^0.6.1",
- "core-js-compat": "^3.31.0",
+ "core-js-compat": "^3.38.1",
"semver": "^6.3.1"
},
"engines": {
@@ -1753,9 +1732,9 @@
}
},
"node_modules/@babel/register": {
- "version": "7.24.6",
- "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.24.6.tgz",
- "integrity": "sha512-WSuFCc2wCqMeXkz/i3yfAAsxwWflEgbVkZzivgAmXl/MxrXeoYFZOOPllbC8R8WTF7u61wSRQtDVZ1879cdu6w==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.25.7.tgz",
+ "integrity": "sha512-qHTd2Rhn/rKhSUwdY6+n98FmwXN+N+zxSVx3zWqRe9INyvTpv+aQ5gDV2+43ACd3VtMBzPPljbb0gZb8u5ma6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1772,17 +1751,10 @@
"@babel/core": "^7.0.0-0"
}
},
- "node_modules/@babel/regjsgen": {
- "version": "0.8.0",
- "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz",
- "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/@babel/runtime": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz",
- "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz",
+ "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1793,35 +1765,32 @@
}
},
"node_modules/@babel/template": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz",
- "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz",
+ "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/code-frame": "^7.24.7",
- "@babel/parser": "^7.24.7",
- "@babel/types": "^7.24.7"
+ "@babel/code-frame": "^7.25.7",
+ "@babel/parser": "^7.25.7",
+ "@babel/types": "^7.25.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz",
- "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz",
+ "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/code-frame": "^7.24.7",
- "@babel/generator": "^7.24.7",
- "@babel/helper-environment-visitor": "^7.24.7",
- "@babel/helper-function-name": "^7.24.7",
- "@babel/helper-hoist-variables": "^7.24.7",
- "@babel/helper-split-export-declaration": "^7.24.7",
- "@babel/parser": "^7.24.7",
- "@babel/types": "^7.24.7",
+ "@babel/code-frame": "^7.25.7",
+ "@babel/generator": "^7.25.7",
+ "@babel/parser": "^7.25.7",
+ "@babel/template": "^7.25.7",
+ "@babel/types": "^7.25.7",
"debug": "^4.3.1",
"globals": "^11.1.0"
},
@@ -1830,14 +1799,14 @@
}
},
"node_modules/@babel/types": {
- "version": "7.24.7",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz",
- "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==",
+ "version": "7.25.7",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.7.tgz",
+ "integrity": "sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-string-parser": "^7.24.7",
- "@babel/helper-validator-identifier": "^7.24.7",
+ "@babel/helper-string-parser": "^7.25.7",
+ "@babel/helper-validator-identifier": "^7.25.7",
"to-fast-properties": "^2.0.0"
},
"engines": {
@@ -1890,9 +1859,9 @@
}
},
"node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.4.15",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
- "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"dev": true,
"license": "MIT"
},
@@ -1932,13 +1901,13 @@
}
},
"node_modules/@types/node": {
- "version": "20.14.6",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.6.tgz",
- "integrity": "sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==",
+ "version": "22.7.4",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz",
+ "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "undici-types": "~5.26.4"
+ "undici-types": "~6.19.2"
}
},
"node_modules/accepts": {
@@ -1956,9 +1925,9 @@
}
},
"node_modules/ansi-colors": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
+ "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2035,14 +2004,14 @@
}
},
"node_modules/babel-plugin-polyfill-corejs3": {
- "version": "0.10.4",
- "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz",
- "integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==",
+ "version": "0.10.6",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz",
+ "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-define-polyfill-provider": "^0.6.1",
- "core-js-compat": "^3.36.1"
+ "@babel/helper-define-polyfill-provider": "^0.6.2",
+ "core-js-compat": "^3.38.0"
},
"peerDependencies": {
"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
@@ -2092,9 +2061,9 @@
}
},
"node_modules/body-parser": {
- "version": "1.20.2",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
- "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
+ "version": "1.20.3",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
+ "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2106,7 +2075,7 @@
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
- "qs": "6.11.0",
+ "qs": "6.13.0",
"raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
@@ -2165,9 +2134,9 @@
"license": "ISC"
},
"node_modules/browserslist": {
- "version": "4.23.1",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz",
- "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==",
+ "version": "4.24.0",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz",
+ "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==",
"dev": true,
"funding": [
{
@@ -2185,10 +2154,10 @@
],
"license": "MIT",
"dependencies": {
- "caniuse-lite": "^1.0.30001629",
- "electron-to-chromium": "^1.4.796",
- "node-releases": "^2.0.14",
- "update-browserslist-db": "^1.0.16"
+ "caniuse-lite": "^1.0.30001663",
+ "electron-to-chromium": "^1.5.28",
+ "node-releases": "^2.0.18",
+ "update-browserslist-db": "^1.1.0"
},
"bin": {
"browserslist": "cli.js"
@@ -2248,9 +2217,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001636",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz",
- "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==",
+ "version": "1.0.30001667",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz",
+ "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==",
"dev": true,
"funding": [
{
@@ -2269,9 +2238,9 @@
"license": "CC-BY-4.0"
},
"node_modules/chai": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz",
- "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==",
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz",
+ "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2281,7 +2250,7 @@
"get-func-name": "^2.0.2",
"loupe": "^2.3.6",
"pathval": "^1.1.1",
- "type-detect": "^4.0.8"
+ "type-detect": "^4.1.0"
},
"engines": {
"node": ">=4"
@@ -2502,13 +2471,13 @@
}
},
"node_modules/core-js-compat": {
- "version": "3.37.1",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz",
- "integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==",
+ "version": "3.38.1",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz",
+ "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "browserslist": "^4.23.0"
+ "browserslist": "^4.23.3"
},
"funding": {
"type": "opencollective",
@@ -2554,13 +2523,13 @@
}
},
"node_modules/debug": {
- "version": "4.3.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
- "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
@@ -2644,9 +2613,9 @@
"license": "MIT"
},
"node_modules/diff": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
- "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
+ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
@@ -2674,9 +2643,9 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
- "version": "1.4.806",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.806.tgz",
- "integrity": "sha512-nkoEX2QIB8kwCOtvtgwhXWy2IHVcOLQZu9Qo36uaGB835mdX/h8uLRlosL6QIhLVUnAiicXRW00PwaPZC74Nrg==",
+ "version": "1.5.32",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz",
+ "integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==",
"dev": true,
"license": "ISC"
},
@@ -2698,9 +2667,9 @@
}
},
"node_modules/engine.io": {
- "version": "6.5.5",
- "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.5.tgz",
- "integrity": "sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==",
+ "version": "6.6.1",
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.1.tgz",
+ "integrity": "sha512-NEpDCw9hrvBW+hVEOK4T7v0jFJ++KgtPl4jKFwsZVfG1XhS0dCrSb3VMb9gPAd7VAdW52VT1EnaNiU2vM8C0og==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2720,9 +2689,9 @@
}
},
"node_modules/engine.io-parser": {
- "version": "5.2.2",
- "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz",
- "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==",
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
+ "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2730,11 +2699,17 @@
}
},
"node_modules/ent": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz",
- "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.1.tgz",
+ "integrity": "sha512-QHuXVeZx9d+tIQAz/XztU0ZwZf2Agg9CcXcgE1rurqvdBeDBrpSwjl8/6XUqMg7tw2Y7uAdKb2sRv+bSEFqQ5A==",
"dev": true,
- "license": "MIT"
+ "license": "MIT",
+ "dependencies": {
+ "punycode": "^1.4.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
},
"node_modules/es-define-property": {
"version": "1.0.0",
@@ -2760,9 +2735,9 @@
}
},
"node_modules/escalade": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
- "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2922,9 +2897,9 @@
"license": "ISC"
},
"node_modules/follow-redirects": {
- "version": "1.15.6",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
- "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"dev": true,
"funding": [
{
@@ -3264,13 +3239,16 @@
}
},
"node_modules/is-core-module": {
- "version": "2.13.1",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
- "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+ "version": "2.15.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
+ "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "hasown": "^2.0.0"
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -3413,16 +3391,16 @@
}
},
"node_modules/jsesc": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
- "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz",
+ "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==",
"dev": true,
"license": "MIT",
"bin": {
"jsesc": "bin/jsesc"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
}
},
"node_modules/json5": {
@@ -3449,9 +3427,9 @@
}
},
"node_modules/karma": {
- "version": "6.4.3",
- "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.3.tgz",
- "integrity": "sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q==",
+ "version": "6.4.4",
+ "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz",
+ "integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3743,32 +3721,32 @@
}
},
"node_modules/mocha": {
- "version": "10.4.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz",
- "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-colors": "4.1.1",
- "browser-stdout": "1.3.1",
- "chokidar": "3.5.3",
- "debug": "4.3.4",
- "diff": "5.0.0",
- "escape-string-regexp": "4.0.0",
- "find-up": "5.0.0",
- "glob": "8.1.0",
- "he": "1.2.0",
- "js-yaml": "4.1.0",
- "log-symbols": "4.1.0",
- "minimatch": "5.0.1",
- "ms": "2.1.3",
- "serialize-javascript": "6.0.0",
- "strip-json-comments": "3.1.1",
- "supports-color": "8.1.1",
- "workerpool": "6.2.1",
- "yargs": "16.2.0",
- "yargs-parser": "20.2.4",
- "yargs-unparser": "2.0.0"
+ "version": "10.7.3",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz",
+ "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-colors": "^4.1.3",
+ "browser-stdout": "^1.3.1",
+ "chokidar": "^3.5.3",
+ "debug": "^4.3.5",
+ "diff": "^5.2.0",
+ "escape-string-regexp": "^4.0.0",
+ "find-up": "^5.0.0",
+ "glob": "^8.1.0",
+ "he": "^1.2.0",
+ "js-yaml": "^4.1.0",
+ "log-symbols": "^4.1.0",
+ "minimatch": "^5.1.6",
+ "ms": "^2.1.3",
+ "serialize-javascript": "^6.0.2",
+ "strip-json-comments": "^3.1.1",
+ "supports-color": "^8.1.1",
+ "workerpool": "^6.5.1",
+ "yargs": "^16.2.0",
+ "yargs-parser": "^20.2.9",
+ "yargs-unparser": "^2.0.0"
},
"bin": {
"_mocha": "bin/_mocha",
@@ -3834,34 +3812,6 @@
"node": ">=8"
}
},
- "node_modules/mocha/node_modules/chokidar": {
- "version": "3.5.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
- "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
- "dev": true,
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "anymatch": "~3.1.2",
- "braces": "~3.0.2",
- "glob-parent": "~5.1.2",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.6.0"
- },
- "engines": {
- "node": ">= 8.10.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- }
- },
"node_modules/mocha/node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -3882,31 +3832,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/mocha/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/mocha/node_modules/debug/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/mocha/node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@@ -3969,9 +3894,9 @@
}
},
"node_modules/mocha/node_modules/minimatch": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
- "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -3981,13 +3906,6 @@
"node": ">=10"
}
},
- "node_modules/mocha/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/mocha/node_modules/supports-color": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
@@ -4005,9 +3923,9 @@
}
},
"node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT"
},
@@ -4022,9 +3940,9 @@
}
},
"node_modules/node-releases": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
- "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz",
+ "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==",
"dev": true,
"license": "MIT"
},
@@ -4060,11 +3978,14 @@
}
},
"node_modules/object-inspect": {
- "version": "1.13.1",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
- "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
+ "version": "1.13.2",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
+ "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
"dev": true,
"license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -4182,9 +4103,9 @@
}
},
"node_modules/picocolors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
- "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
+ "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
"dev": true,
"license": "ISC"
},
@@ -4307,6 +4228,13 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/qjobs": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz",
@@ -4318,13 +4246,13 @@
}
},
"node_modules/qs": {
- "version": "6.11.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
- "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
+ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
- "side-channel": "^1.0.4"
+ "side-channel": "^1.0.6"
},
"engines": {
"node": ">=0.6"
@@ -4403,9 +4331,9 @@
"license": "MIT"
},
"node_modules/regenerate-unicode-properties": {
- "version": "10.1.1",
- "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz",
- "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==",
+ "version": "10.2.0",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz",
+ "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4433,16 +4361,16 @@
}
},
"node_modules/regexpu-core": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz",
- "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.1.1.tgz",
+ "integrity": "sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/regjsgen": "^0.8.0",
"regenerate": "^1.4.2",
- "regenerate-unicode-properties": "^10.1.0",
- "regjsparser": "^0.9.1",
+ "regenerate-unicode-properties": "^10.2.0",
+ "regjsgen": "^0.8.0",
+ "regjsparser": "^0.11.0",
"unicode-match-property-ecmascript": "^2.0.0",
"unicode-match-property-value-ecmascript": "^2.1.0"
},
@@ -4450,28 +4378,26 @@
"node": ">=4"
}
},
+ "node_modules/regjsgen": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz",
+ "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/regjsparser": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz",
- "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==",
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.1.tgz",
+ "integrity": "sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
- "jsesc": "~0.5.0"
+ "jsesc": "~3.0.2"
},
"bin": {
"regjsparser": "bin/parser"
}
},
- "node_modules/regjsparser/node_modules/jsesc": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
- "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==",
- "dev": true,
- "bin": {
- "jsesc": "bin/jsesc"
- }
- },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -4570,9 +4496,9 @@
}
},
"node_modules/serialize-javascript": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
- "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
+ "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
@@ -4637,9 +4563,9 @@
}
},
"node_modules/socket.io": {
- "version": "4.7.5",
- "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz",
- "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==",
+ "version": "4.8.0",
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.0.tgz",
+ "integrity": "sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4647,7 +4573,7 @@
"base64id": "~2.0.0",
"cors": "~2.8.5",
"debug": "~4.3.2",
- "engine.io": "~6.5.2",
+ "engine.io": "~6.6.0",
"socket.io-adapter": "~2.5.2",
"socket.io-parser": "~4.2.4"
},
@@ -4918,9 +4844,9 @@
}
},
"node_modules/type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz",
+ "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4942,9 +4868,9 @@
}
},
"node_modules/ua-parser-js": {
- "version": "0.7.38",
- "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.38.tgz",
- "integrity": "sha512-fYmIy7fKTSFAhG3fuPlubeGaMoAd6r0rSnfEsO5nEY55i26KSLt9EH7PLQiiqPUhNqYIJvSkTy1oArIcXAbPbA==",
+ "version": "0.7.39",
+ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.39.tgz",
+ "integrity": "sha512-IZ6acm6RhQHNibSt7+c09hhvsKy9WUr4DVbeq9U8o71qxyYtJpQeDxQnMrVqnIFMLcQjHO0I9wgfO2vIahht4w==",
"dev": true,
"funding": [
{
@@ -4961,21 +4887,24 @@
}
],
"license": "MIT",
+ "bin": {
+ "ua-parser-js": "script/cli.js"
+ },
"engines": {
"node": "*"
}
},
"node_modules/undici-types": {
- "version": "5.26.5",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "version": "6.19.8",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/unicode-canonical-property-names-ecmascript": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
- "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz",
+ "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4997,9 +4926,9 @@
}
},
"node_modules/unicode-match-property-value-ecmascript": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz",
- "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz",
+ "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5047,9 +4976,9 @@
}
},
"node_modules/update-browserslist-db": {
- "version": "1.0.16",
- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz",
- "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
+ "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==",
"dev": true,
"funding": [
{
@@ -5067,8 +4996,8 @@
],
"license": "MIT",
"dependencies": {
- "escalade": "^3.1.2",
- "picocolors": "^1.0.1"
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.0"
},
"bin": {
"update-browserslist-db": "cli.js"
@@ -5128,9 +5057,9 @@
}
},
"node_modules/workerpool": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
- "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==",
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz",
+ "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==",
"dev": true,
"license": "Apache-2.0"
},
@@ -5287,9 +5216,9 @@
}
},
"node_modules/yargs-parser": {
- "version": "20.2.4",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
- "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
+ "version": "20.2.9",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
"license": "ISC",
"engines": {
diff --git a/javascript/MaterialXTest/package.json b/javascript/MaterialXTest/package.json
index 02f42e430f..08578ceb32 100644
--- a/javascript/MaterialXTest/package.json
+++ b/javascript/MaterialXTest/package.json
@@ -16,17 +16,17 @@
"author": "",
"license": "ISC",
"devDependencies": {
- "@babel/core": "^7.24.7",
- "@babel/preset-env": "^7.24.7",
- "@babel/register": "^7.24.6",
- "chai": "^4.4.1",
+ "@babel/core": "^7.25.7",
+ "@babel/preset-env": "^7.25.7",
+ "@babel/register": "^7.25.7",
+ "chai": "^4.5.0",
"copyfiles": "^2.4.1",
- "karma": "^6.4.3",
+ "karma": "^6.4.4",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.2.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
- "mocha": "^10.4.0",
+ "mocha": "^10.7.3",
"rimraf": "^3.0.2"
}
}
diff --git a/javascript/MaterialXView/package-lock.json b/javascript/MaterialXView/package-lock.json
index cf4b120c32..298f6d7f72 100644
--- a/javascript/MaterialXView/package-lock.json
+++ b/javascript/MaterialXView/package-lock.json
@@ -11,7 +11,7 @@
"dependencies": {
"lil-gui": "^0.19.2",
"three": "^0.152.2",
- "webpack": "^5.92.1"
+ "webpack": "^5.95.0"
},
"devDependencies": {
"copy-webpack-plugin": "^8.1.1",
@@ -73,9 +73,9 @@
}
},
"node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.4.15",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
- "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
@@ -175,30 +175,10 @@
"@types/node": "*"
}
},
- "node_modules/@types/eslint": {
- "version": "8.56.10",
- "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz",
- "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==",
- "license": "MIT",
- "dependencies": {
- "@types/estree": "*",
- "@types/json-schema": "*"
- }
- },
- "node_modules/@types/eslint-scope": {
- "version": "3.7.7",
- "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",
- "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",
- "license": "MIT",
- "dependencies": {
- "@types/eslint": "*",
- "@types/estree": "*"
- }
- },
"node_modules/@types/estree": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
- "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
+ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"license": "MIT"
},
"node_modules/@types/express": {
@@ -215,9 +195,22 @@
}
},
"node_modules/@types/express-serve-static-core": {
- "version": "4.19.5",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz",
- "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.0.tgz",
+ "integrity": "sha512-AbXMTZGt40T+KON9/Fdxx0B2WK5hsgxcfXJLr5bFpZ7b4JCex2WyQPTEKdXqfHiY5nKKBScZ7yCoO6Pvgxfvnw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*",
+ "@types/send": "*"
+ }
+ },
+ "node_modules/@types/express/node_modules/@types/express-serve-static-core": {
+ "version": "4.19.6",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz",
+ "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -242,9 +235,9 @@
"license": "MIT"
},
"node_modules/@types/http-proxy": {
- "version": "1.17.14",
- "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz",
- "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==",
+ "version": "1.17.15",
+ "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz",
+ "integrity": "sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -265,12 +258,12 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "20.14.6",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.6.tgz",
- "integrity": "sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==",
+ "version": "22.7.4",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz",
+ "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==",
"license": "MIT",
"dependencies": {
- "undici-types": "~5.26.4"
+ "undici-types": "~6.19.2"
}
},
"node_modules/@types/node-forge": {
@@ -284,9 +277,9 @@
}
},
"node_modules/@types/qs": {
- "version": "6.9.15",
- "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz",
- "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==",
+ "version": "6.9.16",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.16.tgz",
+ "integrity": "sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==",
"dev": true,
"license": "MIT"
},
@@ -348,9 +341,9 @@
}
},
"node_modules/@types/ws": {
- "version": "8.5.10",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz",
- "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==",
+ "version": "8.5.12",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz",
+ "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -569,9 +562,9 @@
}
},
"node_modules/acorn": {
- "version": "8.12.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
- "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
+ "version": "8.12.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
+ "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
@@ -624,16 +617,16 @@
}
},
"node_modules/ajv-formats/node_modules/ajv": {
- "version": "8.16.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz",
- "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==",
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
+ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.4.1"
+ "require-from-string": "^2.0.2"
},
"funding": {
"type": "github",
@@ -738,9 +731,9 @@
}
},
"node_modules/body-parser": {
- "version": "1.20.2",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
- "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
+ "version": "1.20.3",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
+ "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -752,7 +745,7 @@
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
- "qs": "6.11.0",
+ "qs": "6.13.0",
"raw-body": "2.5.2",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
@@ -815,9 +808,9 @@
}
},
"node_modules/browserslist": {
- "version": "4.23.1",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz",
- "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==",
+ "version": "4.24.0",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz",
+ "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==",
"funding": [
{
"type": "opencollective",
@@ -834,10 +827,10 @@
],
"license": "MIT",
"dependencies": {
- "caniuse-lite": "^1.0.30001629",
- "electron-to-chromium": "^1.4.796",
- "node-releases": "^2.0.14",
- "update-browserslist-db": "^1.0.16"
+ "caniuse-lite": "^1.0.30001663",
+ "electron-to-chromium": "^1.5.28",
+ "node-releases": "^2.0.18",
+ "update-browserslist-db": "^1.1.0"
},
"bin": {
"browserslist": "cli.js"
@@ -894,9 +887,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001636",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz",
- "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==",
+ "version": "1.0.30001667",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz",
+ "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==",
"funding": [
{
"type": "opencollective",
@@ -1359,15 +1352,15 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
- "version": "1.4.806",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.806.tgz",
- "integrity": "sha512-nkoEX2QIB8kwCOtvtgwhXWy2IHVcOLQZu9Qo36uaGB835mdX/h8uLRlosL6QIhLVUnAiicXRW00PwaPZC74Nrg==",
+ "version": "1.5.32",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz",
+ "integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==",
"license": "ISC"
},
"node_modules/encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1375,9 +1368,9 @@
}
},
"node_modules/enhanced-resolve": {
- "version": "5.17.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz",
- "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==",
+ "version": "5.17.1",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz",
+ "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==",
"license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.4",
@@ -1398,9 +1391,9 @@
}
},
"node_modules/envinfo": {
- "version": "7.13.0",
- "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz",
- "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz",
+ "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==",
"dev": true,
"license": "MIT",
"bin": {
@@ -1434,15 +1427,15 @@
}
},
"node_modules/es-module-lexer": {
- "version": "1.5.3",
- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz",
- "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==",
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz",
+ "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==",
"license": "MIT"
},
"node_modules/escalade": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
- "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"license": "MIT",
"engines": {
"node": ">=6"
@@ -1549,38 +1542,38 @@
}
},
"node_modules/express": {
- "version": "4.19.2",
- "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
- "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
+ "version": "4.21.0",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz",
+ "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==",
"dev": true,
"license": "MIT",
"dependencies": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
- "body-parser": "1.20.2",
+ "body-parser": "1.20.3",
"content-disposition": "0.5.4",
"content-type": "~1.0.4",
"cookie": "0.6.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "2.0.0",
- "encodeurl": "~1.0.2",
+ "encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
- "finalhandler": "1.2.0",
+ "finalhandler": "1.3.1",
"fresh": "0.5.2",
"http-errors": "2.0.0",
- "merge-descriptors": "1.0.1",
+ "merge-descriptors": "1.0.3",
"methods": "~1.1.2",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
- "path-to-regexp": "0.1.7",
+ "path-to-regexp": "0.1.10",
"proxy-addr": "~2.0.7",
- "qs": "6.11.0",
+ "qs": "6.13.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.2.1",
- "send": "0.18.0",
- "serve-static": "1.15.0",
+ "send": "0.19.0",
+ "serve-static": "1.16.2",
"setprototypeof": "1.2.0",
"statuses": "2.0.1",
"type-is": "~1.6.18",
@@ -1620,6 +1613,13 @@
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"license": "MIT"
},
+ "node_modules/fast-uri": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.2.tgz",
+ "integrity": "sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/fastest-levenshtein": {
"version": "1.0.16",
"resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
@@ -1667,14 +1667,14 @@
}
},
"node_modules/finalhandler": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
- "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
+ "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "2.6.9",
- "encodeurl": "~1.0.2",
+ "encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
@@ -1710,9 +1710,9 @@
}
},
"node_modules/follow-redirects": {
- "version": "1.15.6",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
- "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"dev": true,
"funding": [
{
@@ -2166,9 +2166,9 @@
}
},
"node_modules/http-proxy-middleware": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
- "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz",
+ "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2214,9 +2214,9 @@
}
},
"node_modules/ignore": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
- "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2224,9 +2224,9 @@
}
},
"node_modules/import-local": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
- "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",
+ "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2296,13 +2296,16 @@
}
},
"node_modules/is-core-module": {
- "version": "2.13.1",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
- "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+ "version": "2.15.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
+ "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "hasown": "^2.0.0"
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -2470,9 +2473,9 @@
}
},
"node_modules/launch-editor": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.8.0.tgz",
- "integrity": "sha512-vJranOAJrI/llyWGRQqiDM+adrw+k83fvmmx3+nV47g3+36xM15jE+zyZ6Ffel02+xSvuM0b2GDRosXZkbb6wA==",
+ "version": "2.9.1",
+ "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.9.1.tgz",
+ "integrity": "sha512-Gcnl4Bd+hRO9P9icCP/RVVT2o8SFlPXofuCxvA2SaZuH45whSvf5p8x5oih5ftLiVhEI4sp5xDY+R+b3zJBh5w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2549,11 +2552,14 @@
}
},
"node_modules/merge-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
"dev": true,
- "license": "MIT"
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
"node_modules/merge-stream": {
"version": "2.0.0",
@@ -2582,9 +2588,9 @@
}
},
"node_modules/micromatch": {
- "version": "4.0.7",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
- "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2718,9 +2724,9 @@
}
},
"node_modules/node-releases": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
- "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz",
+ "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==",
"license": "MIT"
},
"node_modules/normalize-path": {
@@ -2760,11 +2766,14 @@
}
},
"node_modules/object-inspect": {
- "version": "1.13.1",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
- "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
+ "version": "1.13.2",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
+ "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
"dev": true,
"license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -2982,9 +2991,9 @@
"license": "MIT"
},
"node_modules/path-to-regexp": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
+ "version": "0.1.10",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
+ "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==",
"dev": true,
"license": "MIT"
},
@@ -2999,9 +3008,9 @@
}
},
"node_modules/picocolors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
- "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
+ "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
"license": "ISC"
},
"node_modules/picomatch": {
@@ -3082,13 +3091,13 @@
}
},
"node_modules/qs": {
- "version": "6.11.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
- "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
+ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
- "side-channel": "^1.0.4"
+ "side-channel": "^1.0.6"
},
"engines": {
"node": ">=0.6"
@@ -3415,9 +3424,9 @@
}
},
"node_modules/send": {
- "version": "0.18.0",
- "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
- "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "version": "0.19.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
+ "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3439,6 +3448,16 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/send/node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/send/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -3526,16 +3545,16 @@
}
},
"node_modules/serve-static": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
- "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
+ "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "encodeurl": "~1.0.2",
+ "encodeurl": "~2.0.0",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
- "send": "0.18.0"
+ "send": "0.19.0"
},
"engines": {
"node": ">= 0.8.0"
@@ -3712,13 +3731,13 @@
}
},
"node_modules/spdy-transport/node_modules/debug": {
- "version": "4.3.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
- "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
@@ -3730,20 +3749,20 @@
}
},
"node_modules/spdy-transport/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT"
},
"node_modules/spdy/node_modules/debug": {
- "version": "4.3.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
- "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
@@ -3755,9 +3774,9 @@
}
},
"node_modules/spdy/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT"
},
@@ -3842,9 +3861,9 @@
}
},
"node_modules/terser": {
- "version": "5.31.1",
- "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz",
- "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==",
+ "version": "5.34.1",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz",
+ "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==",
"license": "BSD-2-Clause",
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
@@ -3945,9 +3964,9 @@
}
},
"node_modules/tslib": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
- "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
+ "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==",
"dev": true,
"license": "0BSD"
},
@@ -3966,9 +3985,9 @@
}
},
"node_modules/undici-types": {
- "version": "5.26.5",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "version": "6.19.8",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"license": "MIT"
},
"node_modules/unpipe": {
@@ -3982,9 +4001,9 @@
}
},
"node_modules/update-browserslist-db": {
- "version": "1.0.16",
- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz",
- "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
+ "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==",
"funding": [
{
"type": "opencollective",
@@ -4001,8 +4020,8 @@
],
"license": "MIT",
"dependencies": {
- "escalade": "^3.1.2",
- "picocolors": "^1.0.1"
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.0"
},
"bin": {
"update-browserslist-db": "cli.js"
@@ -4065,9 +4084,9 @@
}
},
"node_modules/watchpack": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz",
- "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==",
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
+ "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
"license": "MIT",
"dependencies": {
"glob-to-regexp": "^0.4.1",
@@ -4088,12 +4107,11 @@
}
},
"node_modules/webpack": {
- "version": "5.92.1",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.1.tgz",
- "integrity": "sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==",
+ "version": "5.95.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz",
+ "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==",
"license": "MIT",
"dependencies": {
- "@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.5",
"@webassemblyjs/ast": "^1.12.1",
"@webassemblyjs/wasm-edit": "^1.12.1",
@@ -4102,7 +4120,7 @@
"acorn-import-attributes": "^1.9.5",
"browserslist": "^4.21.10",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.17.0",
+ "enhanced-resolve": "^5.17.1",
"es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -4217,16 +4235,16 @@
}
},
"node_modules/webpack-dev-middleware/node_modules/ajv": {
- "version": "8.16.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz",
- "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==",
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
+ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.4.1"
+ "require-from-string": "^2.0.2"
},
"funding": {
"type": "github",
@@ -4334,16 +4352,16 @@
}
},
"node_modules/webpack-dev-server/node_modules/ajv": {
- "version": "8.16.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz",
- "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==",
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
+ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.4.1"
+ "require-from-string": "^2.0.2"
},
"funding": {
"type": "github",
@@ -4470,9 +4488,9 @@
"license": "ISC"
},
"node_modules/ws": {
- "version": "8.17.1",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
- "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
+ "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
"dev": true,
"license": "MIT",
"engines": {
diff --git a/javascript/MaterialXView/package.json b/javascript/MaterialXView/package.json
index df27cebb57..74dd12bd85 100644
--- a/javascript/MaterialXView/package.json
+++ b/javascript/MaterialXView/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"lil-gui": "^0.19.2",
"three": "^0.152.2",
- "webpack": "^5.92.1"
+ "webpack": "^5.95.0"
},
"devDependencies": {
"copy-webpack-plugin": "^8.1.1",
From a5073ac08f3d527841691ac5535637b14f1d9016 Mon Sep 17 00:00:00 2001
From: Bernard Kwok
Date: Mon, 7 Oct 2024 13:35:42 -0400
Subject: [PATCH 08/80] Add Element Equivalence Interfaces (#2003)
- Adds a new `isEquivalent` method to `Element`.
- Adds a new `isAttributeEquivalent` method for `Element` and override for `ValueElement` to allow for value vs string comparisons on the latter.
- Adds equivalence options class: `ElementEquivalanceOptions` which can be passed in as an argument to `isEquivalent`
- Adds an optional results / feedback class: `ElementEquivalenceResult` which can be passed in as an argument to `isEquivalent` and `isAttributeEquivalent`.
---
source/MaterialXCore/Element.cpp | 174 ++++++++++++++
source/MaterialXCore/Element.h | 110 +++++++++
.../MaterialXTest/MaterialXCore/Document.cpp | 212 ++++++++++++++++++
.../PyMaterialX/PyMaterialXCore/PyElement.cpp | 25 +++
4 files changed, 521 insertions(+)
diff --git a/source/MaterialXCore/Element.cpp b/source/MaterialXCore/Element.cpp
index 94836245a7..149b7bc757 100644
--- a/source/MaterialXCore/Element.cpp
+++ b/source/MaterialXCore/Element.cpp
@@ -39,6 +39,12 @@ const string ValueElement::UI_ADVANCED_ATTRIBUTE = "uiadvanced";
const string ValueElement::UNIT_ATTRIBUTE = "unit";
const string ValueElement::UNITTYPE_ATTRIBUTE = "unittype";
const string ValueElement::UNIFORM_ATTRIBUTE = "uniform";
+const string ElementEquivalenceResult::ATTRIBUTE = "attribute";
+const string ElementEquivalenceResult::ATTRIBUTE_NAMES = "attribute names";
+const string ElementEquivalenceResult::CHILD_COUNT = "child count";
+const string ElementEquivalenceResult::CHILD_NAME = "child name";
+const string ElementEquivalenceResult::NAME = "name";
+const string ElementEquivalenceResult::CATEGORY = "category";
Element::CreatorMap Element::_creatorMap;
@@ -334,6 +340,108 @@ bool Element::hasInheritanceCycle() const
return false;
}
+bool Element::isEquivalent(ConstElementPtr rhs, const ElementEquivalenceOptions& options,
+ ElementEquivalenceResultVec* results) const
+{
+ if (getName() != rhs->getName())
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(getNamePath(), rhs->getNamePath(), ElementEquivalenceResult::NAME));
+ return false;
+ }
+ if (getCategory() != rhs->getCategory())
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(getNamePath(), rhs->getNamePath(), ElementEquivalenceResult::CATEGORY));
+ return false;
+ }
+
+ // Compare attribute names.
+ StringVec attributeNames = getAttributeNames();
+ StringVec rhsAttributeNames = rhs->getAttributeNames();
+
+ // Filter out any attributes specified in the options.
+ const StringSet& skipAttributes = options.skipAttributes;
+ if (!skipAttributes.empty())
+ {
+ attributeNames.erase(std::remove_if(attributeNames.begin(), attributeNames.end(),
+ [&skipAttributes](const string& attr) { return skipAttributes.find(attr) != skipAttributes.end(); }),
+ attributeNames.end());
+ rhsAttributeNames.erase(std::remove_if(rhsAttributeNames.begin(), rhsAttributeNames.end(),
+ [&skipAttributes](const string& attr) { return skipAttributes.find(attr) != skipAttributes.end(); }),
+ rhsAttributeNames.end());
+ }
+
+ // Ignore attribute ordering by sorting names
+ std::sort(attributeNames.begin(), attributeNames.end());
+ std::sort(rhsAttributeNames.begin(), rhsAttributeNames.end());
+
+ if (attributeNames != rhsAttributeNames)
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(getNamePath(), rhs->getNamePath(), ElementEquivalenceResult::ATTRIBUTE_NAMES));
+ return false;
+ }
+
+ for (const string& attr : rhsAttributeNames)
+ {
+ if (!isAttributeEquivalent(rhs, attr, options, results))
+ {
+ return false;
+ }
+ }
+
+ // Compare children.
+ const vector& children = getChildren();
+ const vector& rhsChildren = rhs->getChildren();
+ if (children.size() != rhsChildren.size())
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(getNamePath(), rhs->getNamePath(), ElementEquivalenceResult::CHILD_COUNT));
+ return false;
+ }
+ for (size_t i = 0; i < children.size(); i++)
+ {
+ ElementPtr rhsElement = rhsChildren[i];
+ // Handle unordered children if parent is a compound graph (NodeGraph, Document).
+ // (Functional graphs have a "nodedef" reference and define node interfaces
+ // so require strict interface ordering.)
+ ConstGraphElementPtr graph = this->getSelf()->asA();
+ if (graph)
+ {
+ ConstNodeGraphPtr nodeGraph = graph->asA();
+ ConstDocumentPtr document = graph->asA();
+ if (document || (nodeGraph && !nodeGraph->getNodeDef()))
+ {
+ const string& childName = children[i]->getName();
+ rhsElement = rhs->getChild(childName);
+ if (!rhsElement)
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(children[i]->getNamePath(), "",
+ ElementEquivalenceResult::CHILD_NAME, childName));
+ return false;
+ }
+ }
+ }
+ if (!children[i]->isEquivalent(rhsElement, options, results))
+ return false;
+ }
+ return true;
+}
+
+bool Element::isAttributeEquivalent(ConstElementPtr rhs, const string& attributeName,
+ const ElementEquivalenceOptions& /*options*/, ElementEquivalenceResultVec* results) const
+{
+ if (getAttribute(attributeName) != rhs->getAttribute(attributeName))
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(getNamePath(), rhs->getNamePath(), ElementEquivalenceResult::ATTRIBUTE, attributeName));
+ return false;
+ }
+ return true;
+}
+
TreeIterator Element::traverseTree() const
{
return TreeIterator(getSelfNonConst());
@@ -534,6 +642,72 @@ const string& ValueElement::getActiveUnit() const
return EMPTY_STRING;
}
+bool ValueElement::isAttributeEquivalent(ConstElementPtr rhs, const string& attributeName,
+ const ElementEquivalenceOptions& options, ElementEquivalenceResultVec* results) const
+{
+ // Perform value comparisons
+ bool performedValueComparison = false;
+ if (!options.skipValueComparisons)
+ {
+ const StringSet uiAttributes =
+ {
+ ValueElement::UI_MIN_ATTRIBUTE, ValueElement::UI_MAX_ATTRIBUTE,
+ ValueElement::UI_SOFT_MIN_ATTRIBUTE, ValueElement::UI_SOFT_MAX_ATTRIBUTE,
+ ValueElement::UI_STEP_ATTRIBUTE
+ };
+
+ // Get precision and format options
+ ScopedFloatFormatting fmt(options.format, options.precision);
+
+ ConstValueElementPtr rhsValueElement = rhs->asA();
+
+ // Check value equality
+ if (attributeName == ValueElement::VALUE_ATTRIBUTE)
+ {
+ ValuePtr thisValue = getValue();
+ ValuePtr rhsValue = rhsValueElement->getValue();
+ if (thisValue && rhsValue)
+ {
+ if (thisValue->getValueString() != rhsValue->getValueString())
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(getNamePath(), rhs->getNamePath(), ElementEquivalenceResult::ATTRIBUTE, attributeName));
+ return false;
+ }
+ }
+ performedValueComparison = true;
+ }
+
+ // Check ui attribute value equality
+ else if (uiAttributes.find(attributeName) != uiAttributes.end())
+ {
+ const string& uiAttribute = getAttribute(attributeName);
+ const string& rhsUiAttribute = getAttribute(attributeName);
+ ValuePtr uiValue = !rhsUiAttribute.empty() ? Value::createValueFromStrings(uiAttribute, getType()) : nullptr;
+ ValuePtr rhsUiValue = !rhsUiAttribute.empty() ? Value::createValueFromStrings(rhsUiAttribute, getType()) : nullptr;
+ if (uiValue && rhsUiValue)
+ {
+ if (uiValue->getValueString() != rhsUiValue->getValueString())
+ {
+ if (results)
+ results->push_back(ElementEquivalenceResult(getNamePath(), rhs->getNamePath(), ElementEquivalenceResult::ATTRIBUTE, attributeName));
+ return false;
+ }
+ }
+
+ performedValueComparison = true;
+ }
+ }
+
+ // If did not peform a value comparison, perform the default comparison
+ if (!performedValueComparison)
+ {
+ return Element::isAttributeEquivalent(rhs, attributeName, options, results);
+ }
+
+ return true;
+}
+
bool ValueElement::validate(string* message) const
{
bool res = true;
diff --git a/source/MaterialXCore/Element.h b/source/MaterialXCore/Element.h
index d1abcdfdca..2b92dd8094 100644
--- a/source/MaterialXCore/Element.h
+++ b/source/MaterialXCore/Element.h
@@ -71,6 +71,10 @@ using ElementMap = std::unordered_map;
/// A standard function taking an ElementPtr and returning a boolean.
using ElementPredicate = std::function;
+class ElementEquivalenceOptions;
+class ElementEquivalenceResult;
+using ElementEquivalenceResultVec = vector;
+
/// @class Element
/// The base class for MaterialX elements.
///
@@ -612,6 +616,31 @@ class MX_CORE_API Element : public std::enable_shared_from_this
return nullptr;
}
+ /// @}
+ /// @name Functional Equivalence
+ /// @{
+
+ /// Return true if the given element tree, including all descendents,
+ /// is considered to be equivalent to this one based on the equivalence
+ /// criteria provided.
+ /// @param rhs Element to compare against
+ /// @param options Equivalence criteria
+ /// @param results Results of comparison if argument is specified.
+ /// @return True if the elements are equivalent. False otherwise.
+ bool isEquivalent(ConstElementPtr rhs, const ElementEquivalenceOptions& options,
+ ElementEquivalenceResultVec* results = nullptr) const;
+
+ /// Return true if the attribute on a given element is equivalent
+ /// based on the equivalence criteria provided.
+ /// @param rhs Element to compare against
+ /// @param attributeName Name of attribute to compare
+ /// @param options Equivalence criteria
+ /// @param results Results of comparison if argument is specified.
+ /// @return True if the attribute on the elements are equivalent. False otherwise.
+ virtual bool isAttributeEquivalent(ConstElementPtr rhs, const string& attributeName,
+ const ElementEquivalenceOptions& options,
+ ElementEquivalenceResultVec* results = nullptr) const;
+
/// @}
/// @name Traversal
/// @{
@@ -1114,6 +1143,21 @@ class MX_CORE_API ValueElement : public TypedElement
return getTypedAttribute(UNIFORM_ATTRIBUTE);
}
+ /// @}
+ /// @name Functional Equivalence
+ /// @{
+
+ /// Return true if the attribute on a given element is equivalent
+ /// based on the equivalence criteria provided.
+ /// @param rhs Element to compare against
+ /// @param attributeName Name of attribute to compare
+ /// @param options Equivalence criteria
+ /// @param results Results of comparison if argument is specified.
+ /// @return True if the attribute on the elements are equivalent. False otherwise.
+ bool isAttributeEquivalent(ConstElementPtr rhs, const string& attributeName,
+ const ElementEquivalenceOptions& options,
+ ElementEquivalenceResultVec* results = nullptr) const override;
+
/// @}
/// @name Validation
/// @{
@@ -1336,6 +1380,72 @@ class MX_CORE_API StringResolver
StringMap _geomNameMap;
};
+/// @class ElementEquivalenceResult
+/// A comparison result for the functional equivalence of two elements.
+class MX_CORE_API ElementEquivalenceResult
+{
+ public:
+ ElementEquivalenceResult(const string& p1, const string& p2, const string& type,
+ const string& attrName = EMPTY_STRING)
+ {
+ path1 = p1;
+ path2 = p2;
+ differenceType = type;
+ attributeName = attrName;
+ }
+ ElementEquivalenceResult() = delete;
+ ~ElementEquivalenceResult() = default;
+
+ string path1;
+ string path2;
+ string differenceType;
+ string attributeName;
+
+ static const string ATTRIBUTE;
+ static const string ATTRIBUTE_NAMES;
+ static const string CHILD_COUNT;
+ static const string CHILD_NAME;
+ static const string NAME;
+ static const string CATEGORY;
+};
+
+/// @class ElementEquivalenceOptions
+/// A set of options for comparing the functional equivalence of elements.
+class MX_CORE_API ElementEquivalenceOptions
+{
+ public:
+ ElementEquivalenceOptions()
+ {
+ format = Value::getFloatFormat();
+ precision = Value::getFloatPrecision();
+ skipAttributes = {};
+ skipValueComparisons = false;
+ };
+ ~ElementEquivalenceOptions() { }
+
+ /// Floating point format option for floating point value comparisons
+ Value::FloatFormat format;
+
+ /// Floating point precision option for floating point value comparisons
+ int precision;
+
+ /// Attribute filtering options. By default all attributes are considered.
+ /// Name, category attributes cannot be skipped.
+ ///
+ /// For example UI attribute comparision be skipped by setting:
+ /// skipAttributes = {
+ /// ValueElement::UI_MIN_ATTRIBUTE, ValueElement::UI_MAX_ATTRIBUTE,
+ /// ValueElement::UI_SOFT_MIN_ATTRIBUTE, ValueElement::UI_SOFT_MAX_ATTRIBUTE,
+ /// ValueElement::UI_STEP_ATTRIBUTE, Element::XPOS_ATTRIBUTE,
+ /// Element::YPOS_ATTRIBUTE };
+ StringSet skipAttributes;
+
+ /// Do not perform any value comparisions. Instead perform exact string comparisons for attributes
+ /// Default is false. The operator==() method can be used instead as it always performs
+ /// a strict comparison. Default is false.
+ bool skipValueComparisons;
+};
+
/// @class ExceptionOrphanedElement
/// An exception that is thrown when an ElementPtr is used after its owning
/// Document has gone out of scope.
diff --git a/source/MaterialXTest/MaterialXCore/Document.cpp b/source/MaterialXTest/MaterialXCore/Document.cpp
index fb35e58ccb..1b02966fb8 100644
--- a/source/MaterialXTest/MaterialXCore/Document.cpp
+++ b/source/MaterialXTest/MaterialXCore/Document.cpp
@@ -10,6 +10,8 @@
#include
#include
+#include
+
namespace mx = MaterialX;
TEST_CASE("Document", "[document]")
@@ -116,3 +118,213 @@ TEST_CASE("Document", "[document]")
// Validate the combined document.
REQUIRE(doc->validate());
}
+
+void printDifferences(const mx::ElementEquivalenceResultVec& results, const std::string& label)
+{
+ for (const mx::ElementEquivalenceResult& result : results)
+ {
+ std::cout << label << ": " << "Element: " << result.path1 <<
+ ", Element: " << result.path2 << ", Difference Type: " << result.differenceType
+ << ", Value: " << result.attributeName << std::endl;
+ }
+}
+
+TEST_CASE("Document equivalence", "[document]")
+{
+ mx::DocumentPtr doc = mx::createDocument();
+ std::unordered_multimap inputMap;
+
+ inputMap.insert({ "color3", " 1.0, +2.0, 3.0 " });
+ inputMap.insert({ "color4", "1.0, 2.00, 0.3000, -4" });
+ inputMap.insert({ "integer", " 12 " });
+ inputMap.insert({ "matrix33",
+ "01.0, 2.0, 0000.2310, "
+ " 01.0, 2.0, 0000.2310, "
+ "01.0, 2.0, 0000.2310 " });
+ inputMap.insert({ "matrix44",
+ "01.0, 2.0, 0000.2310, 0.100, "
+ "01.0, 2.0, 0000.2310, 0.100, "
+ "01.0, 2.0, 0000.2310, 0.100, "
+ "01.0, 2.0, 0000.2310, 0.100" });
+ inputMap.insert({ "vector2", "1.0, 0.012345608" }); // For precision check
+ inputMap.insert({ "vector3", " 1.0, +2.0, 3.0 " });
+ inputMap.insert({ "vector4", "1.0, 2.00, 0.3000, -4" });
+ inputMap.insert({ "string", "mystring" });
+ inputMap.insert({ "boolean", "false" });
+ inputMap.insert({ "filename", "filename1" });
+ inputMap.insert({ "float", " 1.2e-10 " });
+ inputMap.insert({ "float", " 00.1000 " });
+
+ unsigned int index = 0;
+ mx::ElementPtr child = doc->addNodeGraph("mygraph");
+ mx::NodeGraphPtr graph = child->asA();
+ for (auto it = inputMap.begin(); it != inputMap.end(); ++it)
+ {
+ const std::string inputType = (*it).first;
+ mx::InputPtr input = graph->addInput("input_" + std::to_string(index), inputType);
+ if (inputType == "float")
+ {
+ input->setAttribute(mx::ValueElement::UI_MIN_ATTRIBUTE, " 0.0100 ");
+ input->setAttribute(mx::ValueElement::UI_MAX_ATTRIBUTE, " 01.0100 ");
+ index++;
+ }
+ else
+ {
+ input->setName("input_" + inputType); // Set by name for difference in order test
+ }
+ input->setValueString((*it).second);
+ }
+
+ mx::DocumentPtr doc2 = mx::createDocument();
+ std::unordered_multimap inputMap2;
+ inputMap2.insert({ "color4", "1, 2, 0.3, -4" });
+ inputMap2.insert({ "integer", "12" });
+ inputMap2.insert({ "matrix33", "1, 2, 0.231, 1, 2, 0.231, 1, 2, 0.231, 1, 2, 0.231" });
+ inputMap2.insert({ "matrix44", "1, 2, 0.231, 0.1, 1, 2, 0.231, 0.1, 1, 2, 0.231, 0.1, 1, 2, 0.231, 0.1" });
+ inputMap2.insert({ "vector2", "1, 0.012345611" }); // For precision check
+ inputMap2.insert({ "string", "mystring" });
+ inputMap2.insert({ "boolean", "false" });
+ inputMap2.insert({ "color3", "1, 2, 3" });
+ inputMap2.insert({ "vector3", "1, 2, 3" });
+ inputMap2.insert({ "vector4", "1, 2, 0.3, -4" });
+ inputMap2.insert({ "filename", "filename1" });
+ inputMap2.insert({ "float", "1.2e-10" });
+ inputMap2.insert({ "float", "0.1" });
+
+ index = 0;
+ child = doc2->addNodeGraph("mygraph");
+ graph = child->asA();
+ std::vector floatInputs;
+ for (auto it = inputMap2.begin(); it != inputMap2.end(); ++it)
+ {
+ const std::string inputType = (*it).first;
+ mx::InputPtr input = graph->addInput("input_" + std::to_string(index), inputType);
+ // Note: order of value and ui attributes is different for ordering comparison
+ input->setValueString((*it).second);
+ if (inputType == "float")
+ {
+ input->setAttribute(mx::ValueElement::UI_MIN_ATTRIBUTE, " 0.01");
+ input->setAttribute(mx::ValueElement::UI_MAX_ATTRIBUTE, " 1.01");
+ floatInputs.push_back(input);
+ index++;
+ }
+ else
+ {
+ input->setName("input_" + inputType);
+ }
+ }
+
+ mx::ElementEquivalenceOptions options;
+ mx::ElementEquivalenceResultVec results;
+
+ // Check skipping all value compares
+ options.skipValueComparisons = true;
+ bool equivalent = doc->isEquivalent(doc2, options, &results);
+ if (equivalent)
+ {
+ std::cout << "Unexpected skip value equivalence:" << std::endl;
+ std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
+ std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
+ }
+ else
+ {
+ printDifferences(results, "Expected value differences");
+ }
+ REQUIRE(!equivalent);
+
+ // Check attibute values
+ options.skipValueComparisons = false;
+ results.clear();
+ equivalent = doc->isEquivalent(doc2, options, &results);
+ if (!equivalent)
+ {
+ printDifferences(results, "Unexpected value difference");
+ std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
+ std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
+ }
+ REQUIRE(equivalent);
+
+ unsigned int currentPrecision = mx::Value::getFloatPrecision();
+ // This will compare 0.012345608 versus: 1, 0.012345611 for input10
+ options.precision = 8;
+ equivalent = doc->isEquivalent(doc2, options);
+ if (equivalent)
+ {
+ std::cout << "Unexpected precision equivalence:" << std::endl;
+ std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
+ std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
+ }
+ else
+ {
+ printDifferences(results, "Expected precision difference");
+ }
+ REQUIRE(!equivalent);
+ options.precision = currentPrecision;
+
+ // Check attribute filtering of inputs
+ results.clear();
+ options.skipAttributes = { mx::ValueElement::UI_MIN_ATTRIBUTE, mx::ValueElement::UI_MAX_ATTRIBUTE };
+ for (mx::InputPtr floatInput : floatInputs)
+ {
+ floatInput->setAttribute(mx::ValueElement::UI_MIN_ATTRIBUTE, "0.9");
+ floatInput->setAttribute(mx::ValueElement::UI_MAX_ATTRIBUTE, "100.0");
+ }
+ equivalent = doc->isEquivalent(doc2, options, &results);
+ if (!equivalent)
+ {
+ printDifferences(results, "Unexpected filtering differences");
+ std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
+ std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
+ }
+ REQUIRE(equivalent);
+ for (mx::InputPtr floatInput : floatInputs)
+ {
+ floatInput->setAttribute(mx::ValueElement::UI_MIN_ATTRIBUTE, " 0.01");
+ floatInput->setAttribute(mx::ValueElement::UI_MAX_ATTRIBUTE, " 1.01");
+ }
+
+ // Check for child name mismatch
+ mx::ElementPtr mismatchElement = doc->getDescendant("mygraph/input_color4");
+ std::string previousName = mismatchElement->getName();
+ mismatchElement->setName("mismatch_color4");
+ results.clear();
+ equivalent = doc->isEquivalent(doc2, options, &results);
+ if (!equivalent)
+ {
+ printDifferences(results, "Expected name mismatch differences");
+ }
+ else
+ {
+ std::cout << "Unexpected name match equivalence:" << std::endl;
+ std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
+ std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
+ }
+ REQUIRE(!equivalent);
+ mismatchElement->setName(previousName);
+ results.clear();
+ equivalent = doc->isEquivalent(doc2, options, &results);
+ REQUIRE(equivalent);
+
+ // Check for functional nodegraphs
+ mx::NodeGraphPtr nodeGraph = doc->getNodeGraph("mygraph");
+ REQUIRE(nodeGraph);
+ doc->addNodeDef("ND_mygraph");
+ nodeGraph->setNodeDefString("ND_mygraph");
+ mx::NodeGraphPtr nodeGraph2 = doc2->getNodeGraph("mygraph");
+ REQUIRE(nodeGraph2);
+ doc2->addNodeDef("ND_mygraph");
+ nodeGraph2->setNodeDefString("ND_mygraph");
+ results.clear();
+ equivalent = doc->isEquivalent(doc2, options, &results);
+ if (!equivalent)
+ {
+ printDifferences(results, "Expected functional graph differences");
+ }
+ else
+ {
+ std::cout << "Unexpected functional graph equivalence:" << std::endl;
+ std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
+ std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
+ }
+ REQUIRE(!equivalent);
+}
diff --git a/source/PyMaterialX/PyMaterialXCore/PyElement.cpp b/source/PyMaterialX/PyMaterialXCore/PyElement.cpp
index 9f35770e8b..cb70d04704 100644
--- a/source/PyMaterialX/PyMaterialXCore/PyElement.cpp
+++ b/source/PyMaterialX/PyMaterialXCore/PyElement.cpp
@@ -29,6 +29,12 @@ void bindPyElement(py::module& mod)
py::class_(mod, "Element")
.def(py::self == py::self)
.def(py::self != py::self)
+ .def("isEquivalent", [](const mx::Element& elem, mx::ConstElementPtr& rhs, const mx::ElementEquivalenceOptions& options)
+ {
+ mx::ElementEquivalenceResultVec results;
+ bool res = elem.isEquivalent(rhs, options, &results);
+ return std::pair(res, results);
+ })
.def("setCategory", &mx::Element::setCategory)
.def("getCategory", &mx::Element::getCategory)
.def("setName", &mx::Element::setName)
@@ -205,6 +211,25 @@ void bindPyElement(py::module& mod)
py::class_(mod, "GenericElement")
.def_readonly_static("CATEGORY", &mx::GenericElement::CATEGORY);
+ py::class_(mod, "ElementEquivalenceResult")
+ .def_readonly_static("ATTRIBUTE", &mx::ElementEquivalenceResult::ATTRIBUTE)
+ .def_readonly_static("ATTRIBUTE_NAMES", &mx::ElementEquivalenceResult::ATTRIBUTE_NAMES)
+ .def_readonly_static("CHILD_COUNT", &mx::ElementEquivalenceResult::CHILD_COUNT)
+ .def_readonly_static("CHILD_NAME", &mx::ElementEquivalenceResult::CHILD_NAME)
+ .def_readonly_static("NAME", &mx::ElementEquivalenceResult::NAME)
+ .def_readonly_static("CATEGORY", &mx::ElementEquivalenceResult::CATEGORY)
+ .def_readwrite("path1", &mx::ElementEquivalenceResult::path1)
+ .def_readwrite("path2", &mx::ElementEquivalenceResult::path2)
+ .def_readwrite("differenceType", &mx::ElementEquivalenceResult::differenceType)
+ .def_readwrite("attributeName", &mx::ElementEquivalenceResult::attributeName);
+
+ py::class_(mod, "ElementEquivalenceOptions")
+ .def_readwrite("format", &mx::ElementEquivalenceOptions::format)
+ .def_readwrite("precision", &mx::ElementEquivalenceOptions::precision)
+ .def_readwrite("skipAttributes", &mx::ElementEquivalenceOptions::skipAttributes)
+ .def_readwrite("skipValueComparisons", &mx::ElementEquivalenceOptions::skipValueComparisons)
+ .def(py::init<>());
+
py::class_(mod, "StringResolver")
.def("setFilePrefix", &mx::StringResolver::setFilePrefix)
.def("getFilePrefix", &mx::StringResolver::getFilePrefix)
From 610ce0ce4ae33fafddd3909efb3e06cb5aa62b2b Mon Sep 17 00:00:00 2001
From: Dhruv Govil
Date: Wed, 9 Oct 2024 07:47:03 -0700
Subject: [PATCH 09/80] Fix issue with framework builds on latest Xcode with
embedded platforms (#2053)
I discovered an issue with my [previous frameworks PR](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2020) that was showing up on recent Xcode versions where the `Resources` folder was acting as a reserved name on iOS, but is a required name on macOS. I also took the opportunity to clean up the linker code here.
---
cmake/modules/AppleFrameworkBuild.zsh.in | 31 ++++--------------------
source/MaterialXFormat/Util.cpp | 5 +++-
2 files changed, 9 insertions(+), 27 deletions(-)
diff --git a/cmake/modules/AppleFrameworkBuild.zsh.in b/cmake/modules/AppleFrameworkBuild.zsh.in
index 75b0dba0eb..e6e630cc19 100644
--- a/cmake/modules/AppleFrameworkBuild.zsh.in
+++ b/cmake/modules/AppleFrameworkBuild.zsh.in
@@ -20,28 +20,6 @@ BUNDLE_IDENTIFIER="org.aswf.materialx"
CODESIGN_ID="@CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY@"
OLD_RC_PATH="${CMAKE_INSTALL_PREFIX}/lib"
-function fix_linkage() {
- readonly file=${1:?"A file path must be specified."}
- readonly prepend="${FRAMEWORK_NAME}.framework/Libraries"
- filename=$(basename ${file})
- # First, change the install name. This corresponds to LC_ID_DYLIB.
- install_name_tool -id "@rpath/${prepend}/${filename}" ${file}
-
- parts=("${(@f)$(otool -l ${file})}")
- for line in ${parts}; do
- dylib_name=""
- [[ $line =~ ' *name @rpath/(.*\.dylib)' ]] && dylib_name=$match[1]
- if [ -n "${dylib_name}" ]; then
- install_name_tool -change "@rpath/${dylib_name}" "@rpath/${prepend}/${dylib_name}" "${file}"
- fi
- if [[ $line == *"${OLD_RC_PATH}"* ]]; then
- install_name_tool -delete_rpath ${OLD_RC_PATH} ${file}
- fi
- done
-
- codesign -f -s ${CODESIGN_ID} ${file}
-}
-
# Remove the existing directory if it exists
if [ -d ${FRAMEWORK_DIR} ]; then
echo "Removing existing framework";
@@ -53,15 +31,17 @@ echo "Creating Framework Directory: ${FRAMEWORK_DIR}"
mkdir -p ${FRAMEWORK_DIR}
if [ "$EMBEDDED_BUILD" = true ];then
- FRAMEWORK_RESOURCES_DIR="${FRAMEWORK_DIR}/Resources"
+ FRAMEWORK_RESOURCES_DIR="${FRAMEWORK_DIR}/Assets"
FRAMEWORK_PLIST_LOCATION="${FRAMEWORK_DIR}/Info.plist"
FRAMEWORK_HEADERS_DIR="${FRAMEWORK_DIR}/Headers"
FRAMEWORK_LIB_PATH=""${FRAMEWORK_DIR}/${FRAMEWORK_NAME}""
+ FRAMEWORK_LINKER_PATH="@rpath/Frameworks/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}"
else
FRAMEWORK_RESOURCES_DIR="${FRAMEWORK_DIR}/Versions/A/Resources/"
FRAMEWORK_PLIST_LOCATION="${FRAMEWORK_DIR}/Versions/A/Resources/Info.plist"
FRAMEWORK_HEADERS_DIR="${FRAMEWORK_DIR}/Versions/A/Headers"
FRAMEWORK_LIB_PATH="${FRAMEWORK_DIR}/Versions/A/${FRAMEWORK_NAME}"
+ FRAMEWORK_LINKER_PATH="@rpath/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}"
fi
echo "Creating Resources Root: ${FRAMEWORK_RESOURCES_DIR}"
@@ -90,9 +70,8 @@ if [ "$EMBEDDED_BUILD" = false ];then
fi
# Fix the linkage on the primary dylib
-fix_linkage "${FRAMEWORK_DIR}/${FRAMEWORK_NAME}"
-install_name_tool -id "@rpath/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${FRAMEWORK_DIR}/${FRAMEWORK_NAME}"
-install_name_tool -change "@rpath/${FRAMEWORK_NAME}.framework/Libraries/${FRAMEWORK_NAME}" "@rpath/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${FRAMEWORK_DIR}/${FRAMEWORK_NAME}"
+install_name_tool -id "${FRAMEWORK_LINKER_PATH}" "${FRAMEWORK_DIR}/${FRAMEWORK_NAME}"
+install_name_tool -change "@rpath/libMaterialX.@MATERIALX_MAJOR_VERSION@.dylib" "${FRAMEWORK_LINKER_PATH}" "${FRAMEWORK_DIR}/${FRAMEWORK_NAME}"
# Frameworks require all includes to use the framework name as the prefix for automatic discovery
echo "Modifying headers..."
diff --git a/source/MaterialXFormat/Util.cpp b/source/MaterialXFormat/Util.cpp
index 3fc64e3819..ee4e4067f5 100644
--- a/source/MaterialXFormat/Util.cpp
+++ b/source/MaterialXFormat/Util.cpp
@@ -233,8 +233,11 @@ FileSearchPath getDefaultDataSearchPath()
FileSearchPath searchPath;
#if defined(BUILD_APPLE_FRAMEWORK)
+ #if defined(TARGET_OS_IPHONE)
+ const FilePath FRAMEWORK_RESOURCES("Assets");
+ #else
const FilePath FRAMEWORK_RESOURCES("Resources");
-
+ #endif
Dl_info info;
if (dladdr(reinterpret_cast(&getDefaultDataSearchPath), &info))
{
From 5101013ac9a0e4a39971d44d91e7b3cc7c77ee5f Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Wed, 9 Oct 2024 14:05:01 -0700
Subject: [PATCH 10/80] Updates to GitHub CI (#2055)
- Harmonize on ubuntu-22-04 for builds requiring wide coverage, as other Linux environments are more restricted in their latest releases.
---
.github/workflows/main.yml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index dc73409606..0967a6f9ab 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -18,10 +18,10 @@ jobs:
fail-fast: false
matrix:
include:
- - name: Linux_GCC_9_Python37
- os: ubuntu-20.04
+ - name: Linux_GCC_10_Python37
+ os: ubuntu-22.04
compiler: gcc
- compiler_version: "9"
+ compiler_version: "10"
python: 3.7
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON -DMATERIALX_BUILD_MONOLITHIC=ON
@@ -46,10 +46,10 @@ jobs:
coverage_analysis: ON
cmake_config: -DMATERIALX_COVERAGE_ANALYSIS=ON -DMATERIALX_BUILD_RENDER=OFF -DMATERIALX_BUILD_PYTHON=OFF
- - name: Linux_Clang_10_Python37
- os: ubuntu-20.04
+ - name: Linux_Clang_13_Python37
+ os: ubuntu-22.04
compiler: clang
- compiler_version: "10"
+ compiler_version: "13"
python: 3.7
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
@@ -351,7 +351,7 @@ jobs:
sdist:
name: Python SDist
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
if: github.repository == 'AcademySoftwareFoundation/MaterialX'
outputs:
sdist_filename: ${{ steps.generate.outputs.filename }}
@@ -387,7 +387,7 @@ jobs:
fail-fast: false
matrix:
python-minor: ['7', '8', '9', '10', '11', '12']
- os: ['ubuntu-latest', 'windows-2022', 'macos-13']
+ os: ['ubuntu-22.04', 'windows-2022', 'macos-13']
steps:
- name: Sync Repository
From 0f2438e35afda93870232beaa4535a42baece782 Mon Sep 17 00:00:00 2001
From: Lee Kerley <154285602+ld-kerley@users.noreply.github.com>
Date: Thu, 10 Oct 2024 11:42:37 -0700
Subject: [PATCH 11/80] Fix Chiang hair model for Metal Shading language
(#2057)
The current approach for converting GLSL code to MSL doesn't work for the recent Chiang hair PR #1968.
---
libraries/pbrlib/genglsl/mx_hair_bsdf.glsl | 13 ++++++++--
source/MaterialXGenMsl/MslShaderGenerator.cpp | 24 ++++++++++++++++++-
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl b/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
index e3a9ac20d5..ec1acf91b3 100644
--- a/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
+++ b/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
@@ -240,12 +240,21 @@ vec3 mx_chiang_hair_bsdf(
float alpha = cuticle_angle * M_PI - (M_PI / 2.0); // remap [0, 1] to [-PI/2, PI/2]
mx_hair_alpha_angles(alpha, sinThetaI, cosThetaI, angles);
- vec3 tint[4] = vec3[](tint_R, tint_TT, tint_TRT, tint_TRT);
+ vec3 tint[4];
+ tint[0] = tint_R;
+ tint[1] = tint_TT;
+ tint[2] = tint_TRT;
+ tint[3] = tint_TRT;
roughness_R = clamp(roughness_R, 0.001, 1.0);
roughness_TT = clamp(roughness_TT, 0.001, 1.0);
roughness_TRT = clamp(roughness_TRT, 0.001, 1.0);
- vec2 vs[4] = vec2[](roughness_R, roughness_TT, roughness_TRT, roughness_TRT);
+
+ vec2 vs[4];
+ vs[0] = roughness_R;
+ vs[1] = roughness_TT;
+ vs[2] = roughness_TRT;
+ vs[3] = roughness_TRT;
// R, TT, TRT, TRRT+
vec3 F = vec3(0.0);
diff --git a/source/MaterialXGenMsl/MslShaderGenerator.cpp b/source/MaterialXGenMsl/MslShaderGenerator.cpp
index 8db763d7e1..5476b33c90 100644
--- a/source/MaterialXGenMsl/MslShaderGenerator.cpp
+++ b/source/MaterialXGenMsl/MslShaderGenerator.cpp
@@ -237,7 +237,29 @@ void MslShaderGenerator::MetalizeGeneratedShader(ShaderStage& shaderStage) const
}
size_t typename_end = pos;
std::string typeName = sourceCode.substr(typename_beg, typename_end - typename_beg);
- sourceCode.replace(beg, typename_end - beg, "thread " + typeName + "&");
+
+ while (std::isspace(sourceCode[pos]))
+ {
+ ++pos;
+ }
+ size_t varname_beg = pos;
+ while (!std::isspace(sourceCode[pos]) && sourceCode[pos] != '\n' && sourceCode[pos] != ',' && sourceCode[pos] != ')' )
+ {
+ ++pos;
+ }
+ size_t varname_end = pos;
+ std::string varName = sourceCode.substr(varname_beg, varname_end - varname_beg);
+
+ if (varName.find('[') != std::string::npos)
+ {
+ // if the variable is an array then we don't need to declare it as a reference,
+ // we will effectively just be passing the pointer to the array
+ sourceCode.replace(beg, typename_end - beg, "thread " + typeName);
+ }
+ else
+ {
+ sourceCode.replace(beg, typename_end - beg, "thread " + typeName + "&");
+ }
}
pos = sourceCode.find(keyword, pos);
}
From cb04ef7b2388592125fe61b5dae7782523847a5b Mon Sep 17 00:00:00 2001
From: Lee Kerley <154285602+ld-kerley@users.noreply.github.com>
Date: Thu, 10 Oct 2024 11:43:22 -0700
Subject: [PATCH 12/80] Refactor mx_math files to remove GLSL guard (#2014)
Refactor mx_math.glsl and mx_math.metal to remove the `__DECL_GL_MATH_FUNCTIONS__` guard, and prefix any necessary functions to ensure isolation from other shader generators, such as HdStorm.
---
.../lib/mx_generate_prefilter_env.glsl | 6 +-
.../pbrlib/genglsl/lib/mx_microfacet.glsl | 8 +-
.../genglsl/lib/mx_microfacet_diffuse.glsl | 8 +-
.../genglsl/lib/mx_microfacet_specular.glsl | 20 +--
libraries/stdlib/genglsl/lib/mx_math.glsl | 113 +++++++++++++++-
.../stdlib/genglsl/mx_rotate_vector2.glsl | 6 +-
.../stdlib/genglsl/mx_rotate_vector3.glsl | 6 +-
.../stdlib/genglsl/stdlib_genglsl_impl.mtlx | 48 +++----
libraries/stdlib/genmsl/lib/mx_math.metal | 126 +++++++++++++++---
.../stdlib/genmsl/stdlib_genmsl_impl.mtlx | 52 ++++----
10 files changed, 296 insertions(+), 97 deletions(-)
diff --git a/libraries/pbrlib/genglsl/lib/mx_generate_prefilter_env.glsl b/libraries/pbrlib/genglsl/lib/mx_generate_prefilter_env.glsl
index 7a80d0d3ec..7bc202bfeb 100644
--- a/libraries/pbrlib/genglsl/lib/mx_generate_prefilter_env.glsl
+++ b/libraries/pbrlib/genglsl/lib/mx_generate_prefilter_env.glsl
@@ -13,9 +13,9 @@ vec3 mx_latlong_map_projection_inverse(vec2 uv)
float latitude = (uv.y - 0.5) * M_PI;
float longitude = (uv.x - 0.5) * M_PI * 2.0;
- float x = -cos(latitude) * sin(longitude);
- float y = -sin(latitude);
- float z = cos(latitude) * cos(longitude);
+ float x = -mx_cos(latitude) * mx_sin(longitude);
+ float y = -mx_sin(latitude);
+ float z = mx_cos(latitude) * mx_cos(longitude);
return vec3(x, y, z);
}
diff --git a/libraries/pbrlib/genglsl/lib/mx_microfacet.glsl b/libraries/pbrlib/genglsl/lib/mx_microfacet.glsl
index f0e6f55c13..05c12e907c 100644
--- a/libraries/pbrlib/genglsl/lib/mx_microfacet.glsl
+++ b/libraries/pbrlib/genglsl/lib/mx_microfacet.glsl
@@ -77,8 +77,8 @@ vec3 mx_uniform_sample_hemisphere(vec2 Xi)
float phi = 2.0 * M_PI * Xi.x;
float cosTheta = 1.0 - Xi.y;
float sinTheta = sqrt(1.0 - mx_square(cosTheta));
- return vec3(cos(phi) * sinTheta,
- sin(phi) * sinTheta,
+ return vec3(mx_cos(phi) * sinTheta,
+ mx_sin(phi) * sinTheta,
cosTheta);
}
@@ -88,8 +88,8 @@ vec3 mx_cosine_sample_hemisphere(vec2 Xi)
float phi = 2.0 * M_PI * Xi.x;
float cosTheta = sqrt(Xi.y);
float sinTheta = sqrt(1.0 - Xi.y);
- return vec3(cos(phi) * sinTheta,
- sin(phi) * sinTheta,
+ return vec3(mx_cos(phi) * sinTheta,
+ mx_sin(phi) * sinTheta,
cosTheta);
}
diff --git a/libraries/pbrlib/genglsl/lib/mx_microfacet_diffuse.glsl b/libraries/pbrlib/genglsl/lib/mx_microfacet_diffuse.glsl
index 622db85012..f26c15df37 100644
--- a/libraries/pbrlib/genglsl/lib/mx_microfacet_diffuse.glsl
+++ b/libraries/pbrlib/genglsl/lib/mx_microfacet_diffuse.glsl
@@ -89,7 +89,7 @@ float mx_oren_nayar_fujii_diffuse_dir_albedo(float cosTheta, float roughness)
float A = 1.0 / (1.0 + FUJII_CONSTANT_1 * roughness);
float B = roughness * A;
float Si = sqrt(max(0.0, 1.0 - mx_square(cosTheta)));
- float G = Si * (acos(clamp(cosTheta, -1.0, 1.0)) - Si * cosTheta) +
+ float G = Si * (mx_acos(clamp(cosTheta, -1.0, 1.0)) - Si * cosTheta) +
2.0 * ((Si / cosTheta) * (1.0 - Si * Si * Si) - Si) / 3.0;
return A + (B * G * M_PI_INV);
}
@@ -169,7 +169,7 @@ vec3 mx_burley_diffusion_profile(float dist, vec3 shape)
// Inspired by Eric Penner's presentation in http://advances.realtimerendering.com/s2011/
vec3 mx_integrate_burley_diffusion(vec3 N, vec3 L, float radius, vec3 mfp)
{
- float theta = acos(dot(N, L));
+ float theta = mx_acos(dot(N, L));
// Estimate the Burley diffusion shape from mean free path.
vec3 shape = vec3(1.0) / max(mfp, 0.1);
@@ -182,9 +182,9 @@ vec3 mx_integrate_burley_diffusion(vec3 N, vec3 L, float radius, vec3 mfp)
for (int i = 0; i < SAMPLE_COUNT; i++)
{
float x = -M_PI + (float(i) + 0.5) * SAMPLE_WIDTH;
- float dist = radius * abs(2.0 * sin(x * 0.5));
+ float dist = radius * abs(2.0 * mx_sin(x * 0.5));
vec3 R = mx_burley_diffusion_profile(dist, shape);
- sumD += R * max(cos(theta + x), 0.0);
+ sumD += R * max(mx_cos(theta + x), 0.0);
sumR += R;
}
diff --git a/libraries/pbrlib/genglsl/lib/mx_microfacet_specular.glsl b/libraries/pbrlib/genglsl/lib/mx_microfacet_specular.glsl
index 0e77e545e9..fd52bd7435 100644
--- a/libraries/pbrlib/genglsl/lib/mx_microfacet_specular.glsl
+++ b/libraries/pbrlib/genglsl/lib/mx_microfacet_specular.glsl
@@ -48,8 +48,8 @@ vec3 mx_ggx_importance_sample_VNDF(vec2 Xi, vec3 V, vec2 alpha)
float phi = 2.0 * M_PI * Xi.x;
float z = (1.0 - Xi.y) * (1.0 + V.z) - V.z;
float sinTheta = sqrt(clamp(1.0 - z * z, 0.0, 1.0));
- float x = sinTheta * cos(phi);
- float y = sinTheta * sin(phi);
+ float x = sinTheta * mx_cos(phi);
+ float y = sinTheta * mx_sin(phi);
vec3 c = vec3(x, y, z);
// Compute the microfacet normal.
@@ -286,9 +286,9 @@ void mx_fresnel_conductor_phase_polarized(float cosTheta, float eta1, vec3 eta2,
vec3 U = sqrt((A+B)/2.0);
vec3 V = max(vec3(0.0), sqrt((B-A)/2.0));
- phiS = atan(2.0*eta1*V*cosTheta, U*U + V*V - mx_square(eta1*cosTheta));
- phiP = atan(2.0*eta1*eta2*eta2*cosTheta * (2.0*k2*U - (vec3(1.0)-k2*k2) * V),
- mx_square(eta2*eta2*(vec3(1.0)+k2*k2)*cosTheta) - eta1*eta1*(U*U+V*V));
+ phiS = mx_atan(2.0*eta1*V*cosTheta, U*U + V*V - mx_square(eta1*cosTheta));
+ phiP = mx_atan(2.0*eta1*eta2*eta2*cosTheta * (2.0*k2*U - (vec3(1.0)-k2*k2) * V),
+ mx_square(eta2*eta2*(vec3(1.0)+k2*k2)*cosTheta) - eta1*eta1*(U*U+V*V));
}
// https://belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.html
@@ -299,8 +299,8 @@ vec3 mx_eval_sensitivity(float opd, vec3 shift)
vec3 val = vec3(5.4856e-13, 4.4201e-13, 5.2481e-13);
vec3 pos = vec3(1.6810e+06, 1.7953e+06, 2.2084e+06);
vec3 var = vec3(4.3278e+09, 9.3046e+09, 6.6121e+09);
- vec3 xyz = val * sqrt(2.0*M_PI * var) * cos(pos * phase + shift) * exp(- var * phase*phase);
- xyz.x += 9.7470e-14 * sqrt(2.0*M_PI * 4.5282e+09) * cos(2.2399e+06 * phase + shift[0]) * exp(- 4.5282e+09 * phase*phase);
+ vec3 xyz = val * sqrt(2.0*M_PI * var) * mx_cos(pos * phase + shift) * exp(- var * phase*phase);
+ xyz.x += 9.7470e-14 * sqrt(2.0*M_PI * 4.5282e+09) * mx_cos(2.2399e+06 * phase + shift[0]) * exp(- 4.5282e+09 * phase*phase);
return xyz / 1.0685e-7;
}
@@ -341,7 +341,7 @@ vec3 mx_fresnel_airy(float cosTheta, FresnelData fd)
}
// Phase shift
- float cosB = cos(atan(eta2 / eta1));
+ float cosB = mx_cos(mx_atan(eta2 / eta1));
vec2 phi21 = vec2(cosTheta < cosB ? 0.0 : M_PI, M_PI);
vec3 phi23p, phi23s;
if (fd.model == FRESNEL_MODEL_SCHLICK)
@@ -486,8 +486,8 @@ vec3 mx_refraction_solid_sphere(vec3 R, vec3 N, float ior)
vec2 mx_latlong_projection(vec3 dir)
{
- float latitude = -asin(dir.y) * M_PI_INV + 0.5;
- float longitude = atan(dir.x, -dir.z) * M_PI_INV * 0.5 + 0.5;
+ float latitude = -mx_asin(dir.y) * M_PI_INV + 0.5;
+ float longitude = mx_atan(dir.x, -dir.z) * M_PI_INV * 0.5 + 0.5;
return vec2(longitude, latitude);
}
diff --git a/libraries/stdlib/genglsl/lib/mx_math.glsl b/libraries/stdlib/genglsl/lib/mx_math.glsl
index cff7835a4c..838fe1f3dd 100644
--- a/libraries/stdlib/genglsl/lib/mx_math.glsl
+++ b/libraries/stdlib/genglsl/lib/mx_math.glsl
@@ -4,12 +4,10 @@ float mx_square(float x)
{
return x*x;
}
-
vec2 mx_square(vec2 x)
{
return x*x;
}
-
vec3 mx_square(vec3 x)
{
return x*x;
@@ -27,3 +25,114 @@ float mx_inversesqrt(float x)
{
return inversesqrt(x);
}
+
+float mx_radians(float degree)
+{
+ return radians(degree);
+}
+
+float mx_sin(float x)
+{
+ return sin(x);
+}
+vec2 mx_sin(vec2 x)
+{
+ return sin(x);
+}
+vec3 mx_sin(vec3 x)
+{
+ return sin(x);
+}
+vec4 mx_sin(vec4 x)
+{
+ return sin(x);
+}
+
+float mx_cos(float x)
+{
+ return cos(x);
+}
+vec2 mx_cos(vec2 x)
+{
+ return cos(x);
+}
+vec3 mx_cos(vec3 x)
+{
+ return cos(x);
+}
+vec4 mx_cos(vec4 x)
+{
+ return cos(x);
+}
+
+float mx_tan(float x)
+{
+ return tan(x);
+}
+vec2 mx_tan(vec2 x)
+{
+ return tan(x);
+}
+vec3 mx_tan(vec3 x)
+{
+ return tan(x);
+}
+vec4 mx_tan(vec4 x)
+{
+ return tan(x);
+}
+
+float mx_asin(float x)
+{
+ return asin(x);
+}
+vec2 mx_asin(vec2 x)
+{
+ return asin(x);
+}
+vec3 mx_asin(vec3 x)
+{
+ return asin(x);
+}
+vec4 mx_asin(vec4 x)
+{
+ return asin(x);
+}
+
+float mx_acos(float x)
+{
+ return acos(x);
+}
+vec2 mx_acos(vec2 x)
+{
+ return acos(x);
+}
+vec3 mx_acos(vec3 x)
+{
+ return acos(x);
+}
+vec4 mx_acos(vec4 x)
+{
+ return acos(x);
+}
+
+float mx_atan(float y_over_x)
+{
+ return atan(y_over_x);
+}
+float mx_atan(float y, float x)
+{
+ return atan(y, x);
+}
+vec2 mx_atan(vec2 y, vec2 x)
+{
+ return atan(y, x);
+}
+vec3 mx_atan(vec3 y, vec3 x)
+{
+ return atan(y, x);
+}
+vec4 mx_atan(vec4 y, vec4 x)
+{
+ return atan(y, x);
+}
diff --git a/libraries/stdlib/genglsl/mx_rotate_vector2.glsl b/libraries/stdlib/genglsl/mx_rotate_vector2.glsl
index a66c17d0ab..d01270d8ce 100644
--- a/libraries/stdlib/genglsl/mx_rotate_vector2.glsl
+++ b/libraries/stdlib/genglsl/mx_rotate_vector2.glsl
@@ -1,7 +1,7 @@
void mx_rotate_vector2(vec2 _in, float amount, out vec2 result)
{
- float rotationRadians = radians(amount);
- float sa = sin(rotationRadians);
- float ca = cos(rotationRadians);
+ float rotationRadians = mx_radians(amount);
+ float sa = mx_sin(rotationRadians);
+ float ca = mx_cos(rotationRadians);
result = vec2(ca*_in.x + sa*_in.y, -sa*_in.x + ca*_in.y);
}
diff --git a/libraries/stdlib/genglsl/mx_rotate_vector3.glsl b/libraries/stdlib/genglsl/mx_rotate_vector3.glsl
index fb06e120ec..fda1188379 100644
--- a/libraries/stdlib/genglsl/mx_rotate_vector3.glsl
+++ b/libraries/stdlib/genglsl/mx_rotate_vector3.glsl
@@ -1,8 +1,8 @@
mat4 mx_rotationMatrix(vec3 axis, float angle)
{
axis = normalize(axis);
- float s = sin(angle);
- float c = cos(angle);
+ float s = mx_sin(angle);
+ float c = mx_cos(angle);
float oc = 1.0 - c;
return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0,
@@ -13,7 +13,7 @@ mat4 mx_rotationMatrix(vec3 axis, float angle)
void mx_rotate_vector3(vec3 _in, float amount, vec3 axis, out vec3 result)
{
- float rotationRadians = radians(amount);
+ float rotationRadians = mx_radians(amount);
mat4 m = mx_rotationMatrix(axis, rotationRadians);
result = (m * vec4(_in, 1.0)).xyz;
}
diff --git a/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx b/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx
index c3ee147e13..765c48c77b 100644
--- a/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx
+++ b/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx
@@ -326,30 +326,30 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libraries/stdlib/genmsl/lib/mx_math.metal b/libraries/stdlib/genmsl/lib/mx_math.metal
index 46a8c5d57e..cda4e867e4 100644
--- a/libraries/stdlib/genmsl/lib/mx_math.metal
+++ b/libraries/stdlib/genmsl/lib/mx_math.metal
@@ -4,12 +4,10 @@ float mx_square(float x)
{
return x*x;
}
-
vec2 mx_square(vec2 x)
{
return x*x;
}
-
vec3 mx_square(vec3 x)
{
return x*x;
@@ -26,11 +24,12 @@ float mx_inversesqrt(float x)
return ::rsqrt(x);
}
-#ifdef __DECL_GL_MATH_FUNCTIONS__
-
-float radians(float degree) { return (degree * M_PI_F / 180.0f); }
+float mx_radians(float degree)
+{
+ return (degree * M_PI_F / 180.0f);
+}
-float3x3 inverse(float3x3 m)
+float3x3 mx_inverse(float3x3 m)
{
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0];
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1];
@@ -56,7 +55,7 @@ float3x3 inverse(float3x3 m)
return ret;
}
-float4x4 inverse(float4x4 m)
+float4x4 mx_inverse(float4x4 m)
{
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0];
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1];
@@ -96,17 +95,108 @@ float4x4 inverse(float4x4 m)
return ret;
}
-template
-T atan(T y_over_x) { return ::atan(y_over_x); }
+float mx_sin(float x)
+{
+ return sin(x);
+}
+vec2 mx_sin(vec2 x)
+{
+ return sin(x);
+}
+vec3 mx_sin(vec3 x)
+{
+ return sin(x);
+}
+vec4 mx_sin(vec4 x)
+{
+ return sin(x);
+}
-template
-T atan(T y, T x) { return ::atan2(y, x); }
+float mx_cos(float x)
+{
+ return cos(x);
+}
+vec2 mx_cos(vec2 x)
+{
+ return cos(x);
+}
+vec3 mx_cos(vec3 x)
+{
+ return cos(x);
+}
+vec4 mx_cos(vec4 x)
+{
+ return cos(x);
+}
-#define lessThan(a, b) ((a) < (b))
-#define lessThanEqual(a, b) ((a) <= (b))
-#define greaterThan(a, b) ((a) > (b))
-#define greaterThanEqual(a, b) ((a) >= (b))
-#define equal(a, b) ((a) == (b))
-#define notEqual(a, b) ((a) != (b))
+float mx_tan(float x)
+{
+ return tan(x);
+}
+vec2 mx_tan(vec2 x)
+{
+ return tan(x);
+}
+vec3 mx_tan(vec3 x)
+{
+ return tan(x);
+}
+vec4 mx_tan(vec4 x)
+{
+ return tan(x);
+}
-#endif
+float mx_asin(float x)
+{
+ return asin(x);
+}
+vec2 mx_asin(vec2 x)
+{
+ return asin(x);
+}
+vec3 mx_asin(vec3 x)
+{
+ return asin(x);
+}
+vec4 mx_asin(vec4 x)
+{
+ return asin(x);
+}
+
+float mx_acos(float x)
+{
+ return acos(x);
+}
+vec2 mx_acos(vec2 x)
+{
+ return acos(x);
+}
+vec3 mx_acos(vec3 x)
+{
+ return acos(x);
+}
+vec4 mx_acos(vec4 x)
+{
+ return acos(x);
+}
+
+float mx_atan(float y_over_x)
+{
+ return ::atan(y_over_x);
+}
+float mx_atan(float y, float x)
+{
+ return ::atan2(y, x);
+}
+vec2 mx_atan(vec2 y, vec2 x)
+{
+ return ::atan2(y, x);
+}
+vec3 mx_atan(vec3 y, vec3 x)
+{
+ return ::atan2(y, x);
+}
+vec4 mx_atan(vec4 y, vec4 x)
+{
+ return ::atan2(y, x);
+}
diff --git a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
index 2f69a1bb90..ab4461cad4 100644
--- a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
+++ b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
@@ -327,30 +327,30 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -459,8 +459,8 @@
-
-
+
+
From 4f380f3b47041b1b2768acf484564906547a8d1c Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Sat, 12 Oct 2024 09:09:43 -0700
Subject: [PATCH 13/80] Simplify mx_math files (#2058)
This changelist simplifies mx_math.glsl and mx_math.metal to reduce code repetition and clarify the differences between dedicated helper functions and simple keyword replacement.
Additionally it addresses an omitted update from atan to mx_atan in the implementation of chiang_hair_bsdf, and adds an update step to Linux CI for robustness.
---
.github/workflows/main.yml | 1 +
libraries/pbrlib/genglsl/mx_hair_bsdf.glsl | 2 +-
libraries/stdlib/genglsl/lib/mx_math.glsl | 127 ++-------------------
libraries/stdlib/genmsl/lib/mx_math.metal | 113 ++++--------------
4 files changed, 33 insertions(+), 210 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0967a6f9ab..95516bd4e5 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -127,6 +127,7 @@ jobs:
- name: Install Dependencies (Linux)
if: runner.os == 'Linux'
run: |
+ sudo apt-get update
sudo apt-get install xorg-dev
if [ "${{ matrix.compiler_version }}" != 'None' ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
diff --git a/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl b/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
index ec1acf91b3..8ac6222714 100644
--- a/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
+++ b/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
@@ -213,7 +213,7 @@ vec3 mx_chiang_hair_bsdf(
float x1 = dot(L, Y);
float y2 = dot(V, N);
float x2 = dot(V, Y);
- float phi = atan(y1 * x2 - y2 * x1, x1 * x2 + y1 * y2);
+ float phi = mx_atan(y1 * x2 - y2 * x1, x1 * x2 + y1 * y2);
vec3 k1_p = normalize(V - X * dot(V, X));
float cosGammaO = dot(N, k1_p);
diff --git a/libraries/stdlib/genglsl/lib/mx_math.glsl b/libraries/stdlib/genglsl/lib/mx_math.glsl
index 838fe1f3dd..f87e5653da 100644
--- a/libraries/stdlib/genglsl/lib/mx_math.glsl
+++ b/libraries/stdlib/genglsl/lib/mx_math.glsl
@@ -1,13 +1,24 @@
#define M_FLOAT_EPS 1e-8
+#define mx_inversesqrt inversesqrt
+#define mx_sin sin
+#define mx_cos cos
+#define mx_tan tan
+#define mx_asin asin
+#define mx_acos acos
+#define mx_atan atan
+#define mx_radians radians
+
float mx_square(float x)
{
return x*x;
}
+
vec2 mx_square(vec2 x)
{
return x*x;
}
+
vec3 mx_square(vec3 x)
{
return x*x;
@@ -20,119 +31,3 @@ vec3 mx_srgb_encode(vec3 color)
vec3 powSeg = 1.055 * pow(max(color, vec3(0.0)), vec3(1.0 / 2.4)) - 0.055;
return mix(linSeg, powSeg, isAbove);
}
-
-float mx_inversesqrt(float x)
-{
- return inversesqrt(x);
-}
-
-float mx_radians(float degree)
-{
- return radians(degree);
-}
-
-float mx_sin(float x)
-{
- return sin(x);
-}
-vec2 mx_sin(vec2 x)
-{
- return sin(x);
-}
-vec3 mx_sin(vec3 x)
-{
- return sin(x);
-}
-vec4 mx_sin(vec4 x)
-{
- return sin(x);
-}
-
-float mx_cos(float x)
-{
- return cos(x);
-}
-vec2 mx_cos(vec2 x)
-{
- return cos(x);
-}
-vec3 mx_cos(vec3 x)
-{
- return cos(x);
-}
-vec4 mx_cos(vec4 x)
-{
- return cos(x);
-}
-
-float mx_tan(float x)
-{
- return tan(x);
-}
-vec2 mx_tan(vec2 x)
-{
- return tan(x);
-}
-vec3 mx_tan(vec3 x)
-{
- return tan(x);
-}
-vec4 mx_tan(vec4 x)
-{
- return tan(x);
-}
-
-float mx_asin(float x)
-{
- return asin(x);
-}
-vec2 mx_asin(vec2 x)
-{
- return asin(x);
-}
-vec3 mx_asin(vec3 x)
-{
- return asin(x);
-}
-vec4 mx_asin(vec4 x)
-{
- return asin(x);
-}
-
-float mx_acos(float x)
-{
- return acos(x);
-}
-vec2 mx_acos(vec2 x)
-{
- return acos(x);
-}
-vec3 mx_acos(vec3 x)
-{
- return acos(x);
-}
-vec4 mx_acos(vec4 x)
-{
- return acos(x);
-}
-
-float mx_atan(float y_over_x)
-{
- return atan(y_over_x);
-}
-float mx_atan(float y, float x)
-{
- return atan(y, x);
-}
-vec2 mx_atan(vec2 y, vec2 x)
-{
- return atan(y, x);
-}
-vec3 mx_atan(vec3 y, vec3 x)
-{
- return atan(y, x);
-}
-vec4 mx_atan(vec4 y, vec4 x)
-{
- return atan(y, x);
-}
diff --git a/libraries/stdlib/genmsl/lib/mx_math.metal b/libraries/stdlib/genmsl/lib/mx_math.metal
index cda4e867e4..afd8fb4a7e 100644
--- a/libraries/stdlib/genmsl/lib/mx_math.metal
+++ b/libraries/stdlib/genmsl/lib/mx_math.metal
@@ -1,32 +1,35 @@
#define M_FLOAT_EPS 1e-8
+#define mx_sin sin
+#define mx_cos cos
+#define mx_tan tan
+#define mx_asin asin
+#define mx_acos acos
+
float mx_square(float x)
{
return x*x;
}
+
vec2 mx_square(vec2 x)
{
return x*x;
}
+
vec3 mx_square(vec3 x)
{
return x*x;
}
-template
-T1 mx_mod(T1 x, T2 y)
-{
- return x - y * floor(x/y);
-}
-
float mx_inversesqrt(float x)
{
return ::rsqrt(x);
}
-float mx_radians(float degree)
+template
+T1 mx_mod(T1 x, T2 y)
{
- return (degree * M_PI_F / 180.0f);
+ return x - y * floor(x/y);
}
float3x3 mx_inverse(float3x3 m)
@@ -95,108 +98,32 @@ float4x4 mx_inverse(float4x4 m)
return ret;
}
-float mx_sin(float x)
-{
- return sin(x);
-}
-vec2 mx_sin(vec2 x)
-{
- return sin(x);
-}
-vec3 mx_sin(vec3 x)
-{
- return sin(x);
-}
-vec4 mx_sin(vec4 x)
-{
- return sin(x);
-}
-
-float mx_cos(float x)
-{
- return cos(x);
-}
-vec2 mx_cos(vec2 x)
-{
- return cos(x);
-}
-vec3 mx_cos(vec3 x)
-{
- return cos(x);
-}
-vec4 mx_cos(vec4 x)
-{
- return cos(x);
-}
-
-float mx_tan(float x)
-{
- return tan(x);
-}
-vec2 mx_tan(vec2 x)
-{
- return tan(x);
-}
-vec3 mx_tan(vec3 x)
-{
- return tan(x);
-}
-vec4 mx_tan(vec4 x)
-{
- return tan(x);
-}
-
-float mx_asin(float x)
-{
- return asin(x);
-}
-vec2 mx_asin(vec2 x)
-{
- return asin(x);
-}
-vec3 mx_asin(vec3 x)
-{
- return asin(x);
-}
-vec4 mx_asin(vec4 x)
-{
- return asin(x);
-}
-
-float mx_acos(float x)
-{
- return acos(x);
-}
-vec2 mx_acos(vec2 x)
-{
- return acos(x);
-}
-vec3 mx_acos(vec3 x)
-{
- return acos(x);
-}
-vec4 mx_acos(vec4 x)
-{
- return acos(x);
-}
-
float mx_atan(float y_over_x)
{
return ::atan(y_over_x);
}
+
float mx_atan(float y, float x)
{
return ::atan2(y, x);
}
+
vec2 mx_atan(vec2 y, vec2 x)
{
return ::atan2(y, x);
}
+
vec3 mx_atan(vec3 y, vec3 x)
{
return ::atan2(y, x);
}
+
vec4 mx_atan(vec4 y, vec4 x)
{
return ::atan2(y, x);
}
+
+float mx_radians(float degree)
+{
+ return (degree * M_PI_F / 180.0f);
+}
From 0ba2ad0d712283cdf9cf33ab16cd1656a18e6276 Mon Sep 17 00:00:00 2001
From: Masuo Suzuki <153872239+msuzuki-nvidia@users.noreply.github.com>
Date: Sat, 12 Oct 2024 17:41:16 -0700
Subject: [PATCH 14/80] Add hair nodes to MDL backend (#2059)
This PR introduces support for hair nodes to the MDL backend.
Nodes to add:
- ``
- ``
- ``
- ``
---
.../pbrlib/genmdl/pbrlib_genmdl_impl.mtlx | 12 +++
.../mdl/materialx/pbrlib_1_6.mdl | 90 +++++++++++++++++++
.../MaterialXTest/MaterialXGenMdl/GenMdl.cpp | 6 +-
source/MaterialXTest/MaterialXGenMdl/GenMdl.h | 3 -
4 files changed, 103 insertions(+), 8 deletions(-)
diff --git a/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx b/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
index 86b19eaa71..754594620b 100644
--- a/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
+++ b/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
@@ -25,6 +25,9 @@
+
+
+
@@ -90,4 +93,13 @@
+
+
+
+
+
+
+
+
+
diff --git a/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl b/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl
index ef2e090a49..b69d59e8b0 100644
--- a/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl
+++ b/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl
@@ -428,6 +428,35 @@ export material mx_thin_film_bsdf(
volume: mxp_base.volume
);
+export material mx_chiang_hair_bsdf(
+ // TODO: MDL's chiang_hair BSDF has no support tinting each lobes
+ color mxp_tint_R = color(1.0),
+ color mxp_tint_TT = color(1.0),
+ color mxp_tint_TRT = color(1.0),
+ float mxp_ior = 1.55,
+ float2 mxp_roughness_R = float2(0.1, 0.1),
+ float2 mxp_roughness_TT = float2(0.05, 0.05),
+ float2 mxp_roughness_TRT = float2(0.2, 0.2),
+ float mxp_cuticle_angle = 0.5,
+ float3 mxp_absorption_coefficient = float3(0.0),
+ // TODO: MDL's chiang_hair BSDF has no support user tangent vector
+ float3 mxp_curve_direction = state::texture_tangent_u(0)
+) [[
+ anno::usage( "materialx:bsdf")
+]]
+= material(
+ hair: df::chiang_hair_bsdf(
+ diffuse_reflection_weight: 0.0,
+ diffuse_reflection_tint: color(0.0),
+ roughness_R: mxp_roughness_R,
+ roughness_TT: mxp_roughness_TT,
+ roughness_TRT: mxp_roughness_TRT,
+ cuticle_angle: mxp_cuticle_angle,
+ absorption_coefficient: mxp_absorption_coefficient,
+ ior: mxp_ior
+ )
+);
+
// EDF Nodes
export material mx_uniform_edf(
@@ -980,3 +1009,64 @@ export mx_artistic_ior__result mx_artistic_ior(
color k = math::sqrt(k2);
return mx_artistic_ior__result(n,k);
}
+
+export float3 mx_dion_hair_absorption_from_melanin(
+ float mxp_melanin_concentration = 0.25,
+ float mxp_melanin_redness = 0.5,
+ color mxp_eumelanin_color = color(0.657704, 0.498077, 0.254107),
+ color mxp_pheomelanin_color = color(0.829444, 0.67032, 0.349938)
+) {
+ float melanin = -math::log(math::max(1.0 - mxp_melanin_concentration, 0.0001));
+ float eumelanin = melanin * (1.0 = mxp_melanin_redness);
+ float pheomelanin = melanin * mxp_melanin_redness;
+ return math::max(
+ eumelanin * -math::log(mxp_eumelanin_color) + pheomelanin * -math::log(mxp_pheomelanin_color),
+ float3(0.0)
+ );
+}
+
+export float3 mx_chiang_hair_absorption_from_color(
+ color mxp_color = color(1.0, 1.0, 1.0),
+ float mxp_azimuthal_roughness = 0.2
+) {
+ float r2 = mxp_azimuthal_roughness * mxp_azimuthal_roughness;
+ float r4 = r2 * r2;
+ float r_fac =
+ 5.969 -
+ (0.215 * mxp_azimuthal_roughness) +
+ (2.532 * r2) -
+ (10.73 * r2 * mxp_azimuthal_roughness) +
+ (5.574 * r4) +
+ (0.245 * r4 * mxp_azimuthal_roughness);
+ float3 sigma = math::log(math::min(math::max(mxp_color, 0.001), float3(1.0))) / r_fac;
+ return (sigma * sigma);
+}
+
+// Supportive struct type for the three outputs of mx_chiang_hair_roughness
+export struct mx_chiang_hair_roughness__result {
+ float2 mxp_roughness_R;
+ float2 mxp_roughness_TT;
+ float2 mxp_roughness_TRT;
+};
+
+export mx_chiang_hair_roughness__result mx_chiang_hair_roughness(
+ float mxp_longitudinal = 0.1,
+ float mxp_azimuthal = 0.2,
+ float mxp_scale_TT = 0.5,
+ float mxp_scale_TRT = 2.0
+) {
+ float lr = math::clamp(mxp_longitudinal, 0.001, 1.0);
+ float ar = math::clamp(mxp_azimuthal, 0.001, 1.0);
+
+ // longitudinal variance
+ float v = 0.726 * lr + 0.812 * lr * lr + 3.7 * math::pow(lr, 20);
+ v = v * v;
+
+ float s = 0.265 * ar + 1.194 * ar * ar + 5.372 * math::pow(ar, 22);
+
+ float2 roughness_R = float2(v, s);
+ float2 roughness_TT = float2(v * mxp_scale_TT * mxp_scale_TT, s);
+ float2 roughness_TRT = float2(v * mxp_scale_TRT * mxp_scale_TRT, s);
+
+ return mx_chiang_hair_roughness__result(roughness_R, roughness_TT, roughness_TRT);
+}
diff --git a/source/MaterialXTest/MaterialXGenMdl/GenMdl.cpp b/source/MaterialXTest/MaterialXGenMdl/GenMdl.cpp
index 12a1f33868..e1a23cf7d4 100644
--- a/source/MaterialXTest/MaterialXGenMdl/GenMdl.cpp
+++ b/source/MaterialXTest/MaterialXGenMdl/GenMdl.cpp
@@ -93,12 +93,8 @@ TEST_CASE("GenShader: MDL Implementation Check", "[genmdl]")
generatorSkipNodeTypes.insert("light");
mx::StringSet generatorSkipNodeDefs;
- generatorSkipNodeDefs.insert("ND_chiang_hair_roughness");
- generatorSkipNodeDefs.insert("ND_chiang_hair_absorption_from_color");
- generatorSkipNodeDefs.insert("ND_deon_hair_absorption_from_melanin");
- generatorSkipNodeDefs.insert("ND_chiang_hair_bsdf");
- GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 35);
+ GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs, 31);
}
diff --git a/source/MaterialXTest/MaterialXGenMdl/GenMdl.h b/source/MaterialXTest/MaterialXGenMdl/GenMdl.h
index 1e617f73fb..ab92a5dacf 100644
--- a/source/MaterialXTest/MaterialXGenMdl/GenMdl.h
+++ b/source/MaterialXTest/MaterialXGenMdl/GenMdl.h
@@ -50,9 +50,6 @@ class MdlShaderGeneratorTester : public GenShaderUtil::ShaderGeneratorTester
_skipFiles.insert("heighttonormal_in_nodegraph.mtlx");
}
- _skipFiles.insert("hair_bsdf.mtlx");
- _skipFiles.insert("hair_surfaceshader.mtlx");
-
ShaderGeneratorTester::addSkipFiles();
}
From 3f6c60578b9924f45ea8a7ca08b3ea7a6bec8ce7 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Sun, 13 Oct 2024 12:47:11 -0700
Subject: [PATCH 15/80] Refinements to chiang_hair_bsdf (#2060)
- Fix MSL and ESSL compatibility issues in the implementation of chiang_hair_bsdf, including integer-to-float conversions and computations of boolean arrays.
- Move the GLSL implementation of chiang_hair_bsdf to mx_chiang_hair_bsdf.glsl for consistency with other nodes.
- Remove a stray reference to the GLSL implementation in MDL.
---
.../{mx_hair_bsdf.glsl => mx_chiang_hair_bsdf.glsl} | 11 +++++------
libraries/pbrlib/genglsl/pbrlib_genglsl_impl.mtlx | 8 ++++----
libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx | 2 +-
3 files changed, 10 insertions(+), 11 deletions(-)
rename libraries/pbrlib/genglsl/{mx_hair_bsdf.glsl => mx_chiang_hair_bsdf.glsl} (97%)
diff --git a/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl b/libraries/pbrlib/genglsl/mx_chiang_hair_bsdf.glsl
similarity index 97%
rename from libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
rename to libraries/pbrlib/genglsl/mx_chiang_hair_bsdf.glsl
index 8ac6222714..22b2226ab3 100644
--- a/libraries/pbrlib/genglsl/mx_hair_bsdf.glsl
+++ b/libraries/pbrlib/genglsl/mx_chiang_hair_bsdf.glsl
@@ -49,10 +49,10 @@ void mx_chiang_hair_roughness(
float ar = clamp(azimuthal, 0.001, 1.0);
// longitudinal variance
- float v = 0.726 * lr + 0.812 * lr * lr + 3.7 * pow(lr, 20);
+ float v = 0.726 * lr + 0.812 * lr * lr + 3.7 * pow(lr, 20.0);
v = v * v;
- float s = 0.265 * ar + 1.194 * ar * ar + 5.372 * pow(ar, 22);
+ float s = 0.265 * ar + 1.194 * ar * ar + 5.372 * pow(ar, 22.0);
roughness_R = vec2(v, s);
roughness_TT = vec2(v * scale_TT * scale_TT, s);
@@ -111,7 +111,8 @@ float mx_hair_trimmed_logistic(float x, float s, float a, float b)
float mx_hair_phi(int p, float gammaO, float gammaT)
{
- return 2.0 * p * gammaT - 2.0 * gammaO + p * M_PI;
+ float fP = float(p);
+ return 2.0 * fP * gammaT - 2.0 * gammaO + fP * M_PI;
}
float mx_hair_longitudinal_scattering( // Mp
@@ -260,9 +261,7 @@ vec3 mx_chiang_hair_bsdf(
vec3 F = vec3(0.0);
for (int i = 0; i <= 3; ++i)
{
- if (all(lessThanEqual(tint[i], vec3(0.0))))
- continue;
-
+ tint[i] = max(tint[i], vec3(0.0));
float Mp = mx_hair_longitudinal_scattering(angles[i].x, angles[i].y, sinThetaO, cosThetaO, vs[i].x);
float Np = (i == 3) ? (1.0 / 2.0 * M_PI) : mx_hair_azimuthal_scattering(phi, i, vs[i].y, gammaO, gammaT);
F += Mp * Np * tint[i] * Ap[i];
diff --git a/libraries/pbrlib/genglsl/pbrlib_genglsl_impl.mtlx b/libraries/pbrlib/genglsl/pbrlib_genglsl_impl.mtlx
index 1c495cb4bd..4b3be10faf 100644
--- a/libraries/pbrlib/genglsl/pbrlib_genglsl_impl.mtlx
+++ b/libraries/pbrlib/genglsl/pbrlib_genglsl_impl.mtlx
@@ -26,7 +26,7 @@
-
+
@@ -78,12 +78,12 @@
-
+
-
+
-
+
diff --git a/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx b/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
index 754594620b..0737ca82ab 100644
--- a/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
+++ b/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
@@ -100,6 +100,6 @@
-
+
From ede65733dc1884fff0c07be04ac7938cf50d128f Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Sun, 13 Oct 2024 15:31:13 -0700
Subject: [PATCH 16/80] Extend shader validation tests (#2062)
---
.github/workflows/main.yml | 6 +++---
python/Scripts/generateshader.py | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 95516bd4e5..6821002b6d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -229,13 +229,13 @@ jobs:
run: |
vcpkg/vcpkg install glslang --triplet=x64-windows
glslangValidator.exe -v
- python python/Scripts/generateshader.py resources/Materials/Examples/StandardSurface --target glsl --validator glslangValidator.exe --vulkanGlsl True --validatorArgs="-V --aml"
- python python/Scripts/generateshader.py resources/Materials/Examples/StandardSurface --target essl --validator glslangValidator.exe
+ python python/Scripts/generateshader.py resources/Materials/Examples --target glsl --validator glslangValidator.exe --vulkanGlsl True --validatorArgs="-V --aml"
+ python python/Scripts/generateshader.py resources/Materials/Examples --target essl --validator glslangValidator.exe
- name: Shader Validation Tests (MacOS)
if: matrix.test_shaders == 'ON' && runner.os == 'macOS'
run: |
- python python/Scripts/generateshader.py resources/Materials/Examples/StandardSurface --target msl --validator "xcrun metal --language=metal" --validatorArgs="-w"
+ python python/Scripts/generateshader.py resources/Materials/Examples --target msl --validator "xcrun metal --language=metal" --validatorArgs="-w"
- name: Coverage Analysis Tests
if: matrix.coverage_analysis == 'ON'
diff --git a/python/Scripts/generateshader.py b/python/Scripts/generateshader.py
index f6158d270a..cd158f2143 100644
--- a/python/Scripts/generateshader.py
+++ b/python/Scripts/generateshader.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
'''
-Utility to generate the shader for materials found in a MaterialX document. One file will be generated
-for each material / shader found. The currently supported target languages are GLSL, OSL, MDL and ESSL.
+Generate shader code for each renderable element in a MaterialX document or folder.
+The currently supported target languages are GLSL, ESSL, MSL, OSL, and MDL.
'''
import sys, os, argparse, subprocess
@@ -43,7 +43,7 @@ def getMaterialXFiles(rootPath):
return filelist
def main():
- parser = argparse.ArgumentParser(description='Generate shader code for each material / shader in a document.')
+ parser = argparse.ArgumentParser(description='Generate shader code for each renderable element in a MaterialX document or folder.')
parser.add_argument('--path', dest='paths', action='append', nargs='+', help='An additional absolute search path location (e.g. "/projects/MaterialX")')
parser.add_argument('--library', dest='libraries', action='append', nargs='+', help='An additional relative path to a custom data library folder (e.g. "libraries/custom")')
parser.add_argument('--target', dest='target', default='glsl', help='Target shader generator to use (e.g. "glsl, osl, mdl, essl, vulkan"). Default is glsl.')
From b058d9cbba16d06ed858c53f39f2af7b9e41b550 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Mon, 14 Oct 2024 09:37:36 -0700
Subject: [PATCH 17/80] Improvements to shader validation (#2067)
This changelist makes a handful of improvements to the GitHub CI for shader validation, increasing the level of coverage for future changes.
- Add MSL validation for the stdlib test suite.
- Replace a non-working Vulkan GLSL test with standard GLSL.
- Fix an edge case in generateshader.py.
- Remove unneeded tests from the stdlib test suite.
---
.github/workflows/main.yml | 3 +-
python/Scripts/generateshader.py | 27 +++---
.../TestSuite/stdlib/convert/convert.mtlx | 84 -------------------
3 files changed, 12 insertions(+), 102 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6821002b6d..c11603dd70 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -229,13 +229,14 @@ jobs:
run: |
vcpkg/vcpkg install glslang --triplet=x64-windows
glslangValidator.exe -v
- python python/Scripts/generateshader.py resources/Materials/Examples --target glsl --validator glslangValidator.exe --vulkanGlsl True --validatorArgs="-V --aml"
+ python python/Scripts/generateshader.py resources/Materials/Examples --target glsl --validator glslangValidator.exe
python python/Scripts/generateshader.py resources/Materials/Examples --target essl --validator glslangValidator.exe
- name: Shader Validation Tests (MacOS)
if: matrix.test_shaders == 'ON' && runner.os == 'macOS'
run: |
python python/Scripts/generateshader.py resources/Materials/Examples --target msl --validator "xcrun metal --language=metal" --validatorArgs="-w"
+ python python/Scripts/generateshader.py resources/Materials/TestSuite/stdlib --target msl --validator "xcrun metal --language=metal" --validatorArgs="-w"
- name: Coverage Analysis Tests
if: matrix.coverage_analysis == 'ON'
diff --git a/python/Scripts/generateshader.py b/python/Scripts/generateshader.py
index cd158f2143..259812f6f1 100644
--- a/python/Scripts/generateshader.py
+++ b/python/Scripts/generateshader.py
@@ -139,13 +139,6 @@ def main():
shadergen.setUnitSystem(unitsystem)
genoptions.targetDistanceUnit = 'meter'
- # Look for renderable nodes
- nodes = mx_gen_shader.findRenderableElements(doc)
- if not nodes:
- nodes = doc.getMaterialNodes()
- if not nodes:
- nodes = doc.getNodesOfType(mx.SURFACE_SHADER_TYPE_STRING)
-
pathPrefix = ''
if opts.outputPath and os.path.exists(opts.outputPath):
pathPrefix = opts.outputPath + os.path.sep
@@ -154,11 +147,11 @@ def main():
print('- Shader output path: ' + pathPrefix)
failedShaders = ""
- for node in nodes:
- nodeName = node.getName()
- print('-- Generate code for node: ' + nodeName)
- nodeName = mx.createValidName(nodeName)
- shader = shadergen.generate(nodeName, node, context)
+ for elem in mx_gen_shader.findRenderableElements(doc):
+ elemName = elem.getName()
+ print('-- Generate code for element: ' + elemName)
+ elemName = mx.createValidName(elemName)
+ shader = shadergen.generate(elemName, elem, context)
if shader:
# Use extension of .vert and .frag as it's type is
# recognized by glslangValidator
@@ -189,17 +182,17 @@ def main():
errors = validateCode(filename, opts.validator, opts.validatorArgs)
if errors != "":
- print("--- Validation failed for node: ", nodeName)
+ print("--- Validation failed for element: ", elemName)
print("----------------------------")
print('--- Error log: ', errors)
print("----------------------------")
- failedShaders += (nodeName + ' ')
+ failedShaders += (elemName + ' ')
else:
- print("--- Validation passed for node:", nodeName)
+ print("--- Validation passed for element:", elemName)
else:
- print("--- Validation failed for node:", nodeName)
- failedShaders += (nodeName + ' ')
+ print("--- Validation failed for element:", elemName)
+ failedShaders += (elemName + ' ')
if failedShaders != "":
sys.exit(-1)
diff --git a/resources/Materials/TestSuite/stdlib/convert/convert.mtlx b/resources/Materials/TestSuite/stdlib/convert/convert.mtlx
index 377cb015df..f29b1eaab4 100644
--- a/resources/Materials/TestSuite/stdlib/convert/convert.mtlx
+++ b/resources/Materials/TestSuite/stdlib/convert/convert.mtlx
@@ -1,8 +1,5 @@
-
@@ -30,85 +27,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From afa175675212c5e9014d4f948095b1d1200c5587 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Mon, 14 Oct 2024 14:46:16 -0700
Subject: [PATCH 18/80] Reduce duplication in MSL implementations (#2068)
This changelist removes a number of MSL implementations that duplicate their counterparts in GLSL, instead using the inheritance relationship between these two shader generators to handle code sharing.
---
.../pbrlib/genmsl/pbrlib_genmsl_impl.mtlx | 46 --
.../stdlib/genmsl/stdlib_genmsl_impl.mtlx | 545 ------------------
2 files changed, 591 deletions(-)
diff --git a/libraries/pbrlib/genmsl/pbrlib_genmsl_impl.mtlx b/libraries/pbrlib/genmsl/pbrlib_genmsl_impl.mtlx
index e88a47a1dc..30dd6e937d 100644
--- a/libraries/pbrlib/genmsl/pbrlib_genmsl_impl.mtlx
+++ b/libraries/pbrlib/genmsl/pbrlib_genmsl_impl.mtlx
@@ -1,33 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -46,29 +19,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
index ab4461cad4..be55f772be 100644
--- a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
+++ b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
@@ -49,92 +49,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -186,72 +104,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -265,176 +117,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -444,88 +126,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -536,141 +151,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -685,18 +173,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -716,29 +192,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From da60312f485fef948b1f38578a8aa13f397e102d Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Mon, 14 Oct 2024 17:19:57 -0700
Subject: [PATCH 19/80] Move templated accessors to Element.cpp (#2069)
This changelist moves the templated accessors `getChildOfType` and `getChildrenOfType` from Element.h to Element.cpp, allowing upcoming features to be implemented in a more straightforward fashion.
---
source/MaterialXCore/Element.cpp | 29 ++++++++++++++++++++++++++---
source/MaterialXCore/Element.h | 21 ++-------------------
2 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/source/MaterialXCore/Element.cpp b/source/MaterialXCore/Element.cpp
index 149b7bc757..1a48142962 100644
--- a/source/MaterialXCore/Element.cpp
+++ b/source/MaterialXCore/Element.cpp
@@ -284,6 +284,27 @@ ElementPtr Element::changeChildCategory(ElementPtr child, const string& category
return newChild;
}
+template shared_ptr Element::getChildOfType(const string& name) const
+{
+ ElementPtr child = getChild(name);
+ return child ? child->asA() : shared_ptr();
+}
+
+template vector> Element::getChildrenOfType(const string& category) const
+{
+ vector> children;
+ for (ElementPtr child : _childOrder)
+ {
+ shared_ptr instance = child->asA();
+ if (!instance)
+ continue;
+ if (!category.empty() && child->getCategory() != category)
+ continue;
+ children.push_back(instance);
+ }
+ return children;
+}
+
ElementPtr Element::getRoot()
{
ElementPtr root = _root.lock();
@@ -866,9 +887,11 @@ template class ElementRegistry
// Template instantiations
//
-#define INSTANTIATE_SUBCLASS(T) \
- template MX_CORE_API shared_ptr Element::asA(); \
- template MX_CORE_API shared_ptr Element::asA() const;
+#define INSTANTIATE_SUBCLASS(T) \
+ template MX_CORE_API shared_ptr Element::asA(); \
+ template MX_CORE_API shared_ptr Element::asA() const; \
+ template MX_CORE_API shared_ptr Element::getChildOfType(const string& name) const; \
+ template MX_CORE_API vector> Element::getChildrenOfType(const string& category) const;
INSTANTIATE_SUBCLASS(Element)
INSTANTIATE_SUBCLASS(GeomElement)
diff --git a/source/MaterialXCore/Element.h b/source/MaterialXCore/Element.h
index 2b92dd8094..a80bc3a49f 100644
--- a/source/MaterialXCore/Element.h
+++ b/source/MaterialXCore/Element.h
@@ -439,11 +439,7 @@ class MX_CORE_API Element : public std::enable_shared_from_this
/// Return the child element, if any, with the given name and subclass.
/// If a child with the given name exists, but belongs to a different
/// subclass, then an empty shared pointer is returned.
- template shared_ptr getChildOfType(const string& name) const
- {
- ElementPtr child = getChild(name);
- return child ? child->asA() : shared_ptr();
- }
+ template shared_ptr getChildOfType(const string& name) const;
/// Return a constant vector of all child elements.
/// The returned vector maintains the order in which children were added.
@@ -455,20 +451,7 @@ class MX_CORE_API Element : public std::enable_shared_from_this
/// Return a vector of all child elements that are instances of the given
/// subclass, optionally filtered by the given category string. The returned
/// vector maintains the order in which children were added.
- template vector> getChildrenOfType(const string& category = EMPTY_STRING) const
- {
- vector> children;
- for (ElementPtr child : _childOrder)
- {
- shared_ptr instance = child->asA();
- if (!instance)
- continue;
- if (!category.empty() && child->getCategory() != category)
- continue;
- children.push_back(instance);
- }
- return children;
- }
+ template vector> getChildrenOfType(const string& category = EMPTY_STRING) const;
/// Set the index of the child, if any, with the given name.
/// If the given index is out of bounds, then an exception is thrown.
From 8af07e1e4e867aa00817440eca730c4588a12a95 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Tue, 15 Oct 2024 13:07:20 -0700
Subject: [PATCH 20/80] Harmonize MSL and GLSL implementations (#2070)
This changelist addresses a handful of remaining cases where our MSL and GLSL code diverged, harmonizing on shading code that works in both contexts.
---
libraries/stdlib/genglsl/mx_burn_color3.glsl | 7 ++++---
libraries/stdlib/genglsl/mx_burn_color4.glsl | 9 +++++----
libraries/stdlib/genglsl/mx_dodge_color3.glsl | 7 ++++---
libraries/stdlib/genglsl/mx_dodge_color4.glsl | 9 +++++----
libraries/stdlib/genglsl/mx_normalmap.glsl | 8 ++++----
libraries/stdlib/genmsl/mx_burn_color3.metal | 9 ---------
libraries/stdlib/genmsl/mx_burn_color4.metal | 10 ----------
libraries/stdlib/genmsl/mx_burn_float.metal | 9 ---------
libraries/stdlib/genmsl/mx_dodge_color3.metal | 9 ---------
libraries/stdlib/genmsl/mx_dodge_color4.metal | 10 ----------
libraries/stdlib/genmsl/mx_dodge_float.metal | 9 ---------
libraries/stdlib/genmsl/mx_normalmap.metal | 13 -------------
.../stdlib/genmsl/mx_smoothstep_float.metal | 9 ---------
libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx | 17 -----------------
14 files changed, 22 insertions(+), 113 deletions(-)
delete mode 100644 libraries/stdlib/genmsl/mx_burn_color3.metal
delete mode 100644 libraries/stdlib/genmsl/mx_burn_color4.metal
delete mode 100644 libraries/stdlib/genmsl/mx_burn_float.metal
delete mode 100644 libraries/stdlib/genmsl/mx_dodge_color3.metal
delete mode 100644 libraries/stdlib/genmsl/mx_dodge_color4.metal
delete mode 100644 libraries/stdlib/genmsl/mx_dodge_float.metal
delete mode 100644 libraries/stdlib/genmsl/mx_normalmap.metal
delete mode 100644 libraries/stdlib/genmsl/mx_smoothstep_float.metal
diff --git a/libraries/stdlib/genglsl/mx_burn_color3.glsl b/libraries/stdlib/genglsl/mx_burn_color3.glsl
index 10f4008f1a..8e60f857d6 100644
--- a/libraries/stdlib/genglsl/mx_burn_color3.glsl
+++ b/libraries/stdlib/genglsl/mx_burn_color3.glsl
@@ -2,7 +2,8 @@
void mx_burn_color3(vec3 fg, vec3 bg, float mixval, out vec3 result)
{
- mx_burn_float(fg.x, bg.x, mixval, result.x);
- mx_burn_float(fg.y, bg.y, mixval, result.y);
- mx_burn_float(fg.z, bg.z, mixval, result.z);
+ float f;
+ mx_burn_float(fg.x, bg.x, mixval, f); result.x = f;
+ mx_burn_float(fg.y, bg.y, mixval, f); result.y = f;
+ mx_burn_float(fg.z, bg.z, mixval, f); result.z = f;
}
diff --git a/libraries/stdlib/genglsl/mx_burn_color4.glsl b/libraries/stdlib/genglsl/mx_burn_color4.glsl
index df6802a646..a1add5a372 100644
--- a/libraries/stdlib/genglsl/mx_burn_color4.glsl
+++ b/libraries/stdlib/genglsl/mx_burn_color4.glsl
@@ -2,8 +2,9 @@
void mx_burn_color4(vec4 fg, vec4 bg, float mixval, out vec4 result)
{
- mx_burn_float(fg.x, bg.x, mixval, result.x);
- mx_burn_float(fg.y, bg.y, mixval, result.y);
- mx_burn_float(fg.z, bg.z, mixval, result.z);
- mx_burn_float(fg.w, bg.w, mixval, result.w);
+ float f;
+ mx_burn_float(fg.x, bg.x, mixval, f); result.x = f;
+ mx_burn_float(fg.y, bg.y, mixval, f); result.y = f;
+ mx_burn_float(fg.z, bg.z, mixval, f); result.z = f;
+ mx_burn_float(fg.w, bg.w, mixval, f); result.w = f;
}
diff --git a/libraries/stdlib/genglsl/mx_dodge_color3.glsl b/libraries/stdlib/genglsl/mx_dodge_color3.glsl
index a8cfd1dff7..aa9cf023a6 100644
--- a/libraries/stdlib/genglsl/mx_dodge_color3.glsl
+++ b/libraries/stdlib/genglsl/mx_dodge_color3.glsl
@@ -2,7 +2,8 @@
void mx_dodge_color3(vec3 fg, vec3 bg, float mixval, out vec3 result)
{
- mx_dodge_float(fg.x, bg.x, mixval, result.x);
- mx_dodge_float(fg.y, bg.y, mixval, result.y);
- mx_dodge_float(fg.z, bg.z, mixval, result.z);
+ float f;
+ mx_dodge_float(fg.x, bg.x, mixval, f); result.x = f;
+ mx_dodge_float(fg.y, bg.y, mixval, f); result.y = f;
+ mx_dodge_float(fg.z, bg.z, mixval, f); result.z = f;
}
diff --git a/libraries/stdlib/genglsl/mx_dodge_color4.glsl b/libraries/stdlib/genglsl/mx_dodge_color4.glsl
index c492043ceb..25888219b6 100644
--- a/libraries/stdlib/genglsl/mx_dodge_color4.glsl
+++ b/libraries/stdlib/genglsl/mx_dodge_color4.glsl
@@ -2,8 +2,9 @@
void mx_dodge_color4(vec4 fg , vec4 bg , float mixval, out vec4 result)
{
- mx_dodge_float(fg.x, bg.x, mixval, result.x);
- mx_dodge_float(fg.y, bg.y, mixval, result.y);
- mx_dodge_float(fg.z, bg.z, mixval, result.z);
- mx_dodge_float(fg.w, bg.w, mixval, result.w);
+ float f;
+ mx_dodge_float(fg.x, bg.x, mixval, f); result.x = f;
+ mx_dodge_float(fg.y, bg.y, mixval, f); result.y = f;
+ mx_dodge_float(fg.z, bg.z, mixval, f); result.z = f;
+ mx_dodge_float(fg.w, bg.w, mixval, f); result.w = f;
}
diff --git a/libraries/stdlib/genglsl/mx_normalmap.glsl b/libraries/stdlib/genglsl/mx_normalmap.glsl
index 9fe8c66920..66c50f31f5 100644
--- a/libraries/stdlib/genglsl/mx_normalmap.glsl
+++ b/libraries/stdlib/genglsl/mx_normalmap.glsl
@@ -1,9 +1,9 @@
void mx_normalmap_vector2(vec3 value, vec2 normal_scale, vec3 N, vec3 T, vec3 B, out vec3 result)
{
- value = (value == vec3(0.0)) ? vec3(0.0, 0.0, 1.0) : value * 2.0 - 1.0;
-
- value = T * value.x * normal_scale.x + B * value.y * normal_scale.y + N * value.z;
-
+ value = (dot(value, value) == 0.0) ? vec3(0.0, 0.0, 1.0) : value * 2.0 - 1.0;
+ value = T * value.x * normal_scale.x +
+ B * value.y * normal_scale.y +
+ N * value.z;
result = normalize(value);
}
diff --git a/libraries/stdlib/genmsl/mx_burn_color3.metal b/libraries/stdlib/genmsl/mx_burn_color3.metal
deleted file mode 100644
index 856d79c929..0000000000
--- a/libraries/stdlib/genmsl/mx_burn_color3.metal
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "mx_burn_float.metal"
-
-void mx_burn_color3(vec3 fg, vec3 bg, float mixval, out vec3 result)
-{
- float f;
- mx_burn_float(fg.x, bg.x, mixval, f); result.x = f;
- mx_burn_float(fg.y, bg.y, mixval, f); result.y = f;
- mx_burn_float(fg.z, bg.z, mixval, f); result.z = f;
-}
diff --git a/libraries/stdlib/genmsl/mx_burn_color4.metal b/libraries/stdlib/genmsl/mx_burn_color4.metal
deleted file mode 100644
index 48dc6bfa47..0000000000
--- a/libraries/stdlib/genmsl/mx_burn_color4.metal
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "mx_burn_float.metal"
-
-void mx_burn_color4(vec4 fg, vec4 bg, float mixval, out vec4 result)
-{
- float f;
- mx_burn_float(fg.x, bg.x, mixval, f); result.x = f;
- mx_burn_float(fg.y, bg.y, mixval, f); result.y = f;
- mx_burn_float(fg.z, bg.z, mixval, f); result.z = f;
- mx_burn_float(fg.w, bg.w, mixval, f); result.w = f;
-}
diff --git a/libraries/stdlib/genmsl/mx_burn_float.metal b/libraries/stdlib/genmsl/mx_burn_float.metal
deleted file mode 100644
index 31d981ddb9..0000000000
--- a/libraries/stdlib/genmsl/mx_burn_float.metal
+++ /dev/null
@@ -1,9 +0,0 @@
-void mx_burn_float(float fg, float bg, float mixval, out float result)
-{
- if (abs(fg) < M_FLOAT_EPS)
- {
- result = 0.0;
- return;
- }
- result = mixval*(1.0 - ((1.0 - bg) / fg)) + ((1.0-mixval)*bg);
-}
diff --git a/libraries/stdlib/genmsl/mx_dodge_color3.metal b/libraries/stdlib/genmsl/mx_dodge_color3.metal
deleted file mode 100644
index 864a6a2529..0000000000
--- a/libraries/stdlib/genmsl/mx_dodge_color3.metal
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "mx_dodge_float.metal"
-
-void mx_dodge_color3(vec3 fg, vec3 bg, float mixval, out vec3 result)
-{
- float f;
- mx_dodge_float(fg.x, bg.x, mixval, f); result.x = f;
- mx_dodge_float(fg.y, bg.y, mixval, f); result.y = f;
- mx_dodge_float(fg.z, bg.z, mixval, f); result.z = f;
-}
diff --git a/libraries/stdlib/genmsl/mx_dodge_color4.metal b/libraries/stdlib/genmsl/mx_dodge_color4.metal
deleted file mode 100644
index dc226b4271..0000000000
--- a/libraries/stdlib/genmsl/mx_dodge_color4.metal
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "mx_dodge_float.metal"
-
-void mx_dodge_color4(vec4 fg , vec4 bg , float mixval, out vec4 result)
-{
- float f;
- mx_dodge_float(fg.x, bg.x, mixval, f); result.x = f;
- mx_dodge_float(fg.y, bg.y, mixval, f); result.y = f;
- mx_dodge_float(fg.z, bg.z, mixval, f); result.z = f;
- mx_dodge_float(fg.w, bg.w, mixval, f); result.w = f;
-}
diff --git a/libraries/stdlib/genmsl/mx_dodge_float.metal b/libraries/stdlib/genmsl/mx_dodge_float.metal
deleted file mode 100644
index f138354138..0000000000
--- a/libraries/stdlib/genmsl/mx_dodge_float.metal
+++ /dev/null
@@ -1,9 +0,0 @@
-void mx_dodge_float(float fg, float bg, float mixval, out float result)
-{
- if (abs(1.0 - fg) < M_FLOAT_EPS)
- {
- result = 0.0;
- return;
- }
- result = mixval*(bg / (1.0 - fg)) + ((1.0-mixval)*bg);
-}
diff --git a/libraries/stdlib/genmsl/mx_normalmap.metal b/libraries/stdlib/genmsl/mx_normalmap.metal
deleted file mode 100644
index 3674756d8b..0000000000
--- a/libraries/stdlib/genmsl/mx_normalmap.metal
+++ /dev/null
@@ -1,13 +0,0 @@
-void mx_normalmap_vector2(vec3 value, vec2 normal_scale, vec3 N, vec3 T, vec3 B, out vec3 result)
-{
- value = all(value == vec3(0.0)) ? vec3(0.0, 0.0, 1.0) : value * 2.0 - 1.0;
-
- value = T * value.x * normal_scale.x + B * value.y * normal_scale.y + N * value.z;
-
- result = normalize(value);
-}
-
-void mx_normalmap_float(vec3 value, float normal_scale, vec3 N, vec3 T, vec3 B, out vec3 result)
-{
- mx_normalmap_vector2(value, vec2(normal_scale), N, T, B, result);
-}
diff --git a/libraries/stdlib/genmsl/mx_smoothstep_float.metal b/libraries/stdlib/genmsl/mx_smoothstep_float.metal
deleted file mode 100644
index 1bca2e4d9b..0000000000
--- a/libraries/stdlib/genmsl/mx_smoothstep_float.metal
+++ /dev/null
@@ -1,9 +0,0 @@
-void mx_smoothstep_float(float val, float low, float high, out float result)
-{
- if (val <= low)
- result = 0.0;
- else if (val >= high)
- result = 1.0;
- else
- result = smoothstep(low, high, val);
-}
diff --git a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
index be55f772be..1920d04b70 100644
--- a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
+++ b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
@@ -41,10 +41,6 @@
-
-
-
-
@@ -134,23 +130,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
From 4057541945b580be4ad385ea6c9892b4ac0efc50 Mon Sep 17 00:00:00 2001
From: Ashwin Bhat <1727158+ashwinbhat@users.noreply.github.com>
Date: Wed, 16 Oct 2024 08:44:29 -0700
Subject: [PATCH 21/80] Add support for data library referencing (#2054)
### Background
MaterialX documents are required to be complete self contained with all required node definitions. This is done by using the `mx::importLibrary` API. While processing large number of documents the Import and Merge workflows can cause performance and memory challenges.
### Proposal
Since the MaterialX library or the Data library hosts definitions, we propose that these definitions could be referenced by a document instead of importing them. This concept of referencing the Data library may have some workflow impact such as, do new definitions to into Data library or the document or can a document have local definitions? The answer depends on the specific artist or studio workflow.
To maintain compatibility with existing usage patterns, we have introduced a new set of methods **that allow registration of data library for a document by setting a document reference to it**.
1. setDataLibrary(ConstDocumentPtr dataLibrary);
2. getDataLibrary()
3. hasDataLibrary()
### Using this new Data library registration, two usage patterns are possible
**Build library and import**
This is the current usage pattern
- use `importlibrary `to build your datalibrary
- use `importLibrary `to import the datalibrary to the working document.
**Build library and register**
Proposed usage pattern
- use `importlibrary` to build your datalibrary
- use `setDataLibrary `to assign the datalibrary to the working document.
This can be extended were 3rd party defs can be imported into the datalibrary
**Other changes include**
- Updates to `getChildOfType` and `getChildrenOfType` to support Data Library.
- Updates to redirect _Document::get*_ calls to process local document content and Data Library.
---
.../JsMaterialXCore/JsDocument.cpp | 3 ++
source/MaterialXCore/Document.cpp | 26 ++++++++-----
source/MaterialXCore/Document.h | 38 ++++++++++++++++---
source/MaterialXCore/Element.cpp | 16 +++++++-
.../MaterialXTest/MaterialXCore/Document.cpp | 6 ++-
source/MaterialXTest/MaterialXCore/Node.cpp | 2 +-
.../MaterialXGenShader/GenShader.cpp | 8 ++--
.../MaterialXGenShader/GenShaderUtil.cpp | 8 ++--
.../MaterialXRender/RenderUtil.cpp | 2 +-
source/MaterialXView/Viewer.cpp | 4 +-
.../PyMaterialXCore/PyDocument.cpp | 3 ++
11 files changed, 86 insertions(+), 30 deletions(-)
diff --git a/source/JsMaterialX/JsMaterialXCore/JsDocument.cpp b/source/JsMaterialX/JsMaterialXCore/JsDocument.cpp
index ec4881732d..18750666b7 100644
--- a/source/JsMaterialX/JsMaterialXCore/JsDocument.cpp
+++ b/source/JsMaterialX/JsMaterialXCore/JsDocument.cpp
@@ -23,6 +23,9 @@ EMSCRIPTEN_BINDINGS(document)
.class_function("createDocument", &mx::Document::createDocument)
.function("initialize", &mx::Document::initialize)
.function("copy", &mx::Document::copy)
+ .function("setDataLibrary", &mx::Document::setDataLibrary)
+ .function("getDataLibrary", &mx::Document::getDataLibrary)
+ .function("hasDataLibrary", &mx::Document::hasDataLibrary)
.function("importLibrary", &mx::Document::importLibrary)
.function("getReferencedSourceUris", ems::optional_override([](mx::Document &self) {
mx::StringSet set = self.getReferencedSourceUris();
diff --git a/source/MaterialXCore/Document.cpp b/source/MaterialXCore/Document.cpp
index 7ebdab0aa7..1cd031d87c 100644
--- a/source/MaterialXCore/Document.cpp
+++ b/source/MaterialXCore/Document.cpp
@@ -357,34 +357,40 @@ vector Document::getMaterialOutputs() const
vector Document::getMatchingNodeDefs(const string& nodeName) const
{
+ // Recurse to data library if present.
+ vector matchingNodeDefs = hasDataLibrary() ?
+ getDataLibrary()->getMatchingNodeDefs(nodeName) :
+ vector();
+
// Refresh the cache.
_cache->refresh();
// Return all nodedefs matching the given node name.
if (_cache->nodeDefMap.count(nodeName))
{
- return _cache->nodeDefMap.at(nodeName);
- }
- else
- {
- return vector();
+ matchingNodeDefs.insert(matchingNodeDefs.end(), _cache->nodeDefMap.at(nodeName).begin(), _cache->nodeDefMap.at(nodeName).end());
}
+
+ return matchingNodeDefs;
}
vector Document::getMatchingImplementations(const string& nodeDef) const
{
+ // Recurse to data library if present.
+ vector matchingImplementations = hasDataLibrary() ?
+ getDataLibrary()->getMatchingImplementations(nodeDef) :
+ vector();
+
// Refresh the cache.
_cache->refresh();
// Return all implementations matching the given nodedef string.
if (_cache->implementationMap.count(nodeDef))
{
- return _cache->implementationMap.at(nodeDef);
- }
- else
- {
- return vector();
+ matchingImplementations.insert(matchingImplementations.end(), _cache->implementationMap.at(nodeDef).begin(), _cache->implementationMap.at(nodeDef).end());
}
+
+ return matchingImplementations;
}
bool Document::validate(string* message) const
diff --git a/source/MaterialXCore/Document.h b/source/MaterialXCore/Document.h
index a14a5edf7b..ab01bbbc11 100644
--- a/source/MaterialXCore/Document.h
+++ b/source/MaterialXCore/Document.h
@@ -50,18 +50,41 @@ class MX_CORE_API Document : public GraphElement
{
DocumentPtr doc = createDocument();
doc->copyContentFrom(getSelf());
+ doc->setDataLibrary(getDataLibrary());
return doc;
}
- /// Import the given document as a library within this document.
- /// The contents of the library document are copied into this one, and
+ /// Get a list of source URIs referenced by the document
+ StringSet getReferencedSourceUris() const;
+
+ /// @name Data Libraries
+ /// @{
+
+ /// Store a reference to a data library in this document.
+ void setDataLibrary(ConstDocumentPtr dataLibrary)
+ {
+ _dataLibrary = dataLibrary;
+ }
+
+ /// Return true if this document has a data library.
+ bool hasDataLibrary() const
+ {
+ return (_dataLibrary != nullptr);
+ }
+
+ /// Return the data library, if any, referenced by this document.
+ ConstDocumentPtr getDataLibrary() const
+ {
+ return _dataLibrary;
+ }
+
+ /// Import the given data library into this document.
+ /// The contents of the data library are copied into this one, and
/// are assigned the source URI of the library.
- /// @param library The library document to be imported.
+ /// @param library The data library to be imported.
void importLibrary(const ConstDocumentPtr& library);
- /// Get a list of source URI's referenced by the document
- StringSet getReferencedSourceUris() const;
-
+ /// @}
/// @name NodeGraph Elements
/// @{
@@ -679,6 +702,9 @@ class MX_CORE_API Document : public GraphElement
private:
class Cache;
+
+ private:
+ ConstDocumentPtr _dataLibrary;
std::unique_ptr _cache;
};
diff --git a/source/MaterialXCore/Element.cpp b/source/MaterialXCore/Element.cpp
index 1a48142962..af47a6a2ba 100644
--- a/source/MaterialXCore/Element.cpp
+++ b/source/MaterialXCore/Element.cpp
@@ -286,13 +286,27 @@ ElementPtr Element::changeChildCategory(ElementPtr child, const string& category
template shared_ptr Element::getChildOfType(const string& name) const
{
- ElementPtr child = getChild(name);
+ ElementPtr child;
+ ConstDocumentPtr doc = asA();
+ if (doc && doc->hasDataLibrary())
+ {
+ child = doc->getDataLibrary()->getChild(name);
+ }
+ if (!child)
+ {
+ child = getChild(name);
+ }
return child ? child->asA() : shared_ptr();
}
template vector> Element::getChildrenOfType(const string& category) const
{
vector> children;
+ ConstDocumentPtr doc = asA();
+ if (doc && doc->hasDataLibrary())
+ {
+ children = doc->getDataLibrary()->getChildrenOfType(category);
+ }
for (ElementPtr child : _childOrder)
{
shared_ptr instance = child->asA();
diff --git a/source/MaterialXTest/MaterialXCore/Document.cpp b/source/MaterialXTest/MaterialXCore/Document.cpp
index 1b02966fb8..94f8b98708 100644
--- a/source/MaterialXTest/MaterialXCore/Document.cpp
+++ b/source/MaterialXTest/MaterialXCore/Document.cpp
@@ -106,7 +106,11 @@ TEST_CASE("Document", "[document]")
REQUIRE(customLibrary->validate());
// Import the custom library.
- doc->importLibrary(customLibrary);
+ mx::DocumentPtr customDatalibrary = mx::createDocument();
+ customDatalibrary->importLibrary(customLibrary);
+
+ // Set data library
+ doc->setDataLibrary(customDatalibrary);
mx::NodeGraphPtr importedNodeGraph = doc->getNodeGraph("custom:NG_custom");
mx::NodeDefPtr importedNodeDef = doc->getNodeDef("custom:ND_simpleSrf");
mx::ImplementationPtr importedImpl = doc->getImplementation("custom:IM_custom");
diff --git a/source/MaterialXTest/MaterialXCore/Node.cpp b/source/MaterialXTest/MaterialXCore/Node.cpp
index b72cd65328..58ee125bad 100644
--- a/source/MaterialXTest/MaterialXCore/Node.cpp
+++ b/source/MaterialXTest/MaterialXCore/Node.cpp
@@ -672,7 +672,7 @@ TEST_CASE("Node Definition Creation", "[nodedef]")
mx::DocumentPtr doc = mx::createDocument();
mx::readFromXmlFile(doc, "resources/Materials/TestSuite/stdlib/definition/definition_from_nodegraph.mtlx", searchPath);
- doc->importLibrary(stdlib);
+ doc->setDataLibrary(stdlib);
mx::NodeGraphPtr graph = doc->getNodeGraph("test_colorcorrect");
REQUIRE(graph);
diff --git a/source/MaterialXTest/MaterialXGenShader/GenShader.cpp b/source/MaterialXTest/MaterialXGenShader/GenShader.cpp
index 22afffbff4..a959283aad 100644
--- a/source/MaterialXTest/MaterialXGenShader/GenShader.cpp
+++ b/source/MaterialXTest/MaterialXGenShader/GenShader.cpp
@@ -161,7 +161,7 @@ TEST_CASE("GenShader: Transparency Regression Check", "[genshader]")
bool testValue = transparencyTest[i];
mx::DocumentPtr testDoc = mx::createDocument();
- testDoc->importLibrary(libraries);
+ testDoc->setDataLibrary(libraries);
try
{
@@ -207,7 +207,7 @@ void testDeterministicGeneration(mx::DocumentPtr libraries, mx::GenContext& cont
{
mx::DocumentPtr testDoc = mx::createDocument();
mx::readFromXmlFile(testDoc, testFile);
- testDoc->importLibrary(libraries);
+ testDoc->setDataLibrary(libraries);
// Keep the document alive to make sure
// new memory is allocated for each run
@@ -272,7 +272,7 @@ void checkPixelDependencies(mx::DocumentPtr libraries, mx::GenContext& context)
mx::DocumentPtr testDoc = mx::createDocument();
mx::readFromXmlFile(testDoc, testFile);
- testDoc->importLibrary(libraries);
+ testDoc->setDataLibrary(libraries);
mx::ElementPtr element = testDoc->getChild(testElement);
CHECK(element);
@@ -385,7 +385,7 @@ TEST_CASE("GenShader: Track Application Variables", "[genshader]")
mx::DocumentPtr testDoc = mx::createDocument();
mx::readFromXmlString(testDoc, testDocumentString);
- testDoc->importLibrary(libraries);
+ testDoc->setDataLibrary(libraries);
mx::ElementPtr element = testDoc->getChild(testElement);
CHECK(element);
diff --git a/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp b/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp
index 6dc24fc15c..4a8e61645a 100644
--- a/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp
+++ b/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp
@@ -372,7 +372,7 @@ void shaderGenPerformanceTest(mx::GenContext& context)
std::shuffle(loadedDocuments.begin(), loadedDocuments.end(), rng);
for (const auto& doc : loadedDocuments)
{
- doc->importLibrary(nodeLibrary);
+ doc->setDataLibrary(nodeLibrary);
std::vector elements = mx::findRenderableElements(doc);
REQUIRE(elements.size() > 0);
@@ -721,7 +721,7 @@ void ShaderGeneratorTester::validate(const mx::GenOptions& generateOptions, cons
bool importedLibrary = false;
try
{
- doc->importLibrary(_dependLib);
+ doc->setDataLibrary(_dependLib);
importedLibrary = true;
}
catch (mx::Exception& e)
@@ -734,8 +734,8 @@ void ShaderGeneratorTester::validate(const mx::GenOptions& generateOptions, cons
}
// Find and register lights
- findLights(doc, _lights);
- registerLights(doc, _lights, context);
+ findLights(_dependLib, _lights);
+ registerLights(_dependLib, _lights, context);
// Find elements to render in the document
std::vector elements;
diff --git a/source/MaterialXTest/MaterialXRender/RenderUtil.cpp b/source/MaterialXTest/MaterialXRender/RenderUtil.cpp
index d8265a4050..e3e5e8033e 100644
--- a/source/MaterialXTest/MaterialXRender/RenderUtil.cpp
+++ b/source/MaterialXTest/MaterialXRender/RenderUtil.cpp
@@ -223,7 +223,7 @@ bool ShaderRenderTester::validate(const mx::FilePath optionsFilePath)
// colliding with implementations in previous test cases.
context.clearNodeImplementations();
- doc->importLibrary(dependLib);
+ doc->setDataLibrary(dependLib);
ioTimer.endTimer();
validateTimer.startTimer();
diff --git a/source/MaterialXView/Viewer.cpp b/source/MaterialXView/Viewer.cpp
index c0d90d30a7..24aea1eb42 100644
--- a/source/MaterialXView/Viewer.cpp
+++ b/source/MaterialXView/Viewer.cpp
@@ -1316,8 +1316,8 @@ void Viewer::loadDocument(const mx::FilePath& filename, mx::DocumentPtr librarie
mx::readFromXmlFile(doc, filename, _searchPath, &readOptions);
_materialSearchPath = mx::getSourceSearchPath(doc);
- // Import libraries.
- doc->importLibrary(libraries);
+ // Store data library reference.
+ doc->setDataLibrary(libraries);
// Apply direct lights.
applyDirectLights(doc);
diff --git a/source/PyMaterialX/PyMaterialXCore/PyDocument.cpp b/source/PyMaterialX/PyMaterialXCore/PyDocument.cpp
index 3f4403c673..e021bc92de 100644
--- a/source/PyMaterialX/PyMaterialXCore/PyDocument.cpp
+++ b/source/PyMaterialX/PyMaterialXCore/PyDocument.cpp
@@ -29,6 +29,9 @@ void bindPyDocument(py::module& mod)
py::class_(mod, "Document")
.def("initialize", &mx::Document::initialize)
.def("copy", &mx::Document::copy)
+ .def("setDataLibrary", &mx::Document::setDataLibrary)
+ .def("getDataLibrary", &mx::Document::getDataLibrary)
+ .def("hasDataLibrary", &mx::Document::hasDataLibrary)
.def("importLibrary", &mx::Document::importLibrary)
.def("getReferencedSourceUris", &mx::Document::getReferencedSourceUris)
.def("addNodeGraph", &mx::Document::addNodeGraph,
From eaebfc34e0a29a18ee6c0d6f4178748a5e0bdc36 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Wed, 16 Oct 2024 15:45:58 -0700
Subject: [PATCH 22/80] Update generateshader for data library referencing
(#2071)
This changelist updates the generateshader.py script to take advantage of data library referencing. i.e. `Document::setDataLibrary`.
In this context, the use of data library referencing should be noticeably more efficient than data library importing when multiple documents are being processed.
---
python/Scripts/generateshader.py | 45 +++++++++++++++-----------------
1 file changed, 21 insertions(+), 24 deletions(-)
diff --git a/python/Scripts/generateshader.py b/python/Scripts/generateshader.py
index 259812f6f1..b00311eb2e 100644
--- a/python/Scripts/generateshader.py
+++ b/python/Scripts/generateshader.py
@@ -55,38 +55,33 @@ def main():
parser.add_argument(dest='inputFilename', help='Path to input document or folder containing input documents.')
opts = parser.parse_args()
- filelist = getMaterialXFiles(opts.inputFilename)
-
- for inputFilename in filelist:
+ # Load standard and custom data libraries.
+ stdlib = mx.createDocument()
+ searchPath = mx.getDefaultDataSearchPath()
+ libraryFolders = []
+ if opts.paths:
+ for pathList in opts.paths:
+ for path in pathList:
+ searchPath.append(path)
+ if opts.libraries:
+ for libraryList in opts.libraries:
+ for library in libraryList:
+ libraryFolders.append(library)
+ libraryFolders.extend(mx.getDefaultDataLibraryFolders())
+ mx.loadLibraries(libraryFolders, searchPath, stdlib)
+
+ # Generate shaders for each input document.
+ for inputFilename in getMaterialXFiles(opts.inputFilename):
doc = mx.createDocument()
try:
mx.readFromXmlFile(doc, inputFilename)
+ doc.setDataLibrary(stdlib)
except mx.ExceptionFileMissing as err:
print('Generation failed: "', err, '"')
sys.exit(-1)
print('---------- Generate code for file: ', inputFilename, '--------------------')
- stdlib = mx.createDocument()
- searchPath = mx.getDefaultDataSearchPath()
- searchPath.append(os.path.dirname(inputFilename))
- libraryFolders = []
- if opts.paths:
- for pathList in opts.paths:
- for path in pathList:
- searchPath.append(path)
- if opts.libraries:
- for libraryList in opts.libraries:
- for library in libraryList:
- libraryFolders.append(library)
- libraryFolders.extend(mx.getDefaultDataLibraryFolders())
- try:
- mx.loadLibraries(libraryFolders, searchPath, stdlib)
- doc.importLibrary(stdlib)
- except Exception as err:
- print('Generation failed: "', err, '"')
- sys.exit(-1)
-
valid, msg = doc.validate()
if not valid:
print('Validation warnings for input document:')
@@ -108,8 +103,10 @@ def main():
else:
shadergen = mx_gen_glsl.GlslShaderGenerator.create()
+ codeSearchPath = searchPath
+ codeSearchPath.append(os.path.dirname(inputFilename))
context = mx_gen_shader.GenContext(shadergen)
- context.registerSourceCodeSearchPath(searchPath)
+ context.registerSourceCodeSearchPath(codeSearchPath)
# If we're generating Vulkan-compliant GLSL then set the binding context
if opts.vulkanCompliantGlsl:
From ea4cea0a1df19a1fe0a36c6cc9a584962cf71e44 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Wed, 16 Oct 2024 17:51:13 -0700
Subject: [PATCH 23/80] Update translateshader for data library referencing
(#2073)
This changelist updates the translateshader.py script to take advantage of data library referencing. i.e. `Document::setDataLibrary`.
---
python/Scripts/translateshader.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/python/Scripts/translateshader.py b/python/Scripts/translateshader.py
index f7c5686211..fca1e2ab07 100644
--- a/python/Scripts/translateshader.py
+++ b/python/Scripts/translateshader.py
@@ -24,19 +24,12 @@ def main():
parser.add_argument('--writeDocumentPerMaterial', dest='writeDocumentPerMaterial', type=mx.stringToBoolean, default=True, help='Specify whether to write baked materials to seprate MaterialX documents. Default is True')
if platform == "darwin":
parser.add_argument("--glsl", dest="useGlslBackend", default=False, type=bool, help="Set to True to use GLSL backend (default = Metal).")
-
parser.add_argument(dest="inputFilename", help="Filename of the input document.")
parser.add_argument(dest="outputFilename", help="Filename of the output document.")
parser.add_argument(dest="destShader", help="Destination shader for translation")
opts = parser.parse_args()
- doc = mx.createDocument()
- try:
- mx.readFromXmlFile(doc, opts.inputFilename)
- except mx.ExceptionFileMissing as err:
- print(err)
- sys.exit(0)
-
+ # Load standard and custom data libraries.
stdlib = mx.createDocument()
searchPath = mx.getDefaultDataSearchPath()
searchPath.append(os.path.dirname(opts.inputFilename))
@@ -51,8 +44,15 @@ def main():
libraryFolders.append(library)
libraryFolders.extend(mx.getDefaultDataLibraryFolders())
mx.loadLibraries(libraryFolders, searchPath, stdlib)
- doc.importLibrary(stdlib)
+ # Read and validate the source document.
+ doc = mx.createDocument()
+ try:
+ mx.readFromXmlFile(doc, opts.inputFilename)
+ doc.setDataLibrary(stdlib)
+ except mx.ExceptionFileMissing as err:
+ print(err)
+ sys.exit(0)
valid, msg = doc.validate()
if not valid:
print("Validation warnings for input document:")
From 12cf23489d9881ad4c4c5aa4b45bd972c2140f2d Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Wed, 16 Oct 2024 21:58:16 -0700
Subject: [PATCH 24/80] Update baketextures for data library referencing
(#2074)
This changelist updates the baketextures.py script to take advantage of data library referencing. i.e. `Document::setDataLibrary`.
---
python/Scripts/baketextures.py | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/python/Scripts/baketextures.py b/python/Scripts/baketextures.py
index ce132036a6..7856dca749 100644
--- a/python/Scripts/baketextures.py
+++ b/python/Scripts/baketextures.py
@@ -27,13 +27,7 @@ def main():
parser.add_argument(dest="outputFilename", help="Filename of the output document.")
opts = parser.parse_args()
- doc = mx.createDocument()
- try:
- mx.readFromXmlFile(doc, opts.inputFilename)
- except mx.ExceptionFileMissing as err:
- print(err)
- sys.exit(0)
-
+ # Load standard and custom data libraries.
stdlib = mx.createDocument()
searchPath = mx.getDefaultDataSearchPath()
searchPath.append(os.path.dirname(opts.inputFilename))
@@ -48,21 +42,28 @@ def main():
libraryFolders.append(library)
libraryFolders.extend(mx.getDefaultDataLibraryFolders())
mx.loadLibraries(libraryFolders, searchPath, stdlib)
- doc.importLibrary(stdlib)
+ # Read and validate the source document.
+ doc = mx.createDocument()
+ try:
+ mx.readFromXmlFile(doc, opts.inputFilename)
+ doc.setDataLibrary(stdlib)
+ except mx.ExceptionFileMissing as err:
+ print(err)
+ sys.exit(0)
valid, msg = doc.validate()
if not valid:
print("Validation warnings for input document:")
print(msg)
+ # Construct the texture baker.
baseType = mx_render.BaseType.FLOAT if opts.hdr else mx_render.BaseType.UINT8
-
-
if platform == "darwin" and not opts.useGlslBackend:
baker = mx_render_msl.TextureBaker.create(opts.width, opts.height, baseType)
else:
baker = mx_render_glsl.TextureBaker.create(opts.width, opts.height, baseType)
+ # Bake materials to textures.
if opts.average:
baker.setAverageImages(True)
baker.writeDocumentPerMaterial(opts.writeDocumentPerMaterial)
From 9f9a57aead130b8879ce7bbea3aced8f204a95ff Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Thu, 17 Oct 2024 15:51:32 -0700
Subject: [PATCH 25/80] Update mxvalidate for data library referencing (#2075)
This changelist updates the mxvalidate.py script to take advantage of data library referencing. i.e. `Document::setDataLibrary`.
---
python/Scripts/mxvalidate.py | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/python/Scripts/mxvalidate.py b/python/Scripts/mxvalidate.py
index 8b5271e9ed..8cc1ee78fd 100755
--- a/python/Scripts/mxvalidate.py
+++ b/python/Scripts/mxvalidate.py
@@ -16,13 +16,7 @@ def main():
parser.add_argument(dest="inputFilename", help="Filename of the input document.")
opts = parser.parse_args()
- doc = mx.createDocument()
- try:
- mx.readFromXmlFile(doc, opts.inputFilename)
- except mx.ExceptionFileMissing as err:
- print(err)
- sys.exit(0)
-
+ # Load standard libraries if requested.
if opts.stdlib:
stdlib = mx.createDocument()
try:
@@ -30,15 +24,23 @@ def main():
except Exception as err:
print(err)
sys.exit(0)
- doc.importLibrary(stdlib)
- (valid, message) = doc.validate()
+ # Read and validate the source document.
+ doc = mx.createDocument()
+ try:
+ mx.readFromXmlFile(doc, opts.inputFilename)
+ doc.setDataLibrary(stdlib)
+ except mx.ExceptionFileMissing as err:
+ print(err)
+ sys.exit(0)
+ valid, message = doc.validate()
if (valid):
print("%s is a valid MaterialX document in v%s" % (opts.inputFilename, mx.getVersionString()))
else:
print("%s is not a valid MaterialX document in v%s" % (opts.inputFilename, mx.getVersionString()))
print(message)
+ # Generate verbose output if requested.
if opts.verbose:
nodegraphs = doc.getNodeGraphs()
materials = doc.getMaterialNodes()
From d18af703f1205f207297452906569195c9f7787e Mon Sep 17 00:00:00 2001
From: Masuo Suzuki <153872239+msuzuki-nvidia@users.noreply.github.com>
Date: Thu, 17 Oct 2024 16:44:46 -0700
Subject: [PATCH 26/80] Add support `closest` texture lookup mode in MDL
backend (#2072)
Add support `closest` texture lookup mode in MDL backend.
This change affects in all type of `image` nodes.
---
.../mdl/materialx/stdlib_1_6.mdl | 90 ++++++++++++-------
1 file changed, 60 insertions(+), 30 deletions(-)
diff --git a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl
index 601a10fda2..f5d661b17e 100644
--- a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl
+++ b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl
@@ -88,6 +88,24 @@ export material mx_surface_unlit(
}
}
+// Helper function provides texture lookup coordinate with `closest` lookup type support
+float2 tex_lookup_coord(float2 st, int tex_width, int tex_height, core::mx_filterlookup_type lookup_type, bool flip_v)
+{
+ float2 coord = st;
+
+ // `closest` lookup
+ if (lookup_type == core::mx_filterlookup_type_closest)
+ {
+ int2 tex_size(tex_width, tex_height);
+ coord = (math::floor(coord * tex_size) + float2(0.5)) / tex_size;
+ }
+
+ // `linear` and `cubic` uses the original coord
+ coord = flip_v ? float2(coord.x, 1.0 - coord.y) : coord;
+
+ return coord;
+}
+
// NOTE: need to map MaterialX return type overloads to different function names
// or we require the mx_default to be always set explicitly
@@ -121,8 +139,7 @@ export float mx_image_float(
uniform core::mx_filterlookup_type mxp_filtertype = core::mx_filterlookup_type(core::mx_filterlookup_type_linear)
[[
anno::description("Enumeration {closest,linear,cubic}."),
- anno::display_name("Filter Type"),
- anno::unused()
+ anno::display_name("Filter Type")
]],
uniform string mxp_framerange = string("")
[[
@@ -160,9 +177,12 @@ export float mx_image_float(
return mxp_default;
float returnValue = ::tex::lookup_float(tex: mxp_file,
- coord: mxp_flip_v
- ? float2(mxp_texcoord.x, 1.0f - mxp_texcoord.y)
- : mxp_texcoord,
+ coord: tex_lookup_coord(
+ mxp_texcoord,
+ tex::width(mxp_file),
+ tex::height(mxp_file),
+ mxp_filtertype,
+ mxp_flip_v),
wrap_u: map_addressmode(mxp_uaddressmode),
wrap_v: map_addressmode(mxp_vaddressmode));
return returnValue;
@@ -198,8 +218,7 @@ export color mx_image_color3(
uniform core::mx_filterlookup_type mxp_filtertype = core::mx_filterlookup_type(core::mx_filterlookup_type_linear)
[[
anno::description("Enumeration {closest,linear,cubic}."),
- anno::display_name("Filter Type"),
- anno::unused()
+ anno::display_name("Filter Type")
]],
uniform string mxp_framerange = string("")
[[
@@ -237,9 +256,12 @@ export color mx_image_color3(
return mxp_default;
color returnValue = ::tex::lookup_color(tex: mxp_file,
- coord: mxp_flip_v
- ? float2(mxp_texcoord.x, 1.0f - mxp_texcoord.y)
- : mxp_texcoord,
+ coord: tex_lookup_coord(
+ mxp_texcoord,
+ tex::width(mxp_file),
+ tex::height(mxp_file),
+ mxp_filtertype,
+ mxp_flip_v),
wrap_u: map_addressmode(mxp_uaddressmode),
wrap_v: map_addressmode(mxp_vaddressmode));
return returnValue;
@@ -275,8 +297,7 @@ export core::color4 mx_image_color4(
uniform core::mx_filterlookup_type mxp_filtertype = core::mx_filterlookup_type(core::mx_filterlookup_type_linear)
[[
anno::description("Enumeration {closest,linear,cubic}."),
- anno::display_name("Filter Type"),
- anno::unused()
+ anno::display_name("Filter Type")
]],
uniform string mxp_framerange = string("")
[[
@@ -314,9 +335,12 @@ export core::color4 mx_image_color4(
return mxp_default;
core::color4 returnValue = core::mk_color4(::tex::lookup_float4(tex: mxp_file,
- coord: mxp_flip_v
- ? float2(mxp_texcoord.x, 1.0f - mxp_texcoord.y)
- : mxp_texcoord,
+ coord: tex_lookup_coord(
+ mxp_texcoord,
+ tex::width(mxp_file),
+ tex::height(mxp_file),
+ mxp_filtertype,
+ mxp_flip_v),
wrap_u: map_addressmode(mxp_uaddressmode),
wrap_v: map_addressmode(mxp_vaddressmode)));
return returnValue;
@@ -352,8 +376,7 @@ export float2 mx_image_vector2(
uniform core::mx_filterlookup_type mxp_filtertype = core::mx_filterlookup_type(core::mx_filterlookup_type_linear)
[[
anno::description("Enumeration {closest,linear,cubic}."),
- anno::display_name("Filter Type"),
- anno::unused()
+ anno::display_name("Filter Type")
]],
uniform string mxp_framerange = string("")
[[
@@ -391,9 +414,12 @@ export float2 mx_image_vector2(
return mxp_default;
float2 returnValue = ::tex::lookup_float2(tex: mxp_file,
- coord: mxp_flip_v
- ? float2(mxp_texcoord.x, 1.0f - mxp_texcoord.y)
- : mxp_texcoord,
+ coord: tex_lookup_coord(
+ mxp_texcoord,
+ tex::width(mxp_file),
+ tex::height(mxp_file),
+ mxp_filtertype,
+ mxp_flip_v),
wrap_u: map_addressmode(mxp_uaddressmode),
wrap_v: map_addressmode(mxp_vaddressmode));
return returnValue;
@@ -429,8 +455,7 @@ export float3 mx_image_vector3(
uniform core::mx_filterlookup_type mxp_filtertype = core::mx_filterlookup_type(core::mx_filterlookup_type_linear)
[[
anno::description("Enumeration {closest,linear,cubic}."),
- anno::display_name("Filter Type"),
- anno::unused()
+ anno::display_name("Filter Type")
]],
uniform string mxp_framerange = string("")
[[
@@ -468,9 +493,12 @@ export float3 mx_image_vector3(
return mxp_default;
float3 returnValue = ::tex::lookup_float3(tex: mxp_file,
- coord: mxp_flip_v
- ? float2(mxp_texcoord.x, 1.0f - mxp_texcoord.y)
- : mxp_texcoord,
+ coord: tex_lookup_coord(
+ mxp_texcoord,
+ tex::width(mxp_file),
+ tex::height(mxp_file),
+ mxp_filtertype,
+ mxp_flip_v),
wrap_u: map_addressmode(mxp_uaddressmode),
wrap_v: map_addressmode(mxp_vaddressmode));
return returnValue;
@@ -506,8 +534,7 @@ export float4 mx_image_vector4(
uniform core::mx_filterlookup_type mxp_filtertype = core::mx_filterlookup_type(core::mx_filterlookup_type_linear)
[[
anno::description("Enumeration {closest,linear,cubic}."),
- anno::display_name("Filter Type"),
- anno::unused()
+ anno::display_name("Filter Type")
]],
uniform string mxp_framerange = string("")
[[
@@ -545,9 +572,12 @@ export float4 mx_image_vector4(
return mxp_default;
float4 returnValue = ::tex::lookup_float4(tex: mxp_file,
- coord: mxp_flip_v
- ? float2(mxp_texcoord.x, 1.0f - mxp_texcoord.y)
- : mxp_texcoord,
+ coord: tex_lookup_coord(
+ mxp_texcoord,
+ tex::width(mxp_file),
+ tex::height(mxp_file),
+ mxp_filtertype,
+ mxp_flip_v),
wrap_u: map_addressmode(mxp_uaddressmode),
wrap_v: map_addressmode(mxp_vaddressmode));
return returnValue;
From 2a61e63f445fc547b56d479141b10191e4eb31e1 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Fri, 18 Oct 2024 17:27:04 -0700
Subject: [PATCH 27/80] CMake updates for Apple builds (#2077)
- Mark the CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY flag as Apple-specific, removing it from CMake interfaces on other platforms.
- Simplify comment blocks to highlight key points.
- Reorder the order of option declarations for clarity.
---
CMakeLists.txt | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59afaca01e..31db83e8fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,25 +60,21 @@ option(MATERIALX_DYNAMIC_ANALYSIS "Build MaterialX libraries with dynamic analys
option(MATERIALX_OSL_LEGACY_CLOSURES "Build OSL shader generation supporting the legacy OSL closures." OFF)
option(MATERIALX_BUILD_IOS "Build MaterialX for iOS. (Deprecated. Set CMAKE_SYSTEM_NAME instead)" OFF)
-set(MATERIALX_BUILD_APPLE_EMBEDDED OFF)
+option(MATERIALX_BUILD_APPLE_FRAMEWORK "Build MaterialX as an Apple Framework" ${__build_apple_framework})
if (MATERIALX_BUILD_IOS)
MESSAGE(WARNING "The MATERIALX_BUILD_IOS is deprecated. Set the CMAKE_SYSTEM_NAME to the platform instead")
set(CMAKE_SYSTEM_NAME iOS)
endif()
-# Cross Compilation detection as defined in CMake docs
+# Apple ecosystem cross-compilation
# https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos
-# Note: All these SDKs may not be supported by MaterialX
+set(MATERIALX_BUILD_APPLE_EMBEDDED OFF)
set(__build_apple_framework OFF)
-if (CMAKE_SYSTEM_NAME MATCHES "iOS"
- OR CMAKE_SYSTEM_NAME MATCHES "tvOS"
- OR CMAKE_SYSTEM_NAME MATCHES "visionOS"
- OR CMAKE_SYSTEM_NAME MATCHES "watchOS")
+if (CMAKE_SYSTEM_NAME MATCHES "iOS" OR CMAKE_SYSTEM_NAME MATCHES "tvOS" OR CMAKE_SYSTEM_NAME MATCHES "visionOS" OR CMAKE_SYSTEM_NAME MATCHES "watchOS")
set(MATERIALX_BUILD_APPLE_EMBEDDED ON)
set(__build_apple_framework ${MATERIALX_BUILD_SHARED_LIBS})
# TARGET_OS_IPHONE refers to all IPHONE derived platforms
# https://chaosinmotion.com/2021/08/02/things-to-remember-compiler-conditionals-for-macos-ios-etc/
- # This should be auto-defined, but leaving it in here because it was historically defined
add_definitions(-DTARGET_OS_IPHONE=1)
set(MATERIALX_BUILD_MONOLITHIC ON)
set(MATERIALX_BUILD_PYTHON OFF)
@@ -90,8 +86,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "iOS"
set(MATERIALX_BUILD_TESTS OFF)
endif()
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-" CACHE STRING "The Codesigning identity needed to sign compiled objects")
-option(MATERIALX_BUILD_APPLE_FRAMEWORK "Build MaterialX as an Apple Framework" ${__build_apple_framework})
+# Apple framework handling
+if(APPLE)
+ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-" CACHE STRING "The Codesigning identity needed to sign compiled objects")
+endif()
if (MATERIALX_BUILD_APPLE_FRAMEWORK)
add_definitions(-DBUILD_APPLE_FRAMEWORK)
set(MATERIALX_BUILD_MONOLITHIC ON)
From 4cb8ef9ed38975dfc01656493b66b62ef63a715d Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Fri, 18 Oct 2024 21:05:18 -0700
Subject: [PATCH 28/80] Simplify material test suite (#2078)
- Split adjustment.mtlx into separate documents for each node.
- Remove test materials for nodes with graph definitions.
---
.../stdlib/adjustment/adjustment.mtlx | 383 ------------------
.../stdlib/adjustment/luminance.mtlx | 15 +
.../TestSuite/stdlib/adjustment/remap.mtlx | 113 ++++++
.../TestSuite/stdlib/channel/channel.mtlx | 56 ---
.../conditional/conditional_switch.mtlx | 199 ---------
.../TestSuite/stdlib/convert/convert.mtlx | 30 --
6 files changed, 128 insertions(+), 668 deletions(-)
delete mode 100644 resources/Materials/TestSuite/stdlib/adjustment/adjustment.mtlx
create mode 100644 resources/Materials/TestSuite/stdlib/adjustment/luminance.mtlx
create mode 100644 resources/Materials/TestSuite/stdlib/adjustment/remap.mtlx
delete mode 100644 resources/Materials/TestSuite/stdlib/conditional/conditional_switch.mtlx
delete mode 100644 resources/Materials/TestSuite/stdlib/convert/convert.mtlx
diff --git a/resources/Materials/TestSuite/stdlib/adjustment/adjustment.mtlx b/resources/Materials/TestSuite/stdlib/adjustment/adjustment.mtlx
deleted file mode 100644
index 83c4b95e9b..0000000000
--- a/resources/Materials/TestSuite/stdlib/adjustment/adjustment.mtlx
+++ /dev/null
@@ -1,383 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/Materials/TestSuite/stdlib/adjustment/luminance.mtlx b/resources/Materials/TestSuite/stdlib/adjustment/luminance.mtlx
new file mode 100644
index 0000000000..6260df8c57
--- /dev/null
+++ b/resources/Materials/TestSuite/stdlib/adjustment/luminance.mtlx
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/Materials/TestSuite/stdlib/adjustment/remap.mtlx b/resources/Materials/TestSuite/stdlib/adjustment/remap.mtlx
new file mode 100644
index 0000000000..9175411a5d
--- /dev/null
+++ b/resources/Materials/TestSuite/stdlib/adjustment/remap.mtlx
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/Materials/TestSuite/stdlib/channel/channel.mtlx b/resources/Materials/TestSuite/stdlib/channel/channel.mtlx
index 59dbd160eb..57e90acf45 100644
--- a/resources/Materials/TestSuite/stdlib/channel/channel.mtlx
+++ b/resources/Materials/TestSuite/stdlib/channel/channel.mtlx
@@ -97,60 +97,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/Materials/TestSuite/stdlib/conditional/conditional_switch.mtlx b/resources/Materials/TestSuite/stdlib/conditional/conditional_switch.mtlx
deleted file mode 100644
index 38f36a7290..0000000000
--- a/resources/Materials/TestSuite/stdlib/conditional/conditional_switch.mtlx
+++ /dev/null
@@ -1,199 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/Materials/TestSuite/stdlib/convert/convert.mtlx b/resources/Materials/TestSuite/stdlib/convert/convert.mtlx
deleted file mode 100644
index f29b1eaab4..0000000000
--- a/resources/Materials/TestSuite/stdlib/convert/convert.mtlx
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From bec073ba952dcd1ca79279ebc7e2698cbd0a94c3 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Sat, 19 Oct 2024 11:54:31 -0700
Subject: [PATCH 29/80] Additional refinements to GLSL and MSL (#2079)
- Provide mx_mod and mx_inverse in both GLSL and MSL.
- Remove a legacy preprocessor definition in MSL.
---
libraries/stdlib/genglsl/lib/mx_math.glsl | 2 ++
.../stdlib/genglsl/stdlib_genglsl_impl.mtlx | 26 +++++++++----------
.../stdlib/genmsl/stdlib_genmsl_impl.mtlx | 17 ------------
source/MaterialXGenMsl/MslShaderGenerator.cpp | 1 -
4 files changed, 15 insertions(+), 31 deletions(-)
diff --git a/libraries/stdlib/genglsl/lib/mx_math.glsl b/libraries/stdlib/genglsl/lib/mx_math.glsl
index f87e5653da..d196615e70 100644
--- a/libraries/stdlib/genglsl/lib/mx_math.glsl
+++ b/libraries/stdlib/genglsl/lib/mx_math.glsl
@@ -1,5 +1,7 @@
#define M_FLOAT_EPS 1e-8
+#define mx_mod mod
+#define mx_inverse inverse
#define mx_inversesqrt inversesqrt
#define mx_sin sin
#define mx_cos cos
diff --git a/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx b/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx
index 765c48c77b..69f8f9a7f8 100644
--- a/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx
+++ b/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx
@@ -252,17 +252,17 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -458,8 +458,8 @@
-
-
+
+
diff --git a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
index 1920d04b70..afdfb2cfbb 100644
--- a/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
+++ b/libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
@@ -100,19 +100,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -122,10 +109,6 @@
-
-
-
-
diff --git a/source/MaterialXGenMsl/MslShaderGenerator.cpp b/source/MaterialXGenMsl/MslShaderGenerator.cpp
index 5476b33c90..9511fac7ba 100644
--- a/source/MaterialXGenMsl/MslShaderGenerator.cpp
+++ b/source/MaterialXGenMsl/MslShaderGenerator.cpp
@@ -944,7 +944,6 @@ void MslShaderGenerator::emitPixelStage(const ShaderGraph& graph, GenContext& co
emitLine("{}", stage, false);
// Add common math functions
- emitLine("#define __DECL_GL_MATH_FUNCTIONS__", stage, false);
emitLibraryInclude("stdlib/genmsl/lib/mx_math.metal", context, stage);
emitLineBreak(stage);
From f6355a66b635d11d20e75d0f2705fba728fb38ad Mon Sep 17 00:00:00 2001
From: Jonathan Feldstein
Date: Sat, 19 Oct 2024 14:57:43 -0400
Subject: [PATCH 30/80] Add defaultgeomprop support for nodegraph inputs
(#2076)
This PR makes it so that defaultgeomprop values can be used with nodegraph inputs as opposed to solely used on nodedef inputs. Includes a test file that is a nodegraph version of a checkerboard nodegraph implementation. The nodegraph exposes a defaultgeomprop value on the nodegraph's texcoord input of "UV0".
---
.../defaultgeomprop/defaultgeomprop.mtlx | 41 +++++++++++++++++++
source/MaterialXCore/Interface.cpp | 2 +-
source/MaterialXGenShader/ShaderGraph.cpp | 18 +++++++-
3 files changed, 59 insertions(+), 2 deletions(-)
create mode 100644 resources/Materials/TestSuite/stdlib/defaultgeomprop/defaultgeomprop.mtlx
diff --git a/resources/Materials/TestSuite/stdlib/defaultgeomprop/defaultgeomprop.mtlx b/resources/Materials/TestSuite/stdlib/defaultgeomprop/defaultgeomprop.mtlx
new file mode 100644
index 0000000000..86bddc9650
--- /dev/null
+++ b/resources/Materials/TestSuite/stdlib/defaultgeomprop/defaultgeomprop.mtlx
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/MaterialXCore/Interface.cpp b/source/MaterialXCore/Interface.cpp
index 24d3ccfe0d..1c12e38ded 100644
--- a/source/MaterialXCore/Interface.cpp
+++ b/source/MaterialXCore/Interface.cpp
@@ -295,7 +295,7 @@ bool Input::validate(string* message) const
if (hasDefaultGeomPropString())
{
- validateRequire(parent->isA(), res, message, "Invalid defaultgeomprop on non-definition input");
+ validateRequire(parent->isA() || parent->isA(), res, message, "Invalid defaultgeomprop on non-definition and non-nodegraph input");
validateRequire(getDefaultGeomProp() != nullptr, res, message, "Invalid defaultgeomprop string");
}
if (parent->isA())
diff --git a/source/MaterialXGenShader/ShaderGraph.cpp b/source/MaterialXGenShader/ShaderGraph.cpp
index 0f39b46c32..e9a3b50b79 100644
--- a/source/MaterialXGenShader/ShaderGraph.cpp
+++ b/source/MaterialXGenShader/ShaderGraph.cpp
@@ -81,7 +81,7 @@ void ShaderGraph::createConnectedNodes(const ElementPtr& downstreamElement,
ElementPtr connectingElement,
GenContext& context)
{
- // Create the node if it doesn't exists
+ // Create the node if it doesn't exist.
NodePtr upstreamNode = upstreamElement->asA();
if (!upstreamNode)
{
@@ -95,6 +95,22 @@ void ShaderGraph::createConnectedNodes(const ElementPtr& downstreamElement,
newNode = createNode(upstreamNode, context);
}
+ // Handle interface inputs with default geometric properties.
+ for (InputPtr activeInput : upstreamNode->getActiveInputs())
+ {
+ if (!activeInput->hasInterfaceName() || activeInput->getConnectedNode())
+ {
+ continue;
+ }
+
+ InputPtr graphInput = activeInput->getInterfaceInput();
+ if (graphInput && graphInput->hasDefaultGeomPropString())
+ {
+ ShaderInput* shaderInput = getNode(upstreamNode->getName())->getInput(activeInput->getName());
+ addDefaultGeomNode(shaderInput, *graphInput->getDefaultGeomProp(), context);
+ }
+ }
+
//
// Make connections
//
From a578d8a9758f0a6eefc5a1a5c7ab10727ee11b2d Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Sun, 20 Oct 2024 12:31:54 -0700
Subject: [PATCH 31/80] Simplify material test suite (#2080)
- Split channel.mtlx into separate documents for each node.
- Remove test materials for nodes with graph definitions.
- Reduce coupling of unit tests with material examples.
---
libraries/stdlib/stdlib_ng.mtlx | 1 -
.../channel/{channel.mtlx => combine.mtlx} | 35 -----------------
.../TestSuite/stdlib/channel/extract.mtlx | 38 +++++++++++++++++++
.../stdlib/compositing/compositing.mtlx | 25 ------------
.../{tokenGraph.mtlx => token_graph.mtlx} | 0
source/MaterialXTest/MaterialXCore/Node.cpp | 37 ------------------
6 files changed, 38 insertions(+), 98 deletions(-)
rename resources/Materials/TestSuite/stdlib/channel/{channel.mtlx => combine.mtlx} (65%)
create mode 100644 resources/Materials/TestSuite/stdlib/channel/extract.mtlx
rename resources/Materials/TestSuite/stdlib/texture/{tokenGraph.mtlx => token_graph.mtlx} (100%)
diff --git a/libraries/stdlib/stdlib_ng.mtlx b/libraries/stdlib/stdlib_ng.mtlx
index 893e084b68..ef7f5ebc90 100644
--- a/libraries/stdlib/stdlib_ng.mtlx
+++ b/libraries/stdlib/stdlib_ng.mtlx
@@ -4386,7 +4386,6 @@
-
diff --git a/resources/Materials/TestSuite/stdlib/channel/channel.mtlx b/resources/Materials/TestSuite/stdlib/channel/combine.mtlx
similarity index 65%
rename from resources/Materials/TestSuite/stdlib/channel/channel.mtlx
rename to resources/Materials/TestSuite/stdlib/channel/combine.mtlx
index 57e90acf45..403b344226 100644
--- a/resources/Materials/TestSuite/stdlib/channel/channel.mtlx
+++ b/resources/Materials/TestSuite/stdlib/channel/combine.mtlx
@@ -62,39 +62,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/Materials/TestSuite/stdlib/channel/extract.mtlx b/resources/Materials/TestSuite/stdlib/channel/extract.mtlx
new file mode 100644
index 0000000000..467707a47f
--- /dev/null
+++ b/resources/Materials/TestSuite/stdlib/channel/extract.mtlx
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/Materials/TestSuite/stdlib/compositing/compositing.mtlx b/resources/Materials/TestSuite/stdlib/compositing/compositing.mtlx
index 4a2d032be6..b60b9803a9 100644
--- a/resources/Materials/TestSuite/stdlib/compositing/compositing.mtlx
+++ b/resources/Materials/TestSuite/stdlib/compositing/compositing.mtlx
@@ -8,7 +8,6 @@
- burn
- dodge
- screen
- - overlay
- disjointover
- mask
- matte
@@ -181,30 +180,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/Materials/TestSuite/stdlib/texture/tokenGraph.mtlx b/resources/Materials/TestSuite/stdlib/texture/token_graph.mtlx
similarity index 100%
rename from resources/Materials/TestSuite/stdlib/texture/tokenGraph.mtlx
rename to resources/Materials/TestSuite/stdlib/texture/token_graph.mtlx
diff --git a/source/MaterialXTest/MaterialXCore/Node.cpp b/source/MaterialXTest/MaterialXCore/Node.cpp
index 58ee125bad..ef746bfe05 100644
--- a/source/MaterialXTest/MaterialXCore/Node.cpp
+++ b/source/MaterialXTest/MaterialXCore/Node.cpp
@@ -627,43 +627,6 @@ TEST_CASE("Organization", "[nodegraph]")
CHECK(nodeGraph->getBackdrops().empty());
}
-TEST_CASE("Tokens", "[nodegraph]")
-{
- mx::FileSearchPath searchPath = mx::getDefaultDataSearchPath();
- mx::DocumentPtr stdlib = mx::createDocument();
- mx::loadLibraries({ "libraries" }, searchPath, stdlib);
-
- mx::DocumentPtr doc = mx::createDocument();
- mx::readFromXmlFile(doc, "resources/Materials/TestSuite/stdlib/texture/tokenGraph.mtlx", searchPath);
-
- mx::StringVec graphNames = { "Tokenized_Image_2k_png", "Tokenized_Image_4k_jpg" };
- mx::StringVec resolutionStrings = { "2k", "4k" };
- mx::StringVec extensionStrings = { "png", "jpg" };
- for (size_t i=0; igetNodeGraph(graphNames[i]);
- REQUIRE(graph);
- std::vector tokens = graph->getActiveTokens();
-
- mx::NodePtr imagePtr = graph->getNode("tiledimage");
- REQUIRE(imagePtr);
-
- mx::InputPtr input = imagePtr->getInput("file");
- REQUIRE(input);
-
- // Test file name substitution creation.
- mx::StringResolverPtr resolver = input->createStringResolver();
- const mx::StringMap& substitutions = resolver->getFilenameSubstitutions();
- const std::string DELIMITER_PREFIX("[");
- const std::string DELIMITER_POSTFIX("]");
- for (auto token : tokens)
- {
- const std::string tokenString = DELIMITER_PREFIX + token->getName() + DELIMITER_POSTFIX;
- REQUIRE(substitutions.count(tokenString));
- }
- }
-}
-
TEST_CASE("Node Definition Creation", "[nodedef]")
{
mx::FileSearchPath searchPath = mx::getDefaultDataSearchPath();
From 5d6aa6ec30a7966fae51dc75c6b37d0656300a71 Mon Sep 17 00:00:00 2001
From: Karen Lucknavalai <34335343+klucknav@users.noreply.github.com>
Date: Mon, 21 Oct 2024 16:12:08 -0700
Subject: [PATCH 32/80] Update UsdPreviewSurface Nodegraph
This PR fixes the cutout issue described in gitIssue #2044. It also updates the nodegraph to reflect the recently updated PreviewSurface v2.6 which removes specular highlights for fully transparent materials.
---
libraries/bxdf/usd_preview_surface.mtlx | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/libraries/bxdf/usd_preview_surface.mtlx b/libraries/bxdf/usd_preview_surface.mtlx
index 7106da779b..d99fab3a8c 100644
--- a/libraries/bxdf/usd_preview_surface.mtlx
+++ b/libraries/bxdf/usd_preview_surface.mtlx
@@ -6,7 +6,7 @@
-
+
@@ -152,10 +152,16 @@
+
+
+
+
+
+
-
+
@@ -170,8 +176,12 @@
+
+
+
+
-
+
@@ -213,8 +223,12 @@
+
+
+
+
-
+
From 5cdb375e81d172048bf881d35d8b22a6c1af5049 Mon Sep 17 00:00:00 2001
From: Masuo Suzuki <153872239+msuzuki-nvidia@users.noreply.github.com>
Date: Wed, 23 Oct 2024 18:58:43 -0700
Subject: [PATCH 33/80] Fix hair nodes in MDL backend (#2085)
Fix the issue where the generated MDL code with hair nodes does not compile.
Also address warnings for unused parameters.
---
libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx | 2 +-
.../SimpleHair/simple_hair_default.mtlx | 1 +
.../mdl/materialx/pbrlib_1_6.mdl | 17 +++++++++--------
.../mdl/materialx/pbrlib_1_7.mdl | 5 +++++
.../mdl/materialx/stdlib_1_6.mdl | 1 +
5 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx b/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
index 0737ca82ab..c8f23958ae 100644
--- a/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
+++ b/libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx
@@ -26,7 +26,7 @@
-
+
diff --git a/resources/Materials/Examples/SimpleHair/simple_hair_default.mtlx b/resources/Materials/Examples/SimpleHair/simple_hair_default.mtlx
index 056c79b554..b3dbd80f9a 100644
--- a/resources/Materials/Examples/SimpleHair/simple_hair_default.mtlx
+++ b/resources/Materials/Examples/SimpleHair/simple_hair_default.mtlx
@@ -45,6 +45,7 @@
+
diff --git a/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl b/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl
index b69d59e8b0..e70f849920 100644
--- a/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl
+++ b/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_6.mdl
@@ -430,9 +430,9 @@ export material mx_thin_film_bsdf(
export material mx_chiang_hair_bsdf(
// TODO: MDL's chiang_hair BSDF has no support tinting each lobes
- color mxp_tint_R = color(1.0),
- color mxp_tint_TT = color(1.0),
- color mxp_tint_TRT = color(1.0),
+ color mxp_tint_R = color(1.0) [[ anno::unused() ]],
+ color mxp_tint_TT = color(1.0) [[ anno::unused() ]],
+ color mxp_tint_TRT = color(1.0) [[ anno::unused() ]],
float mxp_ior = 1.55,
float2 mxp_roughness_R = float2(0.1, 0.1),
float2 mxp_roughness_TT = float2(0.05, 0.05),
@@ -452,7 +452,7 @@ export material mx_chiang_hair_bsdf(
roughness_TT: mxp_roughness_TT,
roughness_TRT: mxp_roughness_TRT,
cuticle_angle: mxp_cuticle_angle,
- absorption_coefficient: mxp_absorption_coefficient,
+ absorption_coefficient: color(mxp_absorption_coefficient),
ior: mxp_ior
)
);
@@ -590,6 +590,7 @@ export material mx_surface(
scattering: bsdf_node,
emission: edf_node
),
+ hair: mxp_bsdf.hair,
ior: mxp_transmission_ior > 0.0 ? color(mxp_transmission_ior) : mxp_bsdf.ior,
volume: bsdf_volume,
geometry: material_geometry(
@@ -1010,17 +1011,17 @@ export mx_artistic_ior__result mx_artistic_ior(
return mx_artistic_ior__result(n,k);
}
-export float3 mx_dion_hair_absorption_from_melanin(
+export float3 mx_deon_hair_absorption_from_melanin(
float mxp_melanin_concentration = 0.25,
float mxp_melanin_redness = 0.5,
color mxp_eumelanin_color = color(0.657704, 0.498077, 0.254107),
color mxp_pheomelanin_color = color(0.829444, 0.67032, 0.349938)
) {
float melanin = -math::log(math::max(1.0 - mxp_melanin_concentration, 0.0001));
- float eumelanin = melanin * (1.0 = mxp_melanin_redness);
+ float eumelanin = melanin * (1.0 - mxp_melanin_redness);
float pheomelanin = melanin * mxp_melanin_redness;
return math::max(
- eumelanin * -math::log(mxp_eumelanin_color) + pheomelanin * -math::log(mxp_pheomelanin_color),
+ eumelanin * -math::log(float3(mxp_eumelanin_color)) + pheomelanin * -math::log(float3(mxp_pheomelanin_color)),
float3(0.0)
);
}
@@ -1038,7 +1039,7 @@ export float3 mx_chiang_hair_absorption_from_color(
(10.73 * r2 * mxp_azimuthal_roughness) +
(5.574 * r4) +
(0.245 * r4 * mxp_azimuthal_roughness);
- float3 sigma = math::log(math::min(math::max(mxp_color, 0.001), float3(1.0))) / r_fac;
+ float3 sigma = math::log(math::min(math::max(float3(mxp_color), 0.001), float3(1.0))) / r_fac;
return (sigma * sigma);
}
diff --git a/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_7.mdl b/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_7.mdl
index 2d288ee8f2..bea4e59bf6 100644
--- a/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_7.mdl
+++ b/source/MaterialXGenMdl/mdl/materialx/pbrlib_1_7.mdl
@@ -48,6 +48,7 @@ export using .::pbrlib_1_6 import mx_conductor_bsdf;
export using .::pbrlib_1_6 import mx_generalized_schlick_bsdf;
export using .::pbrlib_1_6 import mx_subsurface_bsdf;
export using .::pbrlib_1_6 import mx_thin_film_bsdf;
+export using .::pbrlib_1_6 import mx_chiang_hair_bsdf;
export using .::pbrlib_1_6 import mx_uniform_edf;
export using .::pbrlib_1_6 import mx_conical_edf;
export using .::pbrlib_1_6 import mx_measured_edf;
@@ -72,6 +73,10 @@ export using .::pbrlib_1_6 import mx_roughness_dual;
export using .::pbrlib_1_6 import mx_blackbody;
export using .::pbrlib_1_6 import mx_artistic_ior__result ;
export using .::pbrlib_1_6 import mx_artistic_ior;
+export using .::pbrlib_1_6 import mx_deon_hair_absorption_from_melanin;
+export using .::pbrlib_1_6 import mx_chiang_hair_absorption_from_color;
+export using .::pbrlib_1_6 import mx_chiang_hair_roughness__result;
+export using .::pbrlib_1_6 import mx_chiang_hair_roughness;
diff --git a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl
index f5d661b17e..3815d892a0 100644
--- a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl
+++ b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl
@@ -42,6 +42,7 @@ export material mx_surfacematerial(
= material(
thin_walled: mxp_surfaceshader.thin_walled || mxp_backsurfaceshader.thin_walled,
surface: mxp_surfaceshader.surface,
+ hair: mxp_surfaceshader.hair,
backface: mxp_backsurfaceshader.surface,
geometry: material_geometry(
cutout_opacity: mxp_surfaceshader.geometry.cutout_opacity,
From 1734e6dd9d132ddc9abcdd3a095ccf9f37e8fcc5 Mon Sep 17 00:00:00 2001
From: Rui Yang
Date: Wed, 23 Oct 2024 19:25:39 -0700
Subject: [PATCH 34/80] Add a combined version define in MaterialX C++ (#2031)
PR for https://github.com/AcademySoftwareFoundation/MaterialX/issues/1609
Also added a simple test in source/MaterialXTest/MaterialXCore
---
source/MaterialXCore/Library.h | 5 +++++
source/MaterialXTest/MaterialXCore/CoreUtil.cpp | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/source/MaterialXCore/Library.h b/source/MaterialXCore/Library.h
index 1a92c634a7..571644c098 100644
--- a/source/MaterialXCore/Library.h
+++ b/source/MaterialXCore/Library.h
@@ -21,6 +21,11 @@
#include
+#define MATERIALX_GENERATE_INDEX(major, minor, build) \
+ ((((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(build)))
+#define MATERIALX_VERSION_INDEX \
+ MATERIALX_GENERATE_INDEX(MATERIALX_MAJOR_VERSION, MATERIALX_MINOR_VERSION, MATERIALX_BUILD_VERSION)
+
/// Platform-specific macros for declaring imported and exported symbols.
#if defined(MATERIALX_BUILD_SHARED_LIBS)
#if defined(_WIN32)
diff --git a/source/MaterialXTest/MaterialXCore/CoreUtil.cpp b/source/MaterialXTest/MaterialXCore/CoreUtil.cpp
index 11aa826d4f..4bc174a690 100644
--- a/source/MaterialXTest/MaterialXCore/CoreUtil.cpp
+++ b/source/MaterialXTest/MaterialXCore/CoreUtil.cpp
@@ -10,6 +10,12 @@
namespace mx = MaterialX;
+TEST_CASE("Version comparison", "[coreutil]")
+{
+ // Test for version comparison
+ REQUIRE(MATERIALX_VERSION_INDEX > MATERIALX_GENERATE_INDEX(1, 38, 8));
+}
+
TEST_CASE("String utilities", "[coreutil]")
{
std::string invalidName("test.name");
From 593e175f3f17ccd00337cad29682d321643babaa Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Mon, 28 Oct 2024 17:14:33 -0700
Subject: [PATCH 35/80] Restore specular terms of UsdPreviewSurface (#2088)
This changelist restores the interpretation of the reflective and transmissive specular terms of UsdPreviewSurface, reverting some unintended changes in PR #2081.
---
libraries/bxdf/usd_preview_surface.mtlx | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/libraries/bxdf/usd_preview_surface.mtlx b/libraries/bxdf/usd_preview_surface.mtlx
index d99fab3a8c..a521c756bc 100644
--- a/libraries/bxdf/usd_preview_surface.mtlx
+++ b/libraries/bxdf/usd_preview_surface.mtlx
@@ -152,16 +152,10 @@
-
-
-
-
-
-
-
+
@@ -176,12 +170,8 @@
-
-
-
-
-
+
@@ -223,12 +213,8 @@
-
-
-
-
-
+
From 7af264b4039f06b78133b68e56c03e20b20449e6 Mon Sep 17 00:00:00 2001
From: JGamache-autodesk <56274617+JGamache-autodesk@users.noreply.github.com>
Date: Mon, 28 Oct 2024 20:56:17 -0400
Subject: [PATCH 36/80] Coat layer should affect emission in USD translation
(#2087)
The standard_surface coat parameters are currently affecting the baseColor of UsdPreviewSurface. It should also affect emission color.
---
libraries/bxdf/translation/standard_surface_to_usd.mtlx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libraries/bxdf/translation/standard_surface_to_usd.mtlx b/libraries/bxdf/translation/standard_surface_to_usd.mtlx
index 099465e369..51c7d5fc6e 100644
--- a/libraries/bxdf/translation/standard_surface_to_usd.mtlx
+++ b/libraries/bxdf/translation/standard_surface_to_usd.mtlx
@@ -80,10 +80,14 @@
-
+
+
+
+
+
From 967d4c2f5c5d563f10c0b7fcd8fb7e19e6369768 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Tue, 29 Oct 2024 14:44:23 -0700
Subject: [PATCH 37/80] Reduce verbosity of unit tests (#2091)
This changelist reduces the verbosity of our unit tests for element equivalence, focusing on REQUIRE statements to provide coverage.
---
.../MaterialXTest/MaterialXCore/Document.cpp | 64 -------------------
1 file changed, 64 deletions(-)
diff --git a/source/MaterialXTest/MaterialXCore/Document.cpp b/source/MaterialXTest/MaterialXCore/Document.cpp
index 94f8b98708..ae7623084e 100644
--- a/source/MaterialXTest/MaterialXCore/Document.cpp
+++ b/source/MaterialXTest/MaterialXCore/Document.cpp
@@ -10,8 +10,6 @@
#include
#include
-#include
-
namespace mx = MaterialX;
TEST_CASE("Document", "[document]")
@@ -123,16 +121,6 @@ TEST_CASE("Document", "[document]")
REQUIRE(doc->validate());
}
-void printDifferences(const mx::ElementEquivalenceResultVec& results, const std::string& label)
-{
- for (const mx::ElementEquivalenceResult& result : results)
- {
- std::cout << label << ": " << "Element: " << result.path1 <<
- ", Element: " << result.path2 << ", Difference Type: " << result.differenceType
- << ", Value: " << result.attributeName << std::endl;
- }
-}
-
TEST_CASE("Document equivalence", "[document]")
{
mx::DocumentPtr doc = mx::createDocument();
@@ -224,44 +212,18 @@ TEST_CASE("Document equivalence", "[document]")
// Check skipping all value compares
options.skipValueComparisons = true;
bool equivalent = doc->isEquivalent(doc2, options, &results);
- if (equivalent)
- {
- std::cout << "Unexpected skip value equivalence:" << std::endl;
- std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
- std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
- }
- else
- {
- printDifferences(results, "Expected value differences");
- }
REQUIRE(!equivalent);
// Check attibute values
options.skipValueComparisons = false;
results.clear();
equivalent = doc->isEquivalent(doc2, options, &results);
- if (!equivalent)
- {
- printDifferences(results, "Unexpected value difference");
- std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
- std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
- }
REQUIRE(equivalent);
unsigned int currentPrecision = mx::Value::getFloatPrecision();
// This will compare 0.012345608 versus: 1, 0.012345611 for input10
options.precision = 8;
equivalent = doc->isEquivalent(doc2, options);
- if (equivalent)
- {
- std::cout << "Unexpected precision equivalence:" << std::endl;
- std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
- std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
- }
- else
- {
- printDifferences(results, "Expected precision difference");
- }
REQUIRE(!equivalent);
options.precision = currentPrecision;
@@ -274,12 +236,6 @@ TEST_CASE("Document equivalence", "[document]")
floatInput->setAttribute(mx::ValueElement::UI_MAX_ATTRIBUTE, "100.0");
}
equivalent = doc->isEquivalent(doc2, options, &results);
- if (!equivalent)
- {
- printDifferences(results, "Unexpected filtering differences");
- std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
- std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
- }
REQUIRE(equivalent);
for (mx::InputPtr floatInput : floatInputs)
{
@@ -293,16 +249,6 @@ TEST_CASE("Document equivalence", "[document]")
mismatchElement->setName("mismatch_color4");
results.clear();
equivalent = doc->isEquivalent(doc2, options, &results);
- if (!equivalent)
- {
- printDifferences(results, "Expected name mismatch differences");
- }
- else
- {
- std::cout << "Unexpected name match equivalence:" << std::endl;
- std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
- std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
- }
REQUIRE(!equivalent);
mismatchElement->setName(previousName);
results.clear();
@@ -320,15 +266,5 @@ TEST_CASE("Document equivalence", "[document]")
nodeGraph2->setNodeDefString("ND_mygraph");
results.clear();
equivalent = doc->isEquivalent(doc2, options, &results);
- if (!equivalent)
- {
- printDifferences(results, "Expected functional graph differences");
- }
- else
- {
- std::cout << "Unexpected functional graph equivalence:" << std::endl;
- std::cout << "Document 1: " << mx::prettyPrint(doc) << std::endl;
- std::cout << "Document 2: " << mx::prettyPrint(doc2) << std::endl;
- }
REQUIRE(!equivalent);
}
From 9d875a817f17dac5d8b3ad2b388cdfdee5c6eb6a Mon Sep 17 00:00:00 2001
From: Lee Kerley <154285602+ld-kerley@users.noreply.github.com>
Date: Tue, 29 Oct 2024 16:10:33 -0700
Subject: [PATCH 38/80] Initial implementation of structs in MaterialX (#1831)
This PR introduces support for custom structs types.
Custom structs are defined using the `typedef` element.
```
```
`member` elements are used to define the members of the custom struct. The `value` here is the default value used if no initializer is specified.
---
.../JsMaterialX/JsMaterialXCore/JsValue.cpp | 2 +-
source/MaterialXCore/Definition.cpp | 8 +
source/MaterialXCore/Definition.h | 11 +-
source/MaterialXCore/Element.cpp | 16 +
source/MaterialXCore/Element.h | 14 +-
source/MaterialXCore/Exception.h | 8 +
source/MaterialXCore/Value.cpp | 73 ++++-
source/MaterialXCore/Value.h | 81 ++++-
source/MaterialXGenGlsl/GlslSyntax.cpp | 37 +++
source/MaterialXGenGlsl/GlslSyntax.h | 14 +
.../mdl/materialx/stdlib_1_8.mdl | 20 ++
source/MaterialXGenOsl/OslShaderGenerator.cpp | 9 +-
source/MaterialXGenShader/ShaderGenerator.cpp | 41 +++
source/MaterialXGenShader/ShaderGenerator.h | 6 +
source/MaterialXGenShader/ShaderNode.cpp | 4 +-
source/MaterialXGenShader/Syntax.cpp | 65 ++++
source/MaterialXGenShader/Syntax.h | 32 ++
source/MaterialXGenShader/TypeDesc.cpp | 129 +++++++-
source/MaterialXGenShader/TypeDesc.h | 79 ++++-
source/MaterialXGraphEditor/RenderView.cpp | 3 +
source/MaterialXRender/Util.cpp | 2 +-
source/MaterialXRenderGlsl/GlslMaterial.cpp | 2 +-
source/MaterialXRenderGlsl/GlslProgram.cpp | 120 ++++---
source/MaterialXRenderGlsl/GlslProgram.h | 4 +-
source/MaterialXRenderMsl/MslMaterial.mm | 2 +-
.../MslPipelineStateObject.h | 4 +-
.../MslPipelineStateObject.mm | 296 +++++++++++-------
source/MaterialXTest/MaterialXCore/Node.cpp | 6 +-
.../MaterialXGenShader/GenShaderUtil.cpp | 5 +
source/MaterialXView/Viewer.cpp | 3 +
.../PyMaterialX/PyMaterialXCore/PyValue.cpp | 6 +-
.../PyShaderGenerator.cpp | 2 +
32 files changed, 903 insertions(+), 201 deletions(-)
diff --git a/source/JsMaterialX/JsMaterialXCore/JsValue.cpp b/source/JsMaterialX/JsMaterialXCore/JsValue.cpp
index d0ddba7e17..5e45ef16cd 100644
--- a/source/JsMaterialX/JsMaterialXCore/JsValue.cpp
+++ b/source/JsMaterialX/JsMaterialXCore/JsValue.cpp
@@ -47,7 +47,7 @@ EMSCRIPTEN_BINDINGS(value)
.function("copy", &mx::Value::copy, ems::pure_virtual())
.function("getTypeString", &mx::Value::getTypeString)
.function("getValueString", &mx::Value::getValueString)
- .class_function("createValueFromStrings", &mx::Value::createValueFromStrings)
+ BIND_CLASS_FUNC("createValueFromStrings", mx::Value, createValueFromStrings, 2, 3, stRef, stRef, mx::ConstTypeDefPtr)
.class_function("setFloatFormat", &mx::Value::setFloatFormat)
.class_function("setFloatPrecision", &mx::Value::setFloatPrecision)
.class_function("getFloatFormat", &mx::Value::getFloatFormat)
diff --git a/source/MaterialXCore/Definition.cpp b/source/MaterialXCore/Definition.cpp
index 22c111f03c..da6c3ca3af 100644
--- a/source/MaterialXCore/Definition.cpp
+++ b/source/MaterialXCore/Definition.cpp
@@ -196,4 +196,12 @@ vector UnitTypeDef::getUnitDefs() const
return unitDefs;
}
+ValuePtr AttributeDef::getValue() const
+{
+ if (!hasValue())
+ return ValuePtr();
+
+ return Value::createValueFromStrings(getValueString(), getType(), getDocument()->getTypeDef(getType()));
+}
+
MATERIALX_NAMESPACE_END
diff --git a/source/MaterialXCore/Definition.h b/source/MaterialXCore/Definition.h
index 6498f21c89..0ce7761b6d 100644
--- a/source/MaterialXCore/Definition.h
+++ b/source/MaterialXCore/Definition.h
@@ -423,11 +423,11 @@ class MX_CORE_API TargetDef : public TypedElement
/// @class Member
/// A member element within a TypeDef.
-class MX_CORE_API Member : public TypedElement
+class MX_CORE_API Member : public ValueElement
{
public:
Member(ElementPtr parent, const string& name) :
- TypedElement(parent, CATEGORY, name)
+ ValueElement(parent, CATEGORY, name)
{
}
virtual ~Member() { }
@@ -625,12 +625,7 @@ class MX_CORE_API AttributeDef : public TypedElement
///
/// @return A shared pointer to the typed value of this element, or an
/// empty shared pointer if no value is present.
- ValuePtr getValue() const
- {
- if (!hasValue())
- return ValuePtr();
- return Value::createValueFromStrings(getValueString(), getType());
- }
+ ValuePtr getValue() const;
/// @}
/// @name Elements
diff --git a/source/MaterialXCore/Element.cpp b/source/MaterialXCore/Element.cpp
index af47a6a2ba..648d7df000 100644
--- a/source/MaterialXCore/Element.cpp
+++ b/source/MaterialXCore/Element.cpp
@@ -638,6 +638,22 @@ string ValueElement::getResolvedValueString(StringResolverPtr resolver) const
return resolver->resolve(getValueString(), getType());
}
+ValuePtr ValueElement::getValue() const
+{
+ if (!hasValue())
+ return ValuePtr();
+
+ return Value::createValueFromStrings(getValueString(), getType(), getDocument()->getTypeDef(getType()));
+}
+
+ValuePtr ValueElement::getResolvedValue(StringResolverPtr resolver) const
+{
+ if (!hasValue())
+ return ValuePtr();
+
+ return Value::createValueFromStrings(getResolvedValueString(resolver), getType(), getDocument()->getTypeDef(getType()));
+}
+
ValuePtr ValueElement::getDefaultValue() const
{
ConstElementPtr parent = getParent();
diff --git a/source/MaterialXCore/Element.h b/source/MaterialXCore/Element.h
index a80bc3a49f..fb4bbe07ce 100644
--- a/source/MaterialXCore/Element.h
+++ b/source/MaterialXCore/Element.h
@@ -1037,12 +1037,7 @@ class MX_CORE_API ValueElement : public TypedElement
///
/// @return A shared pointer to the typed value of this element, or an
/// empty shared pointer if no value is present.
- ValuePtr getValue() const
- {
- if (!hasValue())
- return ValuePtr();
- return Value::createValueFromStrings(getValueString(), getType());
- }
+ ValuePtr getValue() const;
/// Return the resolved value of an element as a generic value object, which
/// may be queried to access its data.
@@ -1052,12 +1047,7 @@ class MX_CORE_API ValueElement : public TypedElement
/// will be created at this scope and applied to the return value.
/// @return A shared pointer to the typed value of this element, or an
/// empty shared pointer if no value is present.
- ValuePtr getResolvedValue(StringResolverPtr resolver = nullptr) const
- {
- if (!hasValue())
- return ValuePtr();
- return Value::createValueFromStrings(getResolvedValueString(resolver), getType());
- }
+ ValuePtr getResolvedValue(StringResolverPtr resolver = nullptr) const;
/// Return the default value for this element as a generic value object, which
/// may be queried to access its data.
diff --git a/source/MaterialXCore/Exception.h b/source/MaterialXCore/Exception.h
index 4fc0c728ec..4cf51f1cd5 100644
--- a/source/MaterialXCore/Exception.h
+++ b/source/MaterialXCore/Exception.h
@@ -50,6 +50,14 @@ class MX_CORE_API Exception : public std::exception
string _msg;
};
+/// @class ExceptionTypeError
+/// An exception that is thrown when a type mismatch is encountered.
+class MX_CORE_API ExceptionTypeError : public Exception
+{
+ public:
+ using Exception::Exception;
+};
+
MATERIALX_NAMESPACE_END
#endif
diff --git a/source/MaterialXCore/Value.cpp b/source/MaterialXCore/Value.cpp
index 68da4b5b9d..bb70aa04ae 100644
--- a/source/MaterialXCore/Value.cpp
+++ b/source/MaterialXCore/Value.cpp
@@ -3,6 +3,8 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include
+#include
#include
#include
@@ -267,12 +269,18 @@ template ValuePtr TypedValue::createFromString(const string& value)
// Value methods
//
-ValuePtr Value::createValueFromStrings(const string& value, const string& type)
+ValuePtr Value::createValueFromStrings(const string& value, const string& type, ConstTypeDefPtr typeDef)
{
CreatorMap::iterator it = _creatorMap.find(type);
if (it != _creatorMap.end())
return it->second(value);
+ if (typeDef && !typeDef->getMembers().empty())
+ {
+ // If we're given a TypeDef pointer that has child members, then we can create a new AggregateValue.
+ return AggregateValue::createAggregateValueFromString(value, type, typeDef);
+ }
+
return TypedValue::createFromString(value);
}
@@ -291,6 +299,69 @@ template const T& Value::asA() const
return typedVal->getData();
}
+template <>
+MX_CORE_API bool Value::isA() const
+{
+ return dynamic_cast(this) != nullptr;
+}
+
+template <>
+MX_CORE_API const AggregateValue& Value::asA() const
+{
+ const AggregateValue* typedVal = dynamic_cast(this);
+ if (!typedVal)
+ {
+ throw ExceptionTypeError("Incorrect type specified for value");
+ }
+ return *typedVal;
+}
+
+string AggregateValue::getValueString() const
+{
+ if (_data.empty())
+ return EMPTY_STRING;
+
+ std::string result = "{";
+ std::string separator = "";
+ for (const auto& val : _data)
+ {
+ result += separator + val->getValueString();
+ separator = ";";
+ }
+ result += "}";
+
+ return result;
+}
+
+AggregateValuePtr AggregateValue::createAggregateValueFromString(const string& value, const string& type, ConstTypeDefPtr typeDef)
+{
+ StringVec subValues = parseStructValueString(value);
+
+ AggregateValuePtr result = AggregateValue::createAggregateValue(type);
+ const auto& members = typeDef->getMembers();
+
+ if (subValues.size() != members.size())
+ {
+ std::stringstream ss;
+ ss << "Wrong number of initializers - expect " << members.size();
+ throw Exception(ss.str());
+ }
+
+ auto doc = typeDef->getDocument();
+ for (size_t i = 0; i < members.size(); ++i)
+ {
+ const auto& member = members[i];
+
+ // This will return nullptr if the type is not a listed typedef.
+ ConstTypeDefPtr subTypeDef = doc->getTypeDef(members[i]->getType());
+
+ // Calling Value::createValueFromStrings() here allows support for recursively nested structs.
+ result->appendValue(Value::createValueFromStrings(subValues[i], member->getType(), subTypeDef));
+ }
+
+ return result;
+}
+
ScopedFloatFormatting::ScopedFloatFormatting(Value::FloatFormat format, int precision) :
_format(Value::getFloatFormat()),
_precision(Value::getFloatPrecision())
diff --git a/source/MaterialXCore/Value.h b/source/MaterialXCore/Value.h
index 764a0ccc01..4dae4ab135 100644
--- a/source/MaterialXCore/Value.h
+++ b/source/MaterialXCore/Value.h
@@ -24,21 +24,22 @@ using BoolVec = vector;
using FloatVec = vector;
class Value;
+class AggregateValue;
/// A shared pointer to a Value
using ValuePtr = shared_ptr;
/// A shared pointer to a const Value
using ConstValuePtr = shared_ptr;
-template class TypedValue;
+/// A shared pointer to an Aggregate Value
+using AggregateValuePtr = shared_ptr;
+/// A shared pointer to a const Aggregate Value
+using ConstAggregateValuePtr = shared_ptr;
-/// @class ExceptionTypeError
-/// An exception that is thrown when a type mismatch is encountered.
-class MX_CORE_API ExceptionTypeError : public Exception
-{
- public:
- using Exception::Exception;
-};
+class TypeDef;
+using ConstTypeDefPtr = shared_ptr;
+
+template class TypedValue;
/// A generic, discriminated value, whose type may be queried dynamically.
class MX_CORE_API Value
@@ -73,7 +74,7 @@ class MX_CORE_API Value
/// Create a new value instance from value and type strings.
/// @return A shared pointer to a typed value, or an empty shared pointer
/// if the conversion to the given data type cannot be performed.
- static ValuePtr createValueFromStrings(const string& value, const string& type);
+ static ValuePtr createValueFromStrings(const string& value, const string& type, ConstTypeDefPtr typeDef = nullptr);
/// Create a deep copy of the value.
virtual ValuePtr copy() const = 0;
@@ -193,6 +194,68 @@ template class MX_CORE_API TypedValue : public Value
T _data;
};
+/// A subclass for aggregate values with multiple members
+class MX_CORE_API AggregateValue : public Value
+{
+ public:
+ AggregateValue(const string& typeName) :
+ _typeName(typeName)
+ {
+ }
+ virtual ~AggregateValue() { }
+
+ /// Create a deep copy of the value.
+ ValuePtr copy() const override
+ {
+ auto result = createAggregateValue(_typeName);
+ for (const auto& val : _data)
+ {
+ result->appendValue(val->copy());
+ }
+ return result;
+ }
+
+ /// Append a member value to the aggregate.
+ void appendValue(ConstValuePtr valuePtr)
+ {
+ _data.emplace_back(valuePtr);
+ }
+
+ const vector& getMembers() const
+ {
+ return _data;
+ }
+
+ /// Query an indexed member value from the aggregate.
+ ConstValuePtr getMemberValue(size_t index) const
+ {
+ return _data[index];
+ }
+
+ /// Return type string.
+ const string& getTypeString() const override { return _typeName; }
+
+ /// Return value string.
+ string getValueString() const override;
+
+ //
+ // Static helper methods
+ //
+
+ /// Create a new value from an object of any valid MaterialX type.
+ static AggregateValuePtr createAggregateValue(const string& typeName)
+ {
+ return std::make_shared(typeName);
+ }
+
+ static AggregateValuePtr createAggregateValueFromString(const string& value, const string& type, ConstTypeDefPtr typeDefPtr);
+
+ private:
+ const string _typeName;
+
+ vector _data;
+};
+
/// @class ScopedFloatFormatting
/// An RAII class for controlling the float formatting of values.
class MX_CORE_API ScopedFloatFormatting
diff --git a/source/MaterialXGenGlsl/GlslSyntax.cpp b/source/MaterialXGenGlsl/GlslSyntax.cpp
index f91305f1a6..651a4ab5ff 100644
--- a/source/MaterialXGenGlsl/GlslSyntax.cpp
+++ b/source/MaterialXGenGlsl/GlslSyntax.cpp
@@ -375,4 +375,41 @@ bool GlslSyntax::remapEnumeration(const string& value, TypeDesc type, const stri
return true;
}
+StructTypeSyntaxPtr GlslSyntax::createStructSyntax(const string& structTypeName, const string& defaultValue,
+ const string& uniformDefaultValue, const string& typeAlias,
+ const string& typeDefinition) const
+{
+ return std::make_shared(
+ this,
+ structTypeName,
+ defaultValue,
+ uniformDefaultValue,
+ typeAlias,
+ typeDefinition);
+}
+
+string GlslStructTypeSyntax::getValue(const Value& value, bool /* uniform */) const
+{
+ const AggregateValue& aggValue = static_cast(value);
+
+ string result = aggValue.getTypeString() + "(";
+
+ string separator = "";
+ for (const auto& memberValue : aggValue.getMembers())
+ {
+ result += separator;
+ separator = ",";
+
+ auto memberTypeName = memberValue->getTypeString();
+ auto memberTypeDesc = TypeDesc::get(memberTypeName);
+
+ // Recursively use the syntax to generate the output, so we can supported nested structs.
+ result += _parentSyntax->getValue(memberTypeDesc, *memberValue, true);
+ }
+
+ result += ")";
+
+ return result;
+}
+
MATERIALX_NAMESPACE_END
diff --git a/source/MaterialXGenGlsl/GlslSyntax.h b/source/MaterialXGenGlsl/GlslSyntax.h
index 8408534e7e..1e82e354bd 100644
--- a/source/MaterialXGenGlsl/GlslSyntax.h
+++ b/source/MaterialXGenGlsl/GlslSyntax.h
@@ -45,6 +45,20 @@ class MX_GENGLSL_API GlslSyntax : public Syntax
static const StringVec VEC2_MEMBERS;
static const StringVec VEC3_MEMBERS;
static const StringVec VEC4_MEMBERS;
+
+ protected:
+ StructTypeSyntaxPtr createStructSyntax(const string& structTypeName, const string& defaultValue,
+ const string& uniformDefaultValue, const string& typeAlias,
+ const string& typeDefinition) const override;
+};
+
+/// Specialization of TypeSyntax for aggregate types.
+class MX_GENGLSL_API GlslStructTypeSyntax : public StructTypeSyntax
+{
+ public:
+ using StructTypeSyntax::StructTypeSyntax;
+
+ string getValue(const Value& value, bool uniform) const override;
};
MATERIALX_NAMESPACE_END
diff --git a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl
index bef1e430d4..bb6eaf157a 100644
--- a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl
+++ b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl
@@ -441,3 +441,23 @@ export float3 mx_viewdirection_vector3(
::state::coordinate_object,
internal_space_direction));
}
+
+
+export float3 mx_extractGroup(
+ uniform texcoordGroup_struct in = {{0.1,0.1},{0.2,0.2},{0.3,0.3}},
+ uniform int index = 0
+)
+ [[
+ anno::description("Node Group: experimental")
+ ]]
+{
+ result = in.st_0.ss;
+
+ if (index == 1)
+ result = in.st_1.ss;
+ else if (index == 2)
+ result = in.st_2.ss;
+
+ return result;
+}
+
diff --git a/source/MaterialXGenOsl/OslShaderGenerator.cpp b/source/MaterialXGenOsl/OslShaderGenerator.cpp
index f29719a39b..d0d9d96cba 100644
--- a/source/MaterialXGenOsl/OslShaderGenerator.cpp
+++ b/source/MaterialXGenOsl/OslShaderGenerator.cpp
@@ -8,6 +8,7 @@
#include
#include
+#include
#include
#include
#include
@@ -510,10 +511,10 @@ void OslShaderGenerator::emitMetadata(const ShaderPort* port, ShaderStage& stage
{
static const std::unordered_map UI_WIDGET_METADATA =
{
- { Type::FLOAT, ShaderMetadata("widget", Type::STRING, Value::createValueFromStrings("number", Type::STRING.getName())) },
- { Type::INTEGER, ShaderMetadata("widget", Type::STRING, Value::createValueFromStrings("number", Type::STRING.getName())) },
- { Type::FILENAME, ShaderMetadata("widget", Type::STRING, Value::createValueFromStrings("filename", Type::STRING.getName())) },
- { Type::BOOLEAN, ShaderMetadata("widget", Type::STRING, Value::createValueFromStrings("checkBox", Type::STRING.getName())) }
+ { Type::FLOAT, ShaderMetadata("widget", Type::STRING, Type::STRING.createValueFromStrings("number")) },
+ { Type::INTEGER, ShaderMetadata("widget", Type::STRING, Type::STRING.createValueFromStrings("number")) },
+ { Type::FILENAME, ShaderMetadata("widget", Type::STRING, Type::STRING.createValueFromStrings("filename")) },
+ { Type::BOOLEAN, ShaderMetadata("widget", Type::STRING, Type::STRING.createValueFromStrings("checkBox")) }
};
static const std::set METADATA_TYPE_BLACKLIST =
diff --git a/source/MaterialXGenShader/ShaderGenerator.cpp b/source/MaterialXGenShader/ShaderGenerator.cpp
index 6c23382f81..398232bf39 100644
--- a/source/MaterialXGenShader/ShaderGenerator.cpp
+++ b/source/MaterialXGenShader/ShaderGenerator.cpp
@@ -344,6 +344,47 @@ ShaderNodeImplPtr ShaderGenerator::getImplementation(const NodeDef& nodedef, Gen
return impl;
}
+/// Load any struct type definitions from the document in to the type cache.
+void ShaderGenerator::loadStructTypeDefs(const DocumentPtr& doc)
+{
+ for (const auto& mxTypeDef : doc->getTypeDefs())
+ {
+ const auto& typeDefName = mxTypeDef->getName();
+ const auto& members = mxTypeDef->getMembers();
+
+ // If we don't have any member children then we're not going to consider ourselves a struct.
+ if (members.empty())
+ continue;
+
+ StructTypeDesc newStructTypeDesc;
+ for (const auto& member : members)
+ {
+ auto memberName = member->getName();
+ auto memberTypeName = member->getType();
+ auto memberType = TypeDesc::get(memberTypeName);
+ auto memberDefaultValue = member->getValueString();
+
+ newStructTypeDesc.addMember(memberName, memberType, memberDefaultValue);
+ }
+
+ auto structIndex = StructTypeDesc::emplace_back(newStructTypeDesc);
+
+ TypeDesc structTypeDesc(typeDefName, TypeDesc::BASETYPE_STRUCT, TypeDesc::SEMANTIC_NONE, 1, structIndex);
+
+ TypeDescRegistry(structTypeDesc, typeDefName);
+
+ StructTypeDesc::get(structIndex).setTypeDesc(TypeDesc::get(typeDefName));
+ }
+
+ _syntax->registerStructTypeDescSyntax();
+}
+
+/// Clear any struct type definitions loaded
+void ShaderGenerator::clearStructTypeDefs()
+{
+ StructTypeDesc::clear();
+}
+
namespace
{
diff --git a/source/MaterialXGenShader/ShaderGenerator.h b/source/MaterialXGenShader/ShaderGenerator.h
index fa60a4d63e..a2f54fec2e 100644
--- a/source/MaterialXGenShader/ShaderGenerator.h
+++ b/source/MaterialXGenShader/ShaderGenerator.h
@@ -191,6 +191,12 @@ class MX_GENSHADER_API ShaderGenerator
return _tokenSubstitutions;
}
+ /// Load any struct type definitions from the document in to the type cache.
+ void loadStructTypeDefs(const DocumentPtr& doc);
+
+ /// Clear any struct type definitions loaded
+ void clearStructTypeDefs();
+
/// Register metadata that should be exported to the generated shaders.
/// Supported metadata includes standard UI attributes like "uiname", "uifolder",
/// "uimin", "uimax", etc.
diff --git a/source/MaterialXGenShader/ShaderNode.cpp b/source/MaterialXGenShader/ShaderNode.cpp
index 4e90fcbb2d..d52810ffc4 100644
--- a/source/MaterialXGenShader/ShaderNode.cpp
+++ b/source/MaterialXGenShader/ShaderNode.cpp
@@ -437,7 +437,7 @@ void ShaderNode::createMetadata(const NodeDef& nodeDef, GenContext& context)
const string& attrValue = nodeDef.getAttribute(nodedefAttr);
if (!attrValue.empty())
{
- ValuePtr value = Value::createValueFromStrings(attrValue, metadataEntry->type.getName());
+ ValuePtr value = metadataEntry->type.createValueFromStrings(attrValue);
if (!value)
{
value = metadataEntry->value;
@@ -472,7 +472,7 @@ void ShaderNode::createMetadata(const NodeDef& nodeDef, GenContext& context)
if (!attrValue.empty())
{
const TypeDesc type = metadataEntry->type != Type::NONE ? metadataEntry->type : input->getType();
- ValuePtr value = Value::createValueFromStrings(attrValue, type.getName());
+ ValuePtr value = type.createValueFromStrings(attrValue);
if (!value)
{
value = metadataEntry->value;
diff --git a/source/MaterialXGenShader/Syntax.cpp b/source/MaterialXGenShader/Syntax.cpp
index 661aa41660..b8eed3e9b8 100644
--- a/source/MaterialXGenShader/Syntax.cpp
+++ b/source/MaterialXGenShader/Syntax.cpp
@@ -190,6 +190,36 @@ bool Syntax::remapEnumeration(const string&, TypeDesc, const string&, std::pair<
return false;
}
+void Syntax::registerStructTypeDescSyntax()
+{
+ for (const auto& typeName : StructTypeDesc::getStructTypeNames())
+ {
+ const auto& typeDesc = TypeDesc::get(typeName);
+ const auto& structTypeDesc = StructTypeDesc::get(typeDesc.getStructIndex());
+
+ string structTypeName = typeName;
+ string defaultValue = typeName + "( ";
+ string uniformDefaultValue = EMPTY_STRING;
+ string typeAlias = EMPTY_STRING;
+ string typeDefinition = "struct " + structTypeName + " { ";
+
+ for (const auto& x : structTypeDesc.getMembers())
+ {
+ string memberName = x._name;
+ string memberType = x._typeDesc.getName();
+ string memberDefaultValue = x._defaultValueStr;
+
+ defaultValue += memberDefaultValue + ", ";
+ typeDefinition += memberType + " " + memberName + "; ";
+ }
+
+ typeDefinition += " };";
+ defaultValue += " )";
+
+ registerTypeSyntax(typeDesc, createStructSyntax(structTypeName, defaultValue, uniformDefaultValue, typeAlias, typeDefinition));
+ }
+}
+
const StringVec TypeSyntax::EMPTY_MEMBERS;
TypeSyntax::TypeSyntax(const string& name, const string& defaultValue, const string& uniformDefaultValue,
@@ -246,4 +276,39 @@ string AggregateTypeSyntax::getValue(const Value& value, bool /*uniform*/) const
return valueString.empty() ? valueString : getName() + "(" + valueString + ")";
}
+StructTypeSyntax::StructTypeSyntax(const Syntax* parentSyntax, const string& name, const string& defaultValue, const string& uniformDefaultValue,
+ const string& typeAlias, const string& typeDefinition, const StringVec& members) :
+ TypeSyntax(name, defaultValue, uniformDefaultValue, typeAlias, typeDefinition, members), _parentSyntax(parentSyntax)
+{
+}
+
+string StructTypeSyntax::getValue(const Value& value, bool /*uniform*/) const
+{
+ const AggregateValue& aggValue = static_cast(value);
+
+ auto typeDesc = TypeDesc::get(aggValue.getTypeString());
+ auto structTypeDesc = StructTypeDesc::get(typeDesc.getStructIndex());
+
+ string result = "{";
+
+ string separator = "";
+ for (const auto& memberValue : aggValue.getMembers())
+ {
+ result += separator;
+ separator = ";";
+
+ auto memberTypeName = memberValue->getTypeString();
+ auto memberTypeDesc = TypeDesc::get(memberTypeName);
+
+ // Recursively use the syntax to generate the output, so we can support nested structs.
+ const string valueStr = _parentSyntax->getValue(memberTypeDesc, *memberValue, true);
+
+ result += valueStr;
+ }
+
+ result += "}";
+
+ return result;
+}
+
MATERIALX_NAMESPACE_END
diff --git a/source/MaterialXGenShader/Syntax.h b/source/MaterialXGenShader/Syntax.h
index a4bb7e49b5..6f16633b59 100644
--- a/source/MaterialXGenShader/Syntax.h
+++ b/source/MaterialXGenShader/Syntax.h
@@ -20,6 +20,7 @@ MATERIALX_NAMESPACE_BEGIN
class Syntax;
class TypeSyntax;
+class StructTypeSyntax;
class TypeDesc;
class ShaderPort;
@@ -29,6 +30,8 @@ using SyntaxPtr = shared_ptr;
using ConstSyntaxPtr = shared_ptr;
/// Shared pointer to a TypeSyntax
using TypeSyntaxPtr = shared_ptr;
+/// Shared pointer to a StructTypeSyntax
+using StructTypeSyntaxPtr = shared_ptr;
/// Map holding identifier names and a counter for
/// creating unique names from them.
@@ -67,6 +70,8 @@ class MX_GENSHADER_API Syntax
/// Multiple calls will add to the internal set of tokens.
void registerInvalidTokens(const StringMap& tokens);
+ virtual void registerStructTypeDescSyntax();
+
/// Returns a set of names that are reserved words for this language syntax.
const StringSet& getReservedWords() const { return _reservedWords; }
@@ -199,6 +204,19 @@ class MX_GENSHADER_API Syntax
/// Protected constructor
Syntax();
+ virtual StructTypeSyntaxPtr createStructSyntax(const string& structTypeName, const string& defaultValue,
+ const string& uniformDefaultValue, const string& typeAlias,
+ const string& typeDefinition) const
+ {
+ return std::make_shared(
+ this,
+ structTypeName,
+ defaultValue,
+ uniformDefaultValue,
+ typeAlias,
+ typeDefinition);
+ }
+
vector _typeSyntaxes;
std::unordered_map _typeSyntaxIndexByType;
@@ -292,6 +310,20 @@ class MX_GENSHADER_API AggregateTypeSyntax : public TypeSyntax
string getValue(const Value& value, bool uniform) const override;
};
+/// Specialization of TypeSyntax for aggregate types.
+class MX_GENSHADER_API StructTypeSyntax : public TypeSyntax
+{
+ public:
+ StructTypeSyntax(const Syntax* parentSyntax, const string& name, const string& defaultValue, const string& uniformDefaultValue,
+ const string& typeAlias = EMPTY_STRING, const string& typeDefinition = EMPTY_STRING,
+ const StringVec& members = EMPTY_MEMBERS);
+
+ string getValue(const Value& value, bool uniform) const override;
+
+ protected:
+ const Syntax* _parentSyntax;
+};
+
MATERIALX_NAMESPACE_END
#endif
diff --git a/source/MaterialXGenShader/TypeDesc.cpp b/source/MaterialXGenShader/TypeDesc.cpp
index 1267caf14d..5d51680211 100644
--- a/source/MaterialXGenShader/TypeDesc.cpp
+++ b/source/MaterialXGenShader/TypeDesc.cpp
@@ -5,7 +5,7 @@
#include
-#include
+#include
MATERIALX_NAMESPACE_BEGIN
@@ -28,6 +28,16 @@ TypeDescNameMap& typeNameMap()
return map;
}
+using StructTypeDescStorage = vector;
+StructTypeDescStorage& structTypeStorage()
+{
+ // TODO: Our use of the singleton pattern for TypeDescMap and StructTypeDestStorage
+ // is not thread-safe, and we should consider replacing this with thread-local
+ // data in the GenContext object.
+ static StructTypeDescStorage storage;
+ return storage;
+}
+
} // anonymous namespace
const string TypeDesc::NONE_TYPE_NAME = "none";
@@ -46,7 +56,52 @@ TypeDesc TypeDesc::get(const string& name)
return it != types.end() ? it->second : Type::NONE;
}
-TypeDescRegistry::TypeDescRegistry(TypeDesc type, const std::string& name)
+void TypeDesc::remove(const string& name)
+{
+ TypeDescNameMap& typenames = typeNameMap();
+
+ TypeDescMap& types = typeMap();
+
+ auto it = types.find(name);
+ if (it == types.end())
+ return;
+
+ typenames.erase(it->second.typeId());
+ types.erase(it);
+}
+
+ValuePtr TypeDesc::createValueFromStrings(const string& value) const
+{
+ ValuePtr newValue = Value::createValueFromStrings(value, getName());
+ if (!isStruct())
+ return newValue;
+
+ // Value::createValueFromStrings() can only create a valid Value for a struct if it is passed
+ // the optional TypeDef argument, otherwise it just returns a "string" typed Value.
+ // So if this is a struct type we need to create a new AggregateValue.
+
+ StringVec subValues = parseStructValueString(value);
+
+ AggregateValuePtr result = AggregateValue::createAggregateValue(getName());
+ auto structTypeDesc = StructTypeDesc::get(getStructIndex());
+ const auto& members = structTypeDesc.getMembers();
+
+ if (subValues.size() != members.size())
+ {
+ std::stringstream ss;
+ ss << "Wrong number of initializers - expect " << members.size();
+ throw ExceptionShaderGenError(ss.str());
+ }
+
+ for (size_t i = 0; i < members.size(); ++i)
+ {
+ result->appendValue( members[i]._typeDesc.createValueFromStrings(subValues[i]));
+ }
+
+ return result;
+}
+
+TypeDescRegistry::TypeDescRegistry(TypeDesc type, const string& name)
{
TypeDescMap& types = typeMap();
TypeDescNameMap& typenames = typeNameMap();
@@ -86,4 +141,74 @@ TYPEDESC_REGISTER_TYPE(MATERIAL, "material")
} // namespace Type
+//
+// StructTypeDesc methods
+//
+
+void StructTypeDesc::addMember(const string& name, TypeDesc type, string defaultValueStr)
+{
+ _members.emplace_back(StructTypeDesc::StructMemberTypeDesc(name, type, defaultValueStr));
+}
+
+vector StructTypeDesc::getStructTypeNames()
+{
+ StructTypeDescStorage& structs = structTypeStorage();
+ vector structNames;
+ for (const auto& x : structs)
+ {
+ structNames.emplace_back(x.typeDesc().getName());
+ }
+ return structNames;
+}
+
+StructTypeDesc& StructTypeDesc::get(unsigned int index)
+{
+ StructTypeDescStorage& structs = structTypeStorage();
+ return structs[index];
+}
+
+uint16_t StructTypeDesc::emplace_back(StructTypeDesc structTypeDesc)
+{
+ StructTypeDescStorage& structs = structTypeStorage();
+ if (structs.size() >= std::numeric_limits::max())
+ {
+ throw ExceptionShaderGenError("Maximum number of custom struct types has been exceeded.");
+ }
+ uint16_t index = static_cast(structs.size());
+ structs.emplace_back(structTypeDesc);
+ return index;
+}
+
+void StructTypeDesc::clear()
+{
+ StructTypeDescStorage& structs = structTypeStorage();
+ for (const auto& structType: structs)
+ {
+ // Need to add typeID to structTypeDesc - and use it here to reference back to typeDesc obj and remove it.
+ TypeDesc::remove(structType.typeDesc().getName());
+ }
+ structs.clear();
+}
+
+const string& StructTypeDesc::getName() const
+{
+ return _typedesc.getName();
+}
+
+const vector& StructTypeDesc::getMembers() const
+{
+ return _members;
+}
+
+TypeDesc createStructTypeDesc(std::string_view name)
+{
+ return {name, TypeDesc::BASETYPE_STRUCT};
+}
+
+void registerStructTypeDesc(std::string_view name)
+{
+ auto structTypeDesc = createStructTypeDesc(name);
+ TypeDescRegistry register_struct(structTypeDesc, string(name));
+}
+
MATERIALX_NAMESPACE_END
diff --git a/source/MaterialXGenShader/TypeDesc.h b/source/MaterialXGenShader/TypeDesc.h
index 1a537b7e58..95d2851915 100644
--- a/source/MaterialXGenShader/TypeDesc.h
+++ b/source/MaterialXGenShader/TypeDesc.h
@@ -10,6 +10,7 @@
/// Type descriptor for a MaterialX data type.
#include
+#include
#include
@@ -61,14 +62,21 @@ class MX_GENSHADER_API TypeDesc
/// Empty constructor.
constexpr TypeDesc() noexcept :
- _id(0), _basetype(BASETYPE_NONE), _semantic(SEMANTIC_NONE), _size(0) { }
+ _id(0),
+ _basetype(BASETYPE_NONE),
+ _semantic(SEMANTIC_NONE),
+ _size(0),
+ _structIndex(0)
+ {
+ }
/// Constructor.
- constexpr TypeDesc(std::string_view name, uint8_t basetype, uint8_t semantic = SEMANTIC_NONE, uint16_t size = 1) noexcept :
+ constexpr TypeDesc(std::string_view name, uint8_t basetype, uint8_t semantic = SEMANTIC_NONE, uint16_t size = 1, uint16_t structIndex = 0) noexcept :
_id(constexpr_hash(name)), // Note: We only store the hash to keep the class size minimal.
_basetype(basetype),
_semantic(semantic),
- _size(size)
+ _size(size),
+ _structIndex(structIndex)
{
}
@@ -112,6 +120,12 @@ class MX_GENSHADER_API TypeDesc
/// Return true if the type represents a closure.
bool isClosure() const { return (_semantic == SEMANTIC_CLOSURE || _semantic == SEMANTIC_SHADER || _semantic == SEMANTIC_MATERIAL); }
+ /// Return true if the type represents a struct.
+ bool isStruct() const { return _basetype == BASETYPE_STRUCT; }
+
+ /// Return the index for the struct member information in StructTypeDesc, the result is invalid if `isStruct()` returns false.
+ uint16_t getStructIndex() const { return _structIndex; }
+
/// Equality operator
bool operator==(TypeDesc rhs) const
{
@@ -143,8 +157,14 @@ class MX_GENSHADER_API TypeDesc
/// If no type is found Type::NONE is returned.
static TypeDesc get(const string& name);
+ /// Remove a type description by name, if it exists.
+ static void remove(const string& name);
+
static const string NONE_TYPE_NAME;
+ /// Create a Value from a string for a given typeDesc
+ ValuePtr createValueFromStrings(const string& value) const;
+
private:
/// Simple constexpr hash function, good enough for the small set of short strings that
/// are used for our data type names.
@@ -157,6 +177,7 @@ class MX_GENSHADER_API TypeDesc
uint8_t _basetype;
uint8_t _semantic;
uint16_t _size;
+ uint16_t _structIndex;
};
/// @class TypeDescRegistry
@@ -208,6 +229,58 @@ TYPEDESC_DEFINE_TYPE(MATERIAL, "material", TypeDesc::BASETYPE_NONE, TypeDesc::SE
} // namespace Type
+
+/// @class StructTypeDesc
+/// A type descriptor for MaterialX struct types.
+///
+/// All types need to have a type descriptor registered in order for shader generators
+/// to know about the type. If the type represented is of basetype=BASETYPE_STRUCT then
+/// the type also needs to have an associated StructTypeDesc that describes the members
+/// of the struct.
+///
+class MX_GENSHADER_API StructTypeDesc
+{
+ public:
+ struct StructMemberTypeDesc
+ {
+ StructMemberTypeDesc(string name, TypeDesc typeDesc, string defaultValueStr) :
+ _name(name), _typeDesc(typeDesc), _defaultValueStr(defaultValueStr)
+ {
+ }
+ string _name;
+ TypeDesc _typeDesc;
+ string _defaultValueStr;
+ };
+
+ /// Empty constructor.
+ StructTypeDesc() noexcept{}
+
+ void addMember(const string& name, TypeDesc type, string defaultValueStr);
+ void setTypeDesc(TypeDesc typedesc) { _typedesc = typedesc; }
+
+ /// Return a type description by index.
+ static StructTypeDesc& get(unsigned int index);
+ static vector getStructTypeNames();
+ static uint16_t emplace_back(StructTypeDesc structTypeDesc);
+ static void clear();
+
+ TypeDesc typeDesc() const { return _typedesc; }
+
+ const string& getName() const;
+
+ const vector& getMembers() const;
+
+ private:
+ TypeDesc _typedesc;
+ vector _members;
+};
+
+class MX_GENSHADER_API StructTypeDescRegistry
+{
+ public:
+ StructTypeDescRegistry();
+};
+
MATERIALX_NAMESPACE_END
#endif
diff --git a/source/MaterialXGraphEditor/RenderView.cpp b/source/MaterialXGraphEditor/RenderView.cpp
index dbc9b4f980..92cd8f07c7 100644
--- a/source/MaterialXGraphEditor/RenderView.cpp
+++ b/source/MaterialXGraphEditor/RenderView.cpp
@@ -630,6 +630,9 @@ void RenderView::initContext(mx::GenContext& context)
unitSystem->setUnitConverterRegistry(_unitRegistry);
context.getShaderGenerator().setUnitSystem(unitSystem);
context.getOptions().targetDistanceUnit = "meter";
+
+ // Register struct type definitions
+ context.getShaderGenerator().loadStructTypeDefs(_document);
}
void RenderView::drawContents()
diff --git a/source/MaterialXRender/Util.cpp b/source/MaterialXRender/Util.cpp
index 881f1b7eea..00fdc65381 100644
--- a/source/MaterialXRender/Util.cpp
+++ b/source/MaterialXRender/Util.cpp
@@ -170,7 +170,7 @@ unsigned int getUIProperties(InputPtr input, const string& target, UIProperties&
else
{
valueString += val;
- uiProperties.enumerationValues.push_back(Value::createValueFromStrings(valueString, input->getType()));
+ uiProperties.enumerationValues.push_back(typeDesc.createValueFromStrings(valueString));
valueString.clear();
index = 0;
}
diff --git a/source/MaterialXRenderGlsl/GlslMaterial.cpp b/source/MaterialXRenderGlsl/GlslMaterial.cpp
index 788af713b2..064ab898ff 100644
--- a/source/MaterialXRenderGlsl/GlslMaterial.cpp
+++ b/source/MaterialXRenderGlsl/GlslMaterial.cpp
@@ -360,7 +360,7 @@ void GlslMaterial::modifyUniform(const std::string& path, ConstValuePtr value, s
{
valueString = value->getValueString();
}
- uniform->setValue(Value::createValueFromStrings(valueString, uniform->getType().getName()));
+ uniform->setValue(uniform->getType().createValueFromStrings(valueString));
if (_doc)
{
ElementPtr element = _doc->getDescendant(uniform->getPath());
diff --git a/source/MaterialXRenderGlsl/GlslProgram.cpp b/source/MaterialXRenderGlsl/GlslProgram.cpp
index b2ca0aa66e..b63e1faecc 100644
--- a/source/MaterialXRenderGlsl/GlslProgram.cpp
+++ b/source/MaterialXRenderGlsl/GlslProgram.cpp
@@ -508,7 +508,7 @@ ImagePtr GlslProgram::bindTexture(unsigned int uniformType, int uniformLocation,
return nullptr;
}
-MaterialX::ValuePtr GlslProgram::findUniformValue(const string& uniformName, const GlslProgram::InputMap& uniformList)
+MaterialX::ConstValuePtr GlslProgram::findUniformValue(const string& uniformName, const GlslProgram::InputMap& uniformList)
{
auto uniform = uniformList.find(uniformName);
if (uniform != uniformList.end())
@@ -946,47 +946,87 @@ const GlslProgram::InputMap& GlslProgram::updateUniformsList()
for (size_t i = 0; i < uniforms.size(); ++i)
{
const ShaderPort* v = uniforms[i];
- int glType = mapTypeToOpenGLType(v->getType());
- // There is no way to match with an unnamed variable
- if (v->getVariable().empty())
- {
- continue;
- }
-
- // Ignore types which are unsupported in GLSL.
- if (glType == Input::INVALID_OPENGL_TYPE)
- {
- continue;
- }
+ const auto& variablePath = v->getPath();
+ const auto& variableUnit = v->getUnit();
+ const auto& variableColorspace = v->getColorSpace();
+ const auto& variableSemantic = v->getSemantic();
- auto inputIt = _uniformList.find(v->getVariable());
- if (inputIt != _uniformList.end())
+ const auto populateUniformInput =
+ [this, variablePath, variableUnit, variableColorspace, variableSemantic, &errors, uniforms, &uniformTypeMismatchFound]
+ (TypeDesc typedesc, const string& variableName, ConstValuePtr variableValue) -> void
{
- Input* input = inputIt->second.get();
- input->path = v->getPath();
- input->unit = v->getUnit();
- input->colorspace = v->getColorSpace();
- input->value = v->getValue();
- if (input->gltype == glType)
- {
- input->typeString = v->getType().getName();
- }
- else
+ auto populateUniformInput_impl =
+ [this, variablePath, variableUnit, variableColorspace, variableSemantic, &errors, uniforms, &uniformTypeMismatchFound]
+ (TypeDesc typedesc, const string& variableName, ConstValuePtr variableValue, auto& populateUniformInput_ref) -> void
{
- errors.push_back(
- "Pixel shader uniform block type mismatch [" + uniforms.getName() + "]. "
- + "Name: \"" + v->getVariable()
- + "\". Type: \"" + v->getType().getName()
- + "\". Semantic: \"" + v->getSemantic()
- + "\". Value: \"" + (v->getValue() ? v->getValue()->getValueString() : "")
- + "\". Unit: \"" + (!v->getUnit().empty() ? v->getUnit() : "")
- + "\". Colorspace: \"" + (!v->getColorSpace().empty() ? v->getColorSpace() : "")
- + "\". GLType: " + std::to_string(mapTypeToOpenGLType(v->getType()))
- );
- uniformTypeMismatchFound = true;
- }
- }
+ if (!typedesc.isStruct())
+ {
+ // Handle non-struct types
+ int glType = mapTypeToOpenGLType(typedesc);
+
+ // There is no way to match with an unnamed variable
+ if (variableName.empty())
+ {
+ return;
+ }
+
+ // Ignore types which are unsupported in GLSL.
+ if (glType == Input::INVALID_OPENGL_TYPE)
+ {
+ return;
+ }
+
+ auto inputIt = _uniformList.find(variableName);
+ if (inputIt != _uniformList.end())
+ {
+ Input* input = inputIt->second.get();
+ input->path = variablePath;
+ input->unit = variableUnit;
+ input->colorspace = variableColorspace;
+ input->value = variableValue;
+ if (input->gltype == glType)
+ {
+ input->typeString = typedesc.getName();
+ }
+ else
+ {
+ errors.push_back(
+ "Pixel shader uniform block type mismatch [" + uniforms.getName() + "]. "
+ + "Name: \"" + variableName
+ + "\". Type: \"" + typedesc.getName()
+ + "\". Semantic: \"" + variableSemantic
+ + "\". Value: \"" + (variableValue ? variableValue->getValueString() : "")
+ + "\". Unit: \"" + (!variableUnit.empty() ? variableUnit : "")
+ + "\". Colorspace: \"" + (!variableColorspace.empty() ? variableColorspace : "")
+ + "\". GLType: " + std::to_string(glType));
+ uniformTypeMismatchFound = true;
+ }
+ }
+ }
+ else
+ {
+ // If we're a struct - we need to loop over each member
+ auto structTypeDesc = StructTypeDesc::get(typedesc.getStructIndex());
+ auto aggregateValue = std::static_pointer_cast(variableValue);
+
+ const auto& members = structTypeDesc.getMembers();
+ for (size_t i = 0, n = members.size(); i < n; ++i)
+ {
+ const auto& member = members[i];
+ auto memberTypeDesc = member._typeDesc;
+ auto memberVariableName = variableName + "." + member._name;
+ auto memberVariableValue = aggregateValue->getMemberValue(i);
+
+ populateUniformInput_ref(memberTypeDesc, memberVariableName, memberVariableValue, populateUniformInput_ref);
+ }
+ }
+ };
+
+ return populateUniformInput_impl(typedesc, variableName, variableValue, populateUniformInput_impl);
+ };
+
+ populateUniformInput(v->getType(), v->getVariable(), v->getValue());
}
}
@@ -1100,12 +1140,12 @@ const GlslProgram::InputMap& GlslProgram::updateAttributesList()
if (string::npos != sattributeName.find(colorSet))
{
string setNumber = sattributeName.substr(colorSet.size(), sattributeName.size());
- inputPtr->value = Value::createValueFromStrings(setNumber, getTypeString());
+ inputPtr->value = Type::INTEGER.createValueFromStrings(setNumber);
}
else if (string::npos != sattributeName.find(uvSet))
{
string setNumber = sattributeName.substr(uvSet.size(), sattributeName.size());
- inputPtr->value = Value::createValueFromStrings(setNumber, getTypeString());
+ inputPtr->value = Type::INTEGER.createValueFromStrings(setNumber);
}
_attributeList[sattributeName] = inputPtr;
diff --git a/source/MaterialXRenderGlsl/GlslProgram.h b/source/MaterialXRenderGlsl/GlslProgram.h
index 7d58dbaca7..4addd7d54b 100644
--- a/source/MaterialXRenderGlsl/GlslProgram.h
+++ b/source/MaterialXRenderGlsl/GlslProgram.h
@@ -102,7 +102,7 @@ class MX_RENDERGLSL_API GlslProgram
string typeString;
/// Input value. Will only be non-empty if initialized stages with a HwShader and a value was set during
/// shader generation.
- MaterialX::ValuePtr value;
+ MaterialX::ConstValuePtr value;
/// Is this a constant
bool isConstant;
/// Element path (if any)
@@ -223,7 +223,7 @@ class MX_RENDERGLSL_API GlslProgram
// Utility to find a uniform value in an uniform list.
// If uniform cannot be found a null pointer will be return.
- ValuePtr findUniformValue(const string& uniformName, const InputMap& uniformList);
+ ConstValuePtr findUniformValue(const string& uniformName, const InputMap& uniformList);
// Bind an individual texture to a program uniform location
ImagePtr bindTexture(unsigned int uniformType, int uniformLocation, const FilePath& filePath,
diff --git a/source/MaterialXRenderMsl/MslMaterial.mm b/source/MaterialXRenderMsl/MslMaterial.mm
index 311d84acee..eb13ea7900 100644
--- a/source/MaterialXRenderMsl/MslMaterial.mm
+++ b/source/MaterialXRenderMsl/MslMaterial.mm
@@ -318,7 +318,7 @@
{
valueString = value->getValueString();
}
- uniform->setValue(Value::createValueFromStrings(valueString, uniform->getType().getName()));
+ uniform->setValue(uniform->getType().createValueFromStrings(valueString));
if (_doc)
{
ElementPtr element = _doc->getDescendant(uniform->getPath());
diff --git a/source/MaterialXRenderMsl/MslPipelineStateObject.h b/source/MaterialXRenderMsl/MslPipelineStateObject.h
index b335e29af5..a823662f5f 100644
--- a/source/MaterialXRenderMsl/MslPipelineStateObject.h
+++ b/source/MaterialXRenderMsl/MslPipelineStateObject.h
@@ -99,7 +99,7 @@ class MX_RENDERMSL_API MslProgram
string typeString;
/// Input value. Will only be non-empty if initialized stages with a HwShader and a value was set during
/// shader generation.
- MaterialX::ValuePtr value;
+ MaterialX::ConstValuePtr value;
/// Is this a constant
bool isConstant;
/// Element path (if any)
@@ -256,7 +256,7 @@ class MX_RENDERMSL_API MslProgram
// Utility to find a uniform value in an uniform list.
// If uniform cannot be found a null pointer will be return.
- ValuePtr findUniformValue(const string& uniformName, const InputMap& uniformList);
+ ConstValuePtr findUniformValue(const string& uniformName, const InputMap& uniformList);
// Bind an individual texture to a program uniform location
ImagePtr bindTexture(id renderCmdEncoder,
diff --git a/source/MaterialXRenderMsl/MslPipelineStateObject.mm b/source/MaterialXRenderMsl/MslPipelineStateObject.mm
index 2d5685646f..470fa549b2 100644
--- a/source/MaterialXRenderMsl/MslPipelineStateObject.mm
+++ b/source/MaterialXRenderMsl/MslPipelineStateObject.mm
@@ -235,12 +235,12 @@ int GetStrideOfMetalType(MTLDataType type)
if (_shader->hasAttribute(HW::ATTR_TRANSPARENT))
{
- psoDesc.colorAttachments[0].blendingEnabled = YES;
- psoDesc.colorAttachments[0].rgbBlendOperation = MTLBlendOperationAdd;
- psoDesc.colorAttachments[0].alphaBlendOperation = MTLBlendOperationAdd;
- psoDesc.colorAttachments[0].sourceRGBBlendFactor = MTLBlendFactorSourceAlpha;
- psoDesc.colorAttachments[0].sourceAlphaBlendFactor = MTLBlendFactorSourceAlpha;
- psoDesc.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOneMinusSourceAlpha;
+ psoDesc.colorAttachments[0].blendingEnabled = YES;
+ psoDesc.colorAttachments[0].rgbBlendOperation = MTLBlendOperationAdd;
+ psoDesc.colorAttachments[0].alphaBlendOperation = MTLBlendOperationAdd;
+ psoDesc.colorAttachments[0].sourceRGBBlendFactor = MTLBlendFactorSourceAlpha;
+ psoDesc.colorAttachments[0].sourceAlphaBlendFactor = MTLBlendFactorSourceAlpha;
+ psoDesc.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOneMinusSourceAlpha;
psoDesc.colorAttachments[0].destinationAlphaBlendFactor = MTLBlendFactorOneMinusSourceAlpha;
_alphaBlendingEnabled = true;
@@ -265,12 +265,12 @@ int GetStrideOfMetalType(MTLDataType type)
if (string::npos != sattributeName.find(colorSet))
{
string setNumber = sattributeName.substr(colorSet.size(), sattributeName.size());
- inputPtr->value = Value::createValueFromStrings(setNumber, getTypeString());
+ inputPtr->value = Type::INTEGER.createValueFromStrings(setNumber);
}
else if (string::npos != sattributeName.find(uvSet))
{
string setNumber = sattributeName.substr(uvSet.size(), sattributeName.size());
- inputPtr->value = Value::createValueFromStrings(setNumber, getTypeString());
+ inputPtr->value = Type::INTEGER.createValueFromStrings(setNumber);
}
_attributeList[sattributeName] = inputPtr;
@@ -566,8 +566,8 @@ int GetStrideOfMetalType(MTLDataType type)
return nullptr;
}
-MaterialX::ValuePtr MslProgram::findUniformValue(const string& uniformName,
- const MslProgram::InputMap& uniformList)
+MaterialX::ConstValuePtr MslProgram::findUniformValue(const string& uniformName,
+ const MslProgram::InputMap& uniformList)
{
auto uniform = uniformList.find(uniformName);
if (uniform != uniformList.end())
@@ -925,31 +925,54 @@ int GetStrideOfMetalType(MTLDataType type)
{
if (arg.type == MTLArgumentTypeBuffer && arg.bufferDataType == MTLDataTypeStruct)
{
- for (MTLStructMember* member in arg.bufferStructType.members)
- {
- std::string uboObjectName = std::string(arg.name.UTF8String);
- std::string memberName = member.name.UTF8String;
- std::string uboDotMemberName = uboObjectName + "." + memberName;
+ const auto uboObjectName = string(arg.name.UTF8String);
- InputPtr inputPtr = std::make_shared(arg.index, member.dataType, arg.bufferDataSize, EMPTY_STRING);
- _uniformList[uboDotMemberName] = inputPtr;
- _globalUniformNameList[memberName] = uboDotMemberName;
-
- if (MTLArrayType* arrayMember = member.arrayType)
+ const auto addUniformToList =
+ [this, uboObjectName]
+ (MTLStructMember* member, int index, int size, const string& memberNamePrefix) -> void
+ {
+ auto addUniformToList_impl =
+ [this, uboObjectName]
+ (MTLStructMember* member, int index, int size, const string& memberNamePrefix, auto& addUniformToList_ref) -> void
{
- for (int i = 0; i < arrayMember.arrayLength; ++i)
+ auto memberName = memberNamePrefix + member.name.UTF8String;
+
+ if (MTLStructType* structMember = member.structType)
{
- for (MTLStructMember* ArrayOfStructMember in arrayMember.elementStructType.members)
+ for (MTLStructMember* subMember in structMember.members)
{
- std::string memberNameDotSubmember = memberName + "[" + std::to_string(i) + "]." + ArrayOfStructMember.name.UTF8String;
- std::string uboDotMemberNameDotSubmemberName = uboObjectName + "." + memberNameDotSubmember;
+ auto namePrefix = memberName + ".";
+ addUniformToList_ref(subMember, subMember.argumentIndex, subMember.offset, namePrefix, addUniformToList_ref);
+ }
+ }
+ else
+ {
+ auto uboDotMemberName = uboObjectName + "." + memberName;
+
+ InputPtr inputPtr = std::make_shared(index, member.dataType, size, EMPTY_STRING);
+ this->_uniformList[uboDotMemberName] = inputPtr;
+ this->_globalUniformNameList[memberName] = uboDotMemberName;
- InputPtr inputPtr = std::make_shared(ArrayOfStructMember.argumentIndex, ArrayOfStructMember.dataType, ArrayOfStructMember.offset, EMPTY_STRING);
- _uniformList[uboDotMemberNameDotSubmemberName] = inputPtr;
- _globalUniformNameList[memberNameDotSubmember] = uboDotMemberNameDotSubmemberName;
+ if (MTLArrayType* arrayMember = member.arrayType)
+ {
+ for (int i = 0; i < arrayMember.arrayLength; ++i)
+ {
+ for (MTLStructMember* ArrayOfStructMember in arrayMember.elementStructType.members)
+ {
+ auto namePrefix = memberName + "[" + std::to_string(i) + "].";
+ addUniformToList_ref(ArrayOfStructMember, ArrayOfStructMember.argumentIndex, ArrayOfStructMember.offset, namePrefix, addUniformToList_ref);
+ }
+ }
}
}
- }
+ };
+
+ return addUniformToList_impl(member, index, size, memberNamePrefix, addUniformToList_impl);
+ };
+
+ for (MTLStructMember* member in arg.bufferStructType.members)
+ {
+ addUniformToList(member, arg.index, arg.bufferDataSize, "");
}
}
@@ -1006,55 +1029,90 @@ int GetStrideOfMetalType(MTLDataType type)
for (size_t i = 0; i < uniforms.size(); ++i)
{
const ShaderPort* v = uniforms[i];
- MTLDataType resourceType = mapTypeToMetalType(v->getType());
-
- // There is no way to match with an unnamed variable
- if (v->getVariable().empty())
- {
- continue;
- }
- // Ignore types which are unsupported in MSL.
- if (resourceType == MTLDataTypeNone)
- {
- continue;
- }
+ const string& variablePath = v->getPath();
+ const string& variableSemantic = v->getSemantic();
- auto inputIt = _uniformList.find(v->getVariable());
- if (inputIt == _uniformList.end())
+ const auto populateUniformInput =
+ [this, uniforms, variablePath, variableSemantic, &errors, &uniformTypeMismatchFound]
+ (TypeDesc variableTypeDesc, const string& variableName, ConstValuePtr variableValue) -> void
{
- if (v->getType() == Type::FILENAME)
+ auto populateUniformInput_impl =
+ [this, uniforms, variablePath, variableSemantic, &errors, &uniformTypeMismatchFound]
+ (TypeDesc variableTypeDesc, const string& variableName, ConstValuePtr variableValue, auto& populateUniformInput_ref) -> void
{
- inputIt = _uniformList.find(TEXTURE_NAME(v->getVariable()));
- }
- else
- {
- inputIt = _uniformList.find(uniforms.getInstance() + "." + v->getVariable());
- }
- }
+ // There is no way to match with an unnamed variable
+ if (variableName.empty())
+ {
+ return;
+ }
- if (inputIt != _uniformList.end())
- {
- Input* input = inputIt->second.get();
- input->path = v->getPath();
- input->value = v->getValue();
- if (input->resourceType == resourceType)
- {
- input->typeString = v->getType().getName();
- }
- else
- {
- errors.push_back(
- "Pixel shader uniform block type mismatch [" + uniforms.getName() + "]. "
- + "Name: \"" + v->getVariable()
- + "\". Type: \"" + v->getType().getName()
- + "\". Semantic: \"" + v->getSemantic()
- + "\". Value: \"" + (v->getValue() ? v->getValue()->getValueString() : "")
- + "\". resourceType: " + std::to_string(mapTypeToMetalType(v->getType()))
- );
- uniformTypeMismatchFound = true;
- }
- }
+ MTLDataType resourceType = mapTypeToMetalType(variableTypeDesc);
+ // Ignore types which are unsupported in MSL.
+ if (resourceType == MTLDataTypeNone)
+ {
+ return;
+ }
+
+ if (!variableTypeDesc.isStruct())
+ {
+ auto inputIt = _uniformList.find(variableName);
+
+ if (inputIt == _uniformList.end()) {
+ if(variableTypeDesc == Type::FILENAME)
+ {
+ inputIt = _uniformList.find(TEXTURE_NAME(variableName));
+ }
+ else
+ {
+ inputIt = _uniformList.find(uniforms.getInstance() + "." + variableName);
+ }
+ }
+
+ if (inputIt != _uniformList.end())
+ {
+ Input* input = inputIt->second.get();
+ input->path = variablePath;
+ input->value = variableValue;
+ if (input->resourceType == resourceType)
+ {
+ input->typeString = variableTypeDesc.getName();
+ }
+ else
+ {
+ errors.push_back(
+ "Pixel shader uniform block type mismatch [" + uniforms.getName() + "]. "
+ + "Name: \"" + variableName
+ + "\". Type: \"" + variableTypeDesc.getName()
+ + "\". Semantic: \"" + variableSemantic
+ + "\". Value: \"" + (variableValue ? variableValue->getValueString() : "")
+ + "\". resourceType: " + std::to_string(mapTypeToMetalType(variableTypeDesc))
+ );
+ uniformTypeMismatchFound = true;
+ }
+ }
+ }
+ else
+ {
+ auto structTypeDesc = StructTypeDesc::get(variableTypeDesc.getStructIndex());
+ auto aggregateValue = std::static_pointer_cast(variableValue);
+
+ const auto& members = structTypeDesc.getMembers();
+ for (size_t i = 0, n = members.size(); i < n; ++i)
+ {
+ const auto& structMember = members[i];
+ auto memberVariableName = variableName+"."+structMember._name;
+ auto memberVariableValue = aggregateValue->getMemberValue(i);
+
+ populateUniformInput_ref(structMember._typeDesc, memberVariableName, memberVariableValue, populateUniformInput_ref);
+ }
+ }
+ };
+
+ return populateUniformInput_impl(variableTypeDesc, variableName, variableValue, populateUniformInput_impl);
+ };
+
+ populateUniformInput(v->getType(), v->getVariable(), v->getValue());
}
}
@@ -1231,7 +1289,7 @@ int GetStrideOfMetalType(MTLDataType type)
return false;
};
- auto setValue = [](MaterialX::ValuePtr value, std::vector& data, size_t offset)
+ auto setValue = [](MaterialX::ConstValuePtr value, std::vector& data, size_t offset)
{
if (value->getTypeString() == "float")
{
@@ -1307,7 +1365,7 @@ throw ExceptionRenderError(
{
if (!setCommonUniform(lightHandler, cam, member.name.UTF8String, uniformBufferData, member.offset))
{
- MaterialX::ValuePtr value = _uniformList[string(arg.name.UTF8String) + "." + member.name.UTF8String]->value;
+ auto value = _uniformList[string(arg.name.UTF8String) + "." + member.name.UTF8String]->value;
if (value)
{
setValue(value, uniformBufferData, member.offset);
@@ -1332,39 +1390,60 @@ throw ExceptionRenderError(
if (!setCommonUniform(lightHandler, cam, member.name.UTF8String, uniformBufferData, member.offset))
{
- auto uniformInfo = _uniformList.find(uniformName);
- if (uniformInfo != _uniformList.end())
- {
- MaterialX::ValuePtr value = uniformInfo->second->value;
- if (value)
- {
- setValue(value, uniformBufferData, member.offset);
- }
- }
- else
- {
- }
- }
-
- if (MTLArrayType* arrayMember = member.arrayType)
- {
- for (int i = 0; i < arrayMember.arrayLength; ++i)
+ const auto setUniformValue =
+ [this, setValue]
+ (MTLStructMember* member, const string& uniformName, std::vector& uniformBufferData, int offset ) -> void
{
- for (MTLStructMember* ArrayOfStructMember in arrayMember.elementStructType.members)
+ auto setUniformValue_impl =
+ [this, setValue]
+ (MTLStructMember* member, const string& uniformName, std::vector& uniformBufferData, int offset, auto &setUniformValue_ref ) -> void
{
- string uniformNameSubArray = uniformName + "[" + std::to_string(i) + "]." + ArrayOfStructMember.name.UTF8String;
-
- auto uniformInfo = _uniformList.find(uniformNameSubArray);
- if (uniformInfo != _uniformList.end())
+ if(MTLArrayType* arrayMember = member.arrayType)
{
- MaterialX::ValuePtr value = uniformInfo->second->value;
- if (value)
+ for(int i = 0; i < arrayMember.arrayLength; ++i)
{
- setValue(value, uniformBufferData, member.offset + i * arrayMember.stride + ArrayOfStructMember.offset);
+ for (MTLStructMember* ArrayOfStructMember in arrayMember.elementStructType.members)
+ {
+ string uniformNameSubArray = uniformName + "[" + std::to_string(i) + "]." + ArrayOfStructMember.name.UTF8String;
+ auto uniformInfo = _uniformList.find(uniformNameSubArray);
+ if (uniformInfo != _uniformList.end())
+ {
+ auto value = uniformInfo->second->value;
+ if(value)
+ {
+ setValue(value, uniformBufferData, offset + i * arrayMember.stride + ArrayOfStructMember.offset);
+ }
+ }
+ }
}
}
- }
- }
+ else if (MTLStructType* structMember = member.structType)
+ {
+ // this code does not support struct recursion yet....
+ for (MTLStructMember* subMember in structMember.members)
+ {
+ string subUniformName = uniformName+"."+subMember.name.UTF8String;
+ setUniformValue_ref(subMember, subUniformName, uniformBufferData, offset+subMember.offset, setUniformValue_ref);
+ }
+ }
+ else
+ {
+ auto uniformInfo = _uniformList.find(uniformName);
+ if (uniformInfo != _uniformList.end())
+ {
+ auto value = uniformInfo->second->value;
+ if(value)
+ {
+ setValue(value, uniformBufferData, offset);
+ }
+ }
+ }
+ };
+
+ return setUniformValue_impl(member, uniformName, uniformBufferData, offset, setUniformValue_impl);
+ };
+
+ setUniformValue(member, uniformName, uniformBufferData, member.offset);
}
}
@@ -1415,14 +1494,15 @@ throw ExceptionRenderError(
// A "filename" is not indicative of type, so just return a 2d sampler.
return MTLDataTypeTexture;
}
- else if (type == Type::BSDF ||
- type == Type::MATERIAL ||
+ else if (type == Type::BSDF ||
+ type == Type::MATERIAL ||
type == Type::DISPLACEMENTSHADER ||
- type == Type::EDF ||
- type == Type::VDF ||
- type == Type::SURFACESHADER ||
- type == Type::LIGHTSHADER ||
- type == Type::VOLUMESHADER)
+ type == Type::EDF ||
+ type == Type::VDF ||
+ type == Type::SURFACESHADER ||
+ type == Type::LIGHTSHADER ||
+ type == Type::VOLUMESHADER ||
+ type.isStruct())
return MTLDataTypeStruct;
return MTLDataTypeNone;
diff --git a/source/MaterialXTest/MaterialXCore/Node.cpp b/source/MaterialXTest/MaterialXCore/Node.cpp
index ef746bfe05..f3ce7d40de 100644
--- a/source/MaterialXTest/MaterialXCore/Node.cpp
+++ b/source/MaterialXTest/MaterialXCore/Node.cpp
@@ -159,12 +159,12 @@ TEST_CASE("Node", "[node]")
REQUIRE(typeDef->getMembers().size() == scalarCount);
// Reference the custom type.
- std::string d65("400.0,82.75,500.0,109.35,600.0,90.01,700.0,71.61,800.0,59.45");
+ std::string d65("{400;82.75;500;109.35;600;90.01;700;71.61;800;59.45}");
constant->setInputValue("value", d65, "spectrum");
REQUIRE(constant->getInput("value")->getType() == "spectrum");
REQUIRE(constant->getInput("value")->getValueString() == d65);
- REQUIRE(constant->getInputValue("value")->isA());
- REQUIRE(constant->getInputValue("value")->asA() == d65);
+ REQUIRE(constant->getInputValue("value")->isA());
+ REQUIRE(constant->getInputValue("value")->asA().getValueString() == d65);
// Validate the document.
REQUIRE(doc->validate());
diff --git a/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp b/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp
index 4a8e61645a..78da7e50f3 100644
--- a/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp
+++ b/source/MaterialXTest/MaterialXGenShader/GenShaderUtil.cpp
@@ -649,6 +649,9 @@ void ShaderGeneratorTester::validate(const mx::GenOptions& generateOptions, cons
addColorManagement();
addUnitSystem();
+ // Register struct typedefs from the library files.
+ _shaderGenerator->loadStructTypeDefs(_dependLib);
+
// Test suite setup
addSkipFiles();
@@ -705,6 +708,8 @@ void ShaderGeneratorTester::validate(const mx::GenOptions& generateOptions, cons
preprocessDocument(doc);
_shaderGenerator->registerShaderMetadata(doc, context);
+ _shaderGenerator->loadStructTypeDefs(doc);
+
// For each new file clear the implementation cache.
// Since the new file might contain implementations with names
// colliding with implementations in previous test cases.
diff --git a/source/MaterialXView/Viewer.cpp b/source/MaterialXView/Viewer.cpp
index 24aea1eb42..c4c69bb812 100644
--- a/source/MaterialXView/Viewer.cpp
+++ b/source/MaterialXView/Viewer.cpp
@@ -1769,6 +1769,9 @@ void Viewer::initContext(mx::GenContext& context)
unitSystem->setUnitConverterRegistry(_unitRegistry);
context.getShaderGenerator().setUnitSystem(unitSystem);
context.getOptions().targetDistanceUnit = "meter";
+
+ // Initialize the struct typedefs from the stdlib
+ context.getShaderGenerator().loadStructTypeDefs(_stdLib);
}
void Viewer::loadStandardLibraries()
diff --git a/source/PyMaterialX/PyMaterialXCore/PyValue.cpp b/source/PyMaterialX/PyMaterialXCore/PyValue.cpp
index 501f9d5f04..c36bd6c288 100644
--- a/source/PyMaterialX/PyMaterialXCore/PyValue.cpp
+++ b/source/PyMaterialX/PyMaterialXCore/PyValue.cpp
@@ -6,6 +6,7 @@
#include
#include
+#include
#define BIND_TYPE_INSTANCE(NAME, T) \
py::class_, std::shared_ptr< mx::TypedValue >, mx::Value>(mod, "TypedValue_" #NAME) \
@@ -22,7 +23,10 @@ void bindPyValue(py::module& mod)
py::class_(mod, "Value")
.def("getValueString", &mx::Value::getValueString)
.def("getTypeString", &mx::Value::getTypeString)
- .def_static("createValueFromStrings", &mx::Value::createValueFromStrings);
+ .def_static("createValueFromStrings", &mx::Value::createValueFromStrings,
+ py::arg("value"),
+ py::arg("type"),
+ py::arg("typeDefPtr") = nullptr);
BIND_TYPE_INSTANCE(integer, int)
BIND_TYPE_INSTANCE(boolean, bool)
diff --git a/source/PyMaterialX/PyMaterialXGenShader/PyShaderGenerator.cpp b/source/PyMaterialX/PyMaterialXGenShader/PyShaderGenerator.cpp
index b952bd4651..0c8a086e58 100644
--- a/source/PyMaterialX/PyMaterialXGenShader/PyShaderGenerator.cpp
+++ b/source/PyMaterialX/PyMaterialXGenShader/PyShaderGenerator.cpp
@@ -22,5 +22,7 @@ void bindPyShaderGenerator(py::module& mod)
.def("setUnitSystem", &mx::ShaderGenerator::setUnitSystem)
.def("getUnitSystem", &mx::ShaderGenerator::getUnitSystem)
.def("getTokenSubstitutions", &mx::ShaderGenerator::getTokenSubstitutions)
+ .def("loadStructTypeDefs", &mx::ShaderGenerator::loadStructTypeDefs)
+ .def("clearStructTypeDefs", &mx::ShaderGenerator::clearStructTypeDefs)
.def("registerShaderMetadata", &mx::ShaderGenerator::registerShaderMetadata);
}
From ed450e82de41a9a5d4273c49babfdb37b18b922e Mon Sep 17 00:00:00 2001
From: Chris Rydalch
Date: Tue, 29 Oct 2024 18:12:58 -0500
Subject: [PATCH 39/80] Move unimplemented Worley noise features to proposals
doc (#2090)
The *period* and *metric* parameters are not yet implemented.
---
documents/Specification/MaterialX.Proposals.md | 18 ++++++++++++++++++
.../Specification/MaterialX.Specification.md | 4 ----
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/documents/Specification/MaterialX.Proposals.md b/documents/Specification/MaterialX.Proposals.md
index b96c688f25..d387d28718 100644
--- a/documents/Specification/MaterialX.Proposals.md
+++ b/documents/Specification/MaterialX.Proposals.md
@@ -188,7 +188,25 @@ We have a standard 3d fractal noise, but a 2d variant would be useful as well.
* `period` (float or vector3): the positive integer distance at which the noise function returns the same value for input coordinate repeated at that step. Default is 0, meaning the noise is not periodic.
* `in` (float): the 1D coordinate at which the noise is evaluated.
+
+Expanded 2D Worley noise to support different distance metrics and periodicity.
+
+* **`worleynoise2d`**: 2D Worley noise using centered jitter, outputting float (distance metric to closest feature), vector2 (distance metrics to closest 2 features) or vector3 (distance metrics to closest 3 features).
+ * `metric` (uniform string): the distance metric to return, one of "distance" (Euclidean distance to feature), "distance2" (Euclidean distance squared), "manhattan" or "chebyshev". Default is "distance".
+ * `period` (float or vector3): the positive integer distance at which the noise function returns the same value for texture coordinates repeated at that step. Default is 0, meaning the noise is not periodic.
+
+
+
+Expanded 3D Worley noise to support different distance metrics and periodicity.
+
+* **`worleynoise3d`**: 3D Worley noise using centered jitter, outputting float (distance metric to closest feature), vector2 (distance metrics to closest 2 features) or vector3 (distance metrics to closest 3 features).
+ * `metric` (uniform string): the distance metric to return, one of "distance" (Euclidean distance to feature), "distance2" (Euclidean distance squared), "manhattan" or "chebyshev". Default is "distance".
+ * `period` (float or vector3): the positive integer distance at which the noise function returns the same value for position coordinates repeated at that step. Default is 0, meaning the noise is not periodic.
+
+#### Periodic Noises
+
+In #1201 it was decided that separate periodic versions of all of the noises is preferred to adding it to the existing noises.
### Shape Nodes
diff --git a/documents/Specification/MaterialX.Specification.md b/documents/Specification/MaterialX.Specification.md
index 070587340c..65027694d8 100644
--- a/documents/Specification/MaterialX.Specification.md
+++ b/documents/Specification/MaterialX.Specification.md
@@ -887,16 +887,12 @@ Standard Noise nodes:
* **`worleynoise2d`**: 2D Worley noise using centered jitter, outputting float (distance metric to closest feature), vector2 (distance metrics to closest 2 features) or vector3 (distance metrics to closest 3 features).
- * `metric` (uniform string): the distance metric to return, one of "distance" (Euclidean distance to feature), "distance2" (Euclidean distance squared), "manhattan" or "chebyshev". Default is "distance".
- * `period` (float or vector3): the positive integer distance at which the noise function returns the same value for texture coordinates repeated at that step. Default is 0, meaning the noise is not periodic.
* `jitter` (float): amount to jitter the cell center position, with smaller values creating a more regular pattern. Default is 1.0.
* `texcoord` (vector2): the 2D position at which the noise is evaluated. Default is to use the first set of texture coordinates.
* **`worleynoise3d`**: 3D Worley noise using centered jitter, outputting float (distance metric to closest feature), vector2 (distance metrics to closest 2 features) or vector3 (distance metrics to closest 3 features).
- * `metric` (uniform string): the distance metric to return, one of "distance" (Euclidean distance to feature), "distance2" (Euclidean distance squared), "manhattan" or "chebyshev". Default is "distance".
- * `period` (float or vector3): the positive integer distance at which the noise function returns the same value for position coordinates repeated at that step. Default is 0, meaning the noise is not periodic.
* `jitter` (float): amount to jitter the cell center position, with smaller values creating a more regular pattern. Default is 1.0.
* `position` (vector3): the 3D position at which the noise is evaluated. Default is to use the current 3D object-space coordinate.
From b330fd7ade12811aa4a39096bef3b986841d67bb Mon Sep 17 00:00:00 2001
From: Lee Kerley <154285602+ld-kerley@users.noreply.github.com>
Date: Wed, 30 Oct 2024 15:37:10 -0700
Subject: [PATCH 40/80] Removing MDL struct test function (#2099)
Removing MDL struct test function incorrectly included in #1831.
---
.../mdl/materialx/stdlib_1_8.mdl | 20 -------------------
1 file changed, 20 deletions(-)
diff --git a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl
index bb6eaf157a..bef1e430d4 100644
--- a/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl
+++ b/source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl
@@ -441,23 +441,3 @@ export float3 mx_viewdirection_vector3(
::state::coordinate_object,
internal_space_direction));
}
-
-
-export float3 mx_extractGroup(
- uniform texcoordGroup_struct in = {{0.1,0.1},{0.2,0.2},{0.3,0.3}},
- uniform int index = 0
-)
- [[
- anno::description("Node Group: experimental")
- ]]
-{
- result = in.st_0.ss;
-
- if (index == 1)
- result = in.st_1.ss;
- else if (index == 2)
- result = in.st_2.ss;
-
- return result;
-}
-
From 1b2852e1db52fc52ba5f845b784a2c46d909ef2d Mon Sep 17 00:00:00 2001
From: Lee Kerley <154285602+ld-kerley@users.noreply.github.com>
Date: Thu, 31 Oct 2024 09:33:36 -0700
Subject: [PATCH 41/80] Simplify the MetalTexture abstraction (#2095)
`mx_texture.metal` is used to provide an abstraction to the texture code when being called from GLSL code.
There are a few functions in the interface of this abstraction that do not appear to be used anywhere.
This PR proposes removing them, as a precursor to other upcoming texture work. I'm proposing this as a separate PR to make things easier to review.
All of the MSL unit tests pass.
---
libraries/stdlib/genmsl/lib/mx_texture.metal | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/libraries/stdlib/genmsl/lib/mx_texture.metal b/libraries/stdlib/genmsl/lib/mx_texture.metal
index 479a8836bf..7e90b60686 100644
--- a/libraries/stdlib/genmsl/lib/mx_texture.metal
+++ b/libraries/stdlib/genmsl/lib/mx_texture.metal
@@ -2,13 +2,8 @@ struct MetalTexture
{
texture2d tex;
sampler s;
- int get_width() { return tex.get_width(); }
- int get_height() { return tex.get_height(); }
- int get_num_mip_levels() { return tex.get_num_mip_levels(); }
};
-int get_width(MetalTexture mtlTex) { return mtlTex.get_width(); }
-
float4 texture(MetalTexture mtlTex, float2 uv)
{
return mtlTex.tex.sample(mtlTex.s, uv);
@@ -21,10 +16,5 @@ float4 textureLod(MetalTexture mtlTex, float2 uv, float lod)
int2 textureSize(MetalTexture mtlTex, int mipLevel)
{
- return int2(mtlTex.get_width(), mtlTex.get_height());
-}
-
-int texture_mips(MetalTexture mtlTex)
-{
- return mtlTex.tex.get_num_mip_levels();
+ return int2(mtlTex.tex.get_width(), mtlTex.tex.get_height());
}
From 65862ed56e9fd82dc2771bf3d371e16a1a1e30d3 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Thu, 31 Oct 2024 12:05:37 -0700
Subject: [PATCH 42/80] Clarifications to UsdPreviewSurface (#2100)
- Set the shading model version to 2.5, reflecting the alignment of this graph definition with the 2.5 specification for UsdPreviewSurface (https://openusd.org/release/spec_usdpreviewsurface.html).
- Add UI names for shading model inputs.
- Update doc string letter case.
---
libraries/bxdf/usd_preview_surface.mtlx | 30 ++++++++++++-------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/libraries/bxdf/usd_preview_surface.mtlx b/libraries/bxdf/usd_preview_surface.mtlx
index a521c756bc..4abdb91d9f 100644
--- a/libraries/bxdf/usd_preview_surface.mtlx
+++ b/libraries/bxdf/usd_preview_surface.mtlx
@@ -6,21 +6,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 4339aaa83480693c1bf4d5b54e1cf614654dd507 Mon Sep 17 00:00:00 2001
From: Jonathan Stone
Date: Thu, 31 Oct 2024 17:12:44 -0700
Subject: [PATCH 43/80] Improvements to the MaterialX Viewer (#2101)
- Replace raw pointers with NanoGUI references to improve application robustness.
- Allow UI names to be displayed without a corresponding UI folder.
---
source/MaterialXRender/Util.cpp | 2 +-
source/MaterialXView/Editor.cpp | 103 ++++++++--------
source/MaterialXView/Editor.h | 20 ++--
source/MaterialXView/Viewer.cpp | 204 +++++++++++++++-----------------
source/MaterialXView/Viewer.h | 36 +++---
5 files changed, 179 insertions(+), 186 deletions(-)
diff --git a/source/MaterialXRender/Util.cpp b/source/MaterialXRender/Util.cpp
index 00fdc65381..c206514412 100644
--- a/source/MaterialXRender/Util.cpp
+++ b/source/MaterialXRender/Util.cpp
@@ -318,7 +318,7 @@ void createUIPropertyGroups(DocumentPtr doc, const VariableBlock& block, UIPrope
// Prepend a parent label for unlabeled node inputs.
ElementPtr parent = pair.first->getParent();
- if (item.ui.uiFolder.empty() && parent && parent->isA())
+ if (item.ui.uiName.empty() && parent && parent->isA())
{
item.label = parent->getName() + pathSeparator + item.label;
}
diff --git a/source/MaterialXView/Editor.cpp b/source/MaterialXView/Editor.cpp
index abba9ce10e..6d64c55b30 100644
--- a/source/MaterialXView/Editor.cpp
+++ b/source/MaterialXView/Editor.cpp
@@ -18,11 +18,11 @@ namespace
class EditorColorPicker : public ng::ColorPicker
{
public:
- EditorColorPicker(ng::Widget* parent, const ng::Color& color) :
+ EditorColorPicker(ng::ref parent, const ng::Color& color) :
ng::ColorPicker(parent, color)
{
- ng::Popup* popup = this->popup();
- ng::Widget* floatGroup = new ng::Widget(popup);
+ ng::ref popup = this->popup();
+ ng::ref floatGroup = new ng::Widget(popup);
auto layout = new ng::GridLayout(ng::Orientation::Horizontal, 2,
ng::Alignment::Middle, 2, 2);
layout->set_col_alignment({ ng::Alignment::Fill, ng::Alignment::Fill });
@@ -60,7 +60,7 @@ class EditorColorPicker : public ng::ColorPicker
protected:
// Additional numeric entry / feedback widgets
- ng::FloatBox* _colorWidgets[4];
+ ng::ref> _colorWidgets[4];
};
} // anonymous namespace
@@ -70,10 +70,6 @@ class EditorColorPicker : public ng::ColorPicker
//
PropertyEditor::PropertyEditor() :
- _window(nullptr),
- _container(nullptr),
- _gridLayout2(nullptr),
- _gridLayout3(nullptr),
_visible(false),
_fileDialogsForImages(true)
{
@@ -81,7 +77,7 @@ PropertyEditor::PropertyEditor() :
void PropertyEditor::create(Viewer& parent)
{
- ng::Window* parentWindow = parent.getWindow();
+ ng::ref parentWindow = parent.getWindow();
// Remove the window associated with the form.
// This is done by explicitly creating and owning the window
@@ -110,7 +106,7 @@ void PropertyEditor::create(Viewer& parent)
_window->set_position(previousPosition);
_window->set_visible(_visible);
- ng::VScrollPanel* scroll_panel = new ng::VScrollPanel(_window);
+ ng::ref scroll_panel = new ng::VScrollPanel(_window);
scroll_panel->set_fixed_height(300);
_container = new ng::Widget(scroll_panel);
_container->set_layout(new ng::GroupLayout(1, 1, 1, 1));
@@ -127,7 +123,7 @@ void PropertyEditor::create(Viewer& parent)
}
void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::string& group,
- ng::Widget* container, Viewer* viewer, bool editable)
+ ng::ref container, Viewer* viewer, bool editable)
{
const mx::UIProperties& ui = item.ui;
mx::ValuePtr value = item.variable->getValue();
@@ -148,9 +144,9 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
if (!group.empty())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
- ng::Label* groupLabel = new ng::Label(twoColumns, group);
+ ng::ref groupLabel = new ng::Label(twoColumns, group);
groupLabel->set_font_size(20);
groupLabel->set_font("sans-bold");
new ng::Label(twoColumns, "");
@@ -187,11 +183,11 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
const size_t valueIndex = indexInEnumeration();
if (INVALID_INDEX != valueIndex)
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
new ng::Label(twoColumns, label);
- ng::ComboBox* comboBox = new ng::ComboBox(twoColumns, { "" });
+ ng::ref comboBox = new ng::ComboBox(twoColumns, { "" });
comboBox->set_enabled(editable);
comboBox->set_items(enumeration);
comboBox->set_selected_index(static_cast(valueIndex));
@@ -215,7 +211,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
}
else
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
new ng::Label(twoColumns, label);
@@ -252,9 +248,9 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Float widget
else if (value->isA())
{
- ng::Widget* threeColumns = new ng::Widget(container);
+ ng::ref threeColumns = new ng::Widget(container);
threeColumns->set_layout(_gridLayout3);
- ng::FloatBox* floatBox = createFloatWidget(threeColumns, label, value->asA(), &ui, [viewer, path](float value)
+ ng::ref> floatBox = createFloatWidget(threeColumns, label, value->asA(), &ui, [viewer, path](float value)
{
mx::MaterialPtr material = viewer->getSelectedMaterial();
if (material)
@@ -269,12 +265,12 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Boolean widget
else if (value->isA())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
bool v = value->asA();
new ng::Label(twoColumns, label);
- ng::CheckBox* boolVar = new ng::CheckBox(twoColumns, "");
+ ng::ref boolVar = new ng::CheckBox(twoColumns, "");
boolVar->set_checked(v);
boolVar->set_font_size(15);
boolVar->set_callback([path, viewer](bool v)
@@ -290,7 +286,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Color3 input. Can map to a combo box if an enumeration
else if (value->isA())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
// Determine if there is an enumeration for this
@@ -312,7 +308,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Create a combo box. The items are the enumerations in order.
if (index >= 0)
{
- ng::ComboBox* comboBox = new ng::ComboBox(twoColumns, { "" });
+ ng::ref comboBox = new ng::ComboBox(twoColumns, { "" });
comboBox->set_enabled(editable);
comboBox->set_items(enumeration);
comboBox->set_selected_index(index);
@@ -353,7 +349,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Color4 input
else if (value->isA())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
new ng::Label(twoColumns, label);
@@ -376,7 +372,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Vec 2 widget
else if (value->isA())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
mx::Vector2 v = value->asA();
@@ -415,7 +411,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Vec 3 input
else if (value->isA())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
mx::Vector3 v = value->asA();
@@ -470,7 +466,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
// Vec 4 input
else if (value->isA())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
mx::Vector4 v = value->asA();
@@ -542,16 +538,17 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
std::string v = value->asA();
if (!v.empty())
{
- ng::Widget* twoColumns = new ng::Widget(container);
+ ng::ref twoColumns = new ng::Widget(container);
twoColumns->set_layout(_gridLayout2);
if (item.variable->getType() == mx::Type::FILENAME)
{
new ng::Label(twoColumns, label);
- ng::Button* buttonVar = new ng::Button(twoColumns, mx::FilePath(v).getBaseName());
+ ng::ref buttonVar = new ng::Button(twoColumns, mx::FilePath(v).getBaseName());
buttonVar->set_enabled(editable);
buttonVar->set_font_size(15);
- buttonVar->set_callback([buttonVar, path, viewer]()
+ auto buttonVarPtr = buttonVar.get();
+ buttonVar->set_callback([buttonVarPtr, path, viewer]()
{
mx::MaterialPtr material = viewer->getSelectedMaterial();
mx::ShaderPort* uniform = material ? material->findUniform(path) : nullptr;
@@ -572,7 +569,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
if (!filename.empty())
{
uniform->setValue(mx::Value::createValue(filename));
- buttonVar->set_caption(mx::FilePath(filename).getBaseName());
+ buttonVarPtr->set_caption(mx::FilePath(filename).getBaseName());
viewer->perform_layout();
}
}
@@ -583,7 +580,7 @@ void PropertyEditor::addItemToForm(const mx::UIPropertyItem& item, const std::st
else
{
new ng::Label(twoColumns, label);
- ng::TextBox* stringVar = new ng::TextBox(twoColumns, v);
+ ng::ref stringVar = new ng::TextBox(twoColumns, v);
stringVar->set_fixed_size({ 100, 20 });
stringVar->set_font_size(15);
stringVar->set_callback([path, viewer](const std::string& v)
@@ -629,14 +626,12 @@ void PropertyEditor::updateContents(Viewer* viewer)
}
if (!shaderName.empty() && shaderName != "surface")
{
- ng::Widget* twoColumns = new ng::Widget(_container);
+ ng::ref twoColumns = new ng::Widget(_container);
twoColumns->set_layout(_gridLayout2);
- ng::Widget* threeColumns = new ng::Widget(_container);
- threeColumns->set_layout(_gridLayout3);
- ng::Label* modelLabel = new ng::Label(twoColumns, "Shading Model");
+ ng::ref modelLabel = new ng::Label(twoColumns, "Shading Model");
modelLabel->set_font_size(20);
modelLabel->set_font("sans-bold");
- ng::Label* nameLabel = new ng::Label(twoColumns, shaderName);
+ ng::ref nameLabel = new ng::Label(twoColumns, shaderName);
nameLabel->set_font_size(20);
}
}
@@ -688,15 +683,15 @@ void PropertyEditor::updateContents(Viewer* viewer)
viewer->perform_layout();
}
-ng::FloatBox* createFloatWidget(ng::Widget* parent, const std::string& label, float value,
- const mx::UIProperties* ui, std::function callback)
+ng::ref> createFloatWidget(ng::ref parent, const std::string& label, float value,
+ const mx::UIProperties* ui, std::function callback)
{
new ng::Label(parent, label);
- ng::Slider* slider = new ng::Slider(parent);
+ ng::ref slider = new ng::Slider(parent);
slider->set_value(value);
- ng::FloatBox* box = new ng::FloatBox(parent, value);
+ ng::ref> box = new ng::FloatBox(parent, value);
box->set_fixed_width(60);
box->set_font_size(15);
box->set_alignment(ng::TextBox::Alignment::Right);
@@ -734,29 +729,31 @@ ng::FloatBox* createFloatWidget(ng::Widget* parent, const std::string& la
}
}
- slider->set_callback([box, callback](float value)
+ auto sliderPtr = slider.get();
+ auto boxPtr = box.get();
+ slider->set_callback([boxPtr, callback](float value)
{
- box->set_value(value);
+ boxPtr->set_value(value);
callback(value);
});
- box->set_callback([slider, callback](float value)
+ box->set_callback([sliderPtr, callback](float value)
{
- slider->set_value(value);
+ sliderPtr->set_value(value);
callback(value);
});
return box;
}
-ng::IntBox* createIntWidget(ng::Widget* parent, const std::string& label, int value,
- const mx::UIProperties* ui, std::function callback)
+ng::ref> createIntWidget(ng::ref parent, const std::string& label, int value,
+ const mx::UIProperties* ui, std::function callback)
{
new ng::Label(parent, label);
- ng::Slider* slider = new ng::Slider(parent);
+ ng::ref slider = new ng::Slider(parent);
slider->set_value((float) value);
- ng::IntBox* box = new ng::IntBox(parent, value);
+ ng::ref> box = new ng::IntBox(parent, value);
box->set_fixed_width(60);
box->set_font_size(15);
box->set_alignment(ng::TextBox::Alignment::Right);
@@ -794,14 +791,16 @@ ng::IntBox* createIntWidget(ng::Widget* parent, const std::string& label, i
}
}
- slider->set_callback([box, callback](float value)
+ auto sliderPtr = slider.get();
+ auto boxPtr = box.get();
+ slider->set_callback([boxPtr, callback](float value)
{
- box->set_value((int) value);
+ boxPtr->set_value((int) value);
callback((int) value);
});
- box->set_callback([slider, callback](int value)
+ box->set_callback([sliderPtr, callback](int value)
{
- slider->set_value((float) value);
+ sliderPtr->set_value((float) value);
callback(value);
});
diff --git a/source/MaterialXView/Editor.h b/source/MaterialXView/Editor.h
index b1fb4a3ade..b99f1f160c 100644
--- a/source/MaterialXView/Editor.h
+++ b/source/MaterialXView/Editor.h
@@ -39,7 +39,7 @@ class PropertyEditor
}
}
- ng::Window* getWindow()
+ ng::ref getWindow()
{
return _window;
}
@@ -47,19 +47,19 @@ class PropertyEditor
protected:
void create(Viewer& parent);
void addItemToForm(const mx::UIPropertyItem& item, const std::string& group,
- ng::Widget* container, Viewer* viewer, bool editable);
+ ng::ref container, Viewer* viewer, bool editable);
- ng::Window* _window;
- ng::Widget* _container;
- ng::GridLayout* _gridLayout2;
- ng::GridLayout* _gridLayout3;
+ ng::ref _window;
+ ng::ref _container;
+ ng::ref _gridLayout2;
+ ng::ref _gridLayout3;
bool _visible;
bool _fileDialogsForImages;
};
-ng::FloatBox* createFloatWidget(ng::Widget* parent, const std::string& label, float value,
- const mx::UIProperties* ui, std::function callback = nullptr);
-ng::IntBox* createIntWidget(ng::Widget* parent, const std::string& label, int value,
- const mx::UIProperties* ui, std::function callback);
+ng::ref> createFloatWidget(ng::ref parent, const std::string& label, float value,
+ const mx::UIProperties* ui, std::function callback = nullptr);
+ng::ref> createIntWidget(ng::ref parent, const std::string& label, int value,
+ const mx::UIProperties* ui, std::function callback);
#endif // MATERIALXVIEW_EDITOR_H
diff --git a/source/MaterialXView/Viewer.cpp b/source/MaterialXView/Viewer.cpp
index c4c69bb812..46d03a1665 100644
--- a/source/MaterialXView/Viewer.cpp
+++ b/source/MaterialXView/Viewer.cpp
@@ -158,7 +158,6 @@ Viewer::Viewer(const std::string& materialFilename,
const mx::Color3& screenColor) :
ng::Screen(ng::Vector2i(screenWidth, screenHeight), "MaterialXView",
true, false, true, true, USE_FLOAT_BUFFER, 4, 0),
- _window(nullptr),
_materialFilename(materialFilename),
_meshFilename(meshFilename),
_envRadianceFilename(envRadianceFilename),
@@ -184,11 +183,7 @@ Viewer::Viewer(const std::string& materialFilename,
_shadowSoftness(1),
_ambientOcclusionGain(0.6f),
_selectedGeom(0),
- _geomLabel(nullptr),
- _geometrySelectionBox(nullptr),
_selectedMaterial(0),
- _materialLabel(nullptr),
- _materialSelectionBox(nullptr),
_identityCamera(mx::Camera::create()),
_viewCamera(mx::Camera::create()),
_envCamera(mx::Camera::create()),
@@ -232,9 +227,6 @@ Viewer::Viewer(const std::string& materialFilename,
_bakeHeight(0),
_bakeDocumentPerMaterial(false),
_frameTiming(false),
- _timingLabel(nullptr),
- _timingPanel(nullptr),
- _timingText(nullptr),
_avgFrameTime(0.0)
{
// Resolve input filenames, taking both the provided search path and
@@ -295,11 +287,11 @@ void Viewer::initialize()
_imageHandler->setSearchPath(_searchPath);
// Initialize user interfaces.
- createLoadMeshInterface(_window, "Load Mesh");
- createLoadMaterialsInterface(_window, "Load Material");
- createLoadEnvironmentInterface(_window, "Load Environment");
- createPropertyEditorInterface(_window, "Property Editor");
- createAdvancedSettings(_window);
+ createLoadMeshInterface((ng::ref) _window, "Load Mesh");
+ createLoadMaterialsInterface((ng::ref) _window, "Load Material");
+ createLoadEnvironmentInterface((ng::ref) _window, "Load Environment");
+ createPropertyEditorInterface((ng::ref) _window, "Property Editor");
+ createAdvancedSettings((ng::ref) _window);
// Create geometry selection box.
_geomLabel = new ng::Label(_window, "Select Geometry");
@@ -562,9 +554,9 @@ mx::ElementPredicate Viewer::getElementPredicate()
};
}
-void Viewer::createLoadMeshInterface(Widget* parent, const std::string& label)
+void Viewer::createLoadMeshInterface(ng::ref