forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding docstrings for PyMaterialXGen*.
This PR adds docstrings in markdown format to the following modules: - `PyMaterialXGenGlsl` - `PyMaterialXGenMdl` - `PyMaterialXGenMsl` - `PyMaterialXGenOsl` - `PyMaterialXGenShader` The docstrings are defined in macros named `PyMaterialXGen*_DOCSTRING` that use the new `PYMATERIALX_DOCSTRING` macro that is introduced in AcademySoftwareFoundation#2038 to allow us to place the first and last lines in lines by themselves, rather than starting the docstring contents immediately after the `R"docstring(` marker. The `PyMaterialXGen*_DOCSTRING` macros are placed in separate header files named `__doc__.md.h` which live side-by-side with their corresponding `PyModule.cpp` file in which it is included. Note that the docstrings for individual classes, methods, and functions are to be added in separate PRs. Split from AcademySoftwareFoundation#1567. Depends on AcademySoftwareFoundation#2038. Update AcademySoftwareFoundation#342. Signed-off-by: Stefan Habel <[email protected]>
- Loading branch information
1 parent
76bef70
commit f45e453
Showing
10 changed files
with
211 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// Copyright Contributors to the MaterialX Project | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
// Docstring for the PyMaterialXGenGlsl module | ||
|
||
#define PyMaterialXGenGlsl_DOCSTRING PYMATERIALX_DOCSTRING(R"docstring( | ||
Shader generation using the OpenGL Shading Language. | ||
|
||
:see: https://www.opengl.org | ||
:see: https://www.vulkan.org | ||
|
||
GLSL Shader Generation Classes | ||
------------------------------ | ||
|
||
**Class Hierarchy** | ||
|
||
* `PyMaterialXGenShader.ShaderGenerator` | ||
* `PyMaterialXGenShader.HwShaderGenerator` | ||
* `GlslShaderGenerator` | ||
* `EsslShaderGenerator` | ||
* `VkShaderGenerator` | ||
* `PyMaterialXGenShader.GenUserData` | ||
* `PyMaterialXGenShader.HwResourceBindingContext` | ||
* `GlslResourceBindingContext` | ||
|
||
**Class Index** | ||
|
||
.. autosummary:: | ||
:toctree: glsl-shader-generators | ||
|
||
GlslShaderGenerator | ||
EsslShaderGenerator | ||
VkShaderGenerator | ||
GlslResourceBindingContext | ||
)docstring"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Copyright Contributors to the MaterialX Project | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
// Docstring for the PyMaterialXGenMdl module | ||
|
||
#define PyMaterialXGenMdl_DOCSTRING PYMATERIALX_DOCSTRING(R"docstring( | ||
Shader generation using the Material Definition Language. | ||
|
||
:see: https://www.nvidia.com/en-us/design-visualization/technologies/material-definition-language/ | ||
:see: https://raytracing-docs.nvidia.com/mdl/index.html | ||
|
||
MDL Shader Generation Classes | ||
----------------------------- | ||
|
||
**Class Hierarchy** | ||
|
||
* `PyMaterialXGenShader.ShaderGenerator` | ||
* `MdlShaderGenerator` | ||
|
||
**Class Index** | ||
|
||
.. autosummary:: | ||
:toctree: mdl-shader-generators | ||
|
||
MdlShaderGenerator | ||
)docstring"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Copyright Contributors to the MaterialX Project | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
// Docstring for the PyMaterialXGenMsl module | ||
|
||
#define PyMaterialXGenMsl_DOCSTRING PYMATERIALX_DOCSTRING(R"docstring( | ||
Shader generation using the Metal Shading Language. | ||
|
||
:see: https://developer.apple.com/metal/ | ||
:see: https://developer.apple.com/documentation/metal | ||
|
||
MSL Shader Generation Classes | ||
----------------------------- | ||
|
||
**Class Hierarchy** | ||
|
||
* `PyMaterialXGenShader.ShaderGenerator` | ||
* `PyMaterialXGenShader.HwShaderGenerator` | ||
* `MslShaderGenerator` | ||
* `PyMaterialXGenShader.GenUserData` | ||
* `PyMaterialXGenShader.HwResourceBindingContext` | ||
* `MslResourceBindingContext` | ||
|
||
**Class Index** | ||
|
||
.. autosummary:: | ||
:toctree: msl-shader-generators | ||
|
||
MslShaderGenerator | ||
MslResourceBindingContext | ||
)docstring"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Copyright Contributors to the MaterialX Project | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
// Docstring for the PyMaterialXGenOsl module | ||
|
||
#define PyMaterialXGenOsl_DOCSTRING PYMATERIALX_DOCSTRING(R"docstring( | ||
Shader generation using the Open Shading Language. | ||
|
||
:see: https://openshadinglanguage.org/ | ||
:see: https://open-shading-language.readthedocs.io/ | ||
|
||
OSL Shader Generation Classes | ||
----------------------------- | ||
|
||
**Class Hierarchy** | ||
|
||
* `PyMaterialXGenShader.ShaderGenerator` | ||
* `OslShaderGenerator` | ||
|
||
**Class Index** | ||
|
||
.. autosummary:: | ||
:toctree: osl-shader-generators | ||
|
||
OslShaderGenerator | ||
)docstring"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// | ||
// Copyright Contributors to the MaterialX Project | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
// Docstring for the PyMaterialXGenShader module | ||
|
||
#define PyMaterialXGenShader_DOCSTRING PYMATERIALX_DOCSTRING(R"docstring( | ||
Core shader generation support. | ||
|
||
Shader Generation Classes | ||
------------------------- | ||
|
||
.. autosummary:: | ||
:toctree: shader-generation | ||
|
||
ShaderGenerator | ||
HwShaderGenerator | ||
HwResourceBindingContext | ||
GenContext | ||
GenOptions | ||
GenUserData | ||
ApplicationVariableHandler | ||
Shader | ||
ShaderPort | ||
ShaderPortPredicate | ||
ShaderStage | ||
ShaderTranslator | ||
TypeDesc | ||
VariableBlock | ||
|
||
Enumeration Classes | ||
------------------- | ||
|
||
.. autosummary:: | ||
:toctree: enumeration | ||
|
||
ShaderInterfaceType | ||
HwSpecularEnvironmentMethod | ||
|
||
Color Management Classes | ||
------------------------ | ||
|
||
.. autosummary:: | ||
:toctree: color-management | ||
|
||
ColorManagementSystem | ||
DefaultColorManagementSystem | ||
ColorSpaceTransform | ||
|
||
Unit System Classes | ||
------------------- | ||
|
||
.. autosummary:: | ||
:toctree: unit-system | ||
|
||
UnitSystem | ||
UnitTransform | ||
|
||
Utility Functions | ||
----------------- | ||
|
||
.. autofunction:: connectsToWorldSpaceNode | ||
.. autofunction:: elementRequiresShading | ||
.. autofunction:: findRenderableElements | ||
.. autofunction:: findRenderableMaterialNodes | ||
.. autofunction:: getNodeDefInput | ||
.. autofunction:: getUdimCoordinates | ||
.. autofunction:: getUdimScaleAndOffset | ||
.. autofunction:: hasElementAttributes | ||
.. autofunction:: isTransparentSurface | ||
.. autofunction:: mapValueToColor | ||
.. autofunction:: requiresImplementation | ||
.. autofunction:: tokenSubstitution | ||
)docstring"); |