diff --git a/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp b/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp index deb483d635..9a3fda4722 100644 --- a/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp +++ b/source/PyMaterialX/PyMaterialXGenMsl/PyModule.cpp @@ -12,7 +12,32 @@ void bindPyMslResourceBindingContext(py::module &mod); PYBIND11_MODULE(PyMaterialXGenMsl, mod) { - mod.doc() = "Shader generation using Metal Shading Language"; + mod.doc() = R"docstring( + Shader generation using 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"; // PyMaterialXGenMsl depends on types defined in PyMaterialXGenShader pybind11::module::import("PyMaterialXGenShader"); diff --git a/source/PyMaterialX/PyMaterialXGenMsl/PyMslShaderGenerator.cpp b/source/PyMaterialX/PyMaterialXGenMsl/PyMslShaderGenerator.cpp index 870b9bc02c..7149038e90 100644 --- a/source/PyMaterialX/PyMaterialXGenMsl/PyMslShaderGenerator.cpp +++ b/source/PyMaterialX/PyMaterialXGenMsl/PyMslShaderGenerator.cpp @@ -24,7 +24,11 @@ void bindPyMslShaderGenerator(py::module& mod) .def(py::init<>()) .def("generate", &mx::MslShaderGenerator::generate) .def("getTarget", &mx::MslShaderGenerator::getTarget) - .def("getVersion", &mx::MslShaderGenerator::getVersion); + .def("getVersion", &mx::MslShaderGenerator::getVersion) + .doc() = R"docstring( + Base class for MSL (Metal Shading Language) code generation. + A generator for a specific MSL target should be derived from this class. +)docstring"; } void bindPyMslResourceBindingContext(py::module &mod) @@ -33,5 +37,8 @@ void bindPyMslResourceBindingContext(py::module &mod) .def_static("create", &mx::MslResourceBindingContext::create) .def(py::init()) .def("emitDirectives", &mx::MslResourceBindingContext::emitDirectives) - .def("emitResourceBindings", &mx::MslResourceBindingContext::emitResourceBindings); + .def("emitResourceBindings", &mx::MslResourceBindingContext::emitResourceBindings) + .doc() = R"docstring( + Class representing a resource binding for MSL shader resources. +)docstring"; }