-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
242 lines (201 loc) · 16.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>MaterialX Python API Documentation — MaterialX 1.39.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b20cc3f5" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=686e5160" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=d8f72ed4" />
<script src="_static/documentation_options.js?v=e2b5d38d"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="MaterialX Overview" href="MainPage.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="materialx-python-api-documentation">
<h1>MaterialX Python API Documentation<a class="headerlink" href="#materialx-python-api-documentation" title="Link to this heading">¶</a></h1>
<p>The <a class="reference internal" href="#materialx-python-api">MaterialX Python API</a> provides Python bindings for the
<a class="reference external" href="https://materialx.org/docs/api/">MaterialX C++ API</a> .</p>
<p>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 <a class="reference external" href="https://www.ilm.com/">Industrial Light & Magic</a> in 2012, MaterialX has been a key technology in their
feature films and real-time experiences since <em>Star Wars: The Force Awakens</em>
and <em>Millennium Falcon: Smugglers Run</em>. 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 <a class="reference external" href="https://www.aswf.io/">Academy Software Foundation</a> .</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="MainPage.html">MaterialX Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="GraphEditor.html">MaterialX Graph Editor</a></li>
<li class="toctree-l1"><a class="reference internal" href="Viewer.html">MaterialX Viewer</a></li>
<li class="toctree-l1"><a class="reference internal" href="ShaderGeneration.html">Shader Generation</a></li>
</ul>
</div>
<section id="materialx-python-api">
<h2>MaterialX Python API<a class="headerlink" href="#materialx-python-api" title="Link to this heading">¶</a></h2>
<p>The MaterialX Python API consists of two parts:</p>
<ul class="simple">
<li><p>A set of <a class="reference internal" href="#materialx-python-modules">MaterialX Python Modules</a> that are implemented as Python C
extensions that correspond to MaterialX C++ libraries.</p></li>
<li><p>A Python package named <code class="xref py py-obj docutils literal notranslate"><span class="pre">MaterialX</span></code> that wraps the MaterialX Python modules to
provide a more pythonic interface, in particular for working with the
<a class="reference external" href="generated/PyMaterialXCore.html#element-classes">Element Classes</a> and
<a class="reference external" href="generated/PyMaterialXCore.html#value-classes">Value Classes</a> of
<a class="reference internal" href="generated/PyMaterialXCore.html#module-PyMaterialXCore" title="PyMaterialXCore"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXCore</span></code></a>.</p></li>
</ul>
<p>The <code class="xref py py-obj docutils literal notranslate"><span class="pre">MaterialX</span></code> Python package is typically imported aliased as <code class="xref py py-obj docutils literal notranslate"><span class="pre">mx</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">MaterialX</span> <span class="k">as</span> <span class="nn">mx</span>
</pre></div>
</div>
<p>All functions and classes from the <a class="reference internal" href="generated/PyMaterialXCore.html#module-PyMaterialXCore" title="PyMaterialXCore"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXCore</span></code></a> and <a class="reference internal" href="generated/PyMaterialXFormat.html#module-PyMaterialXFormat" title="PyMaterialXFormat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXFormat</span></code></a>
modules are available in the top-level <code class="xref py py-obj docutils literal notranslate"><span class="pre">MaterialX</span></code> namespace, and, by aliasing,
the <code class="xref py py-obj docutils literal notranslate"><span class="pre">mx</span></code> namespace.</p>
<p>For example, the <a class="reference internal" href="generated/PyMaterialXCore.Matrix44.html#PyMaterialXCore.Matrix44" title="PyMaterialXCore.Matrix44"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXCore.Matrix44</span></code></a> class is typically used as
<code class="xref py py-obj docutils literal notranslate"><span class="pre">mx.Matrix44</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">MaterialX</span> <span class="k">as</span> <span class="nn">mx</span>
<span class="gp">>>> </span><span class="n">mx</span><span class="o">.</span><span class="n">Matrix44</span>
<span class="go"><class 'MaterialX.PyMaterialXCore.Matrix44'></span>
</pre></div>
</div>
<p>You can use the <em>Quick search</em> box in the sidebar on the left to quickly find
documentation for a particular module, function, class, method, or attribute of
interest, for example <a class="reference external" href="search.html?q=getUdimCoordinates">getUdimCoordinates</a>
or <a class="reference external" href="search.html?q=MeshPartition">MeshPartition</a>.</p>
</section>
<section id="materialx-python-modules">
<h2>MaterialX Python Modules<a class="headerlink" href="#materialx-python-modules" title="Link to this heading">¶</a></h2>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/PyMaterialXCore.html#module-PyMaterialXCore" title="PyMaterialXCore"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXCore</span></code></a></p></td>
<td><p>Core MaterialX elements and graph traversal.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/PyMaterialXFormat.html#module-PyMaterialXFormat" title="PyMaterialXFormat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXFormat</span></code></a></p></td>
<td><p>Cross-platform support for document serialization and file utilities.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/PyMaterialXGenShader.html#module-PyMaterialXGenShader" title="PyMaterialXGenShader"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXGenShader</span></code></a></p></td>
<td><p>Core shader generation support for MaterialX.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/PyMaterialXGenGlsl.html#module-PyMaterialXGenGlsl" title="PyMaterialXGenGlsl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXGenGlsl</span></code></a></p></td>
<td><p>Shader generation using the OpenGL Shading Language.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/PyMaterialXGenOsl.html#module-PyMaterialXGenOsl" title="PyMaterialXGenOsl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXGenOsl</span></code></a></p></td>
<td><p>Shader generation using Open Shading Language.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/PyMaterialXGenMdl.html#module-PyMaterialXGenMdl" title="PyMaterialXGenMdl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXGenMdl</span></code></a></p></td>
<td><p>Shader generation using the Material Definition Language.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/PyMaterialXGenMsl.html#module-PyMaterialXGenMsl" title="PyMaterialXGenMsl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXGenMsl</span></code></a></p></td>
<td><p>Shader generation using the Metal Shading Language.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/PyMaterialXRender.html#module-PyMaterialXRender" title="PyMaterialXRender"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXRender</span></code></a></p></td>
<td><p>Core rendering support for MaterialX.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/PyMaterialXRenderGlsl.html#module-PyMaterialXRenderGlsl" title="PyMaterialXRenderGlsl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXRenderGlsl</span></code></a></p></td>
<td><p>Rendering support for the OpenGL Shading Language.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/PyMaterialXRenderOsl.html#module-PyMaterialXRenderOsl" title="PyMaterialXRenderOsl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXRenderOsl</span></code></a></p></td>
<td><p>Rendering support for Open Shading Language.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/PyMaterialXRenderMsl.html#module-PyMaterialXRenderMsl" title="PyMaterialXRenderMsl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PyMaterialXRenderMsl</span></code></a></p></td>
<td><p>Rendering support for the Metal Shading Language.</p></td>
</tr>
</tbody>
</table>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="genindex.html">Index</a></li>
</ul>
</div>
</section>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="#">
<img class="logo" src="_static/MaterialXLogo_200x155.png" alt="Logo" />
</a>
</p>
<p class="blurb">
<b>MaterialX</b> – An open standard for the exchange of rich material and
look-development content across applications and renderers.
<p>
<a title="MaterialX on GitHub" class="blueButton" href="https://github.com/AcademySoftwareFoundation/MaterialX">GitHub</a>
<a title="MaterialX on Mastodon" class="blueButton" href="https://mastodon.social/@MaterialX@fosstodon.org">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
alt="MaterialX on Mastodon" title="MaterialX on Mastodon" viewBox="0 0 24 24"
width="16" height="16" style="vertical-align: text-top;">
<title>MaterialX on Mastodon</title>
<g transform="translate(-1, 0) scale(0.32, 0.32)" fill="#d2dbde">
<path d="M74.7135 16.6043C73.6199 8.54587 66.5351 2.19527 58.1366 0.964691C56.7196 0.756754 51.351 0 38.9148 0H38.822C26.3824 0 23.7135 0.756754 22.2966 0.964691C14.1319 2.16118 6.67571 7.86752 4.86669 16.0214C3.99657 20.0369 3.90371 24.4888 4.06535 28.5726C4.29578 34.4289 4.34049 40.275 4.877 46.1075C5.24791 49.9817 5.89495 53.8251 6.81328 57.6088C8.53288 64.5968 15.4938 70.4122 22.3138 72.7848C29.6155 75.259 37.468 75.6697 44.9919 73.971C45.8196 73.7801 46.6381 73.5586 47.4475 73.3063C49.2737 72.7302 51.4164 72.086 52.9915 70.9542C53.0131 70.9384 53.0308 70.9178 53.0433 70.8942C53.0558 70.8706 53.0628 70.8445 53.0637 70.8179V65.1661C53.0634 65.1412 53.0574 65.1167 53.0462 65.0944C53.035 65.0721 53.0189 65.0525 52.9992 65.0371C52.9794 65.0218 52.9564 65.011 52.9318 65.0056C52.9073 65.0002 52.8819 65.0003 52.8574 65.0059C48.0369 66.1472 43.0971 66.7193 38.141 66.7103C29.6118 66.7103 27.3178 62.6981 26.6609 61.0278C26.1329 59.5842 25.7976 58.0784 25.6636 56.5486C25.6622 56.5229 25.667 56.4973 25.6775 56.4738C25.688 56.4502 25.7039 56.4295 25.724 56.4132C25.7441 56.397 25.7678 56.3856 25.7931 56.3801C25.8185 56.3746 25.8448 56.3751 25.8699 56.3816C30.6101 57.5151 35.4693 58.0873 40.3455 58.086C41.5183 58.086 42.6876 58.086 43.8604 58.0553C48.7647 57.919 53.9339 57.6701 58.7591 56.7361C58.8794 56.7123 58.9998 56.6918 59.103 56.6611C66.7139 55.2124 73.9569 50.665 74.6929 39.1501C74.7204 38.6967 74.7892 34.4016 74.7892 33.9312C74.7926 32.3325 75.3085 22.5901 74.7135 16.6043ZM62.9996 45.3371H54.9966V25.9069C54.9966 21.8163 53.277 19.7302 49.7793 19.7302C45.9343 19.7302 44.0083 22.1981 44.0083 27.0727V37.7082H36.0534V27.0727C36.0534 22.1981 34.124 19.7302 30.279 19.7302C26.8019 19.7302 25.0651 21.8163 25.0617 25.9069V45.3371H17.0656V25.3172C17.0656 21.2266 18.1191 17.9769 20.2262 15.568C22.3998 13.1648 25.2509 11.9308 28.7898 11.9308C32.8859 11.9308 35.9812 13.492 38.0447 16.6111L40.036 19.9245L42.0308 16.6111C44.0943 13.492 47.1896 11.9308 51.2788 11.9308C54.8143 11.9308 57.6654 13.1648 59.8459 15.568C61.9529 17.9746 63.0065 21.2243 63.0065 25.3172L62.9996 45.3371Z"></path>
</g>
</svg>
</a>
</p>
</p>
<h3>Navigation</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="MainPage.html">MaterialX Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="GraphEditor.html">MaterialX Graph Editor</a></li>
<li class="toctree-l1"><a class="reference internal" href="Viewer.html">MaterialX Viewer</a></li>
<li class="toctree-l1"><a class="reference internal" href="ShaderGeneration.html">Shader Generation</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">MaterialX Python Modules:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXCore.html">PyMaterialXCore</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXFormat.html">PyMaterialXFormat</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXGenShader.html">PyMaterialXGenShader</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXGenGlsl.html">PyMaterialXGenGlsl</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXGenOsl.html">PyMaterialXGenOsl</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXGenMdl.html">PyMaterialXGenMdl</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXGenMsl.html">PyMaterialXGenMsl</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXRender.html">PyMaterialXRender</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXRenderGlsl.html">PyMaterialXRenderGlsl</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXRenderOsl.html">PyMaterialXRenderOsl</a></li>
<li class="toctree-l1"><a class="reference internal" href="generated/PyMaterialXRenderMsl.html">PyMaterialXRenderMsl</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="genindex.html">Index</a></li>
</ul>
<hr />
<ul>
<li class="toctree-l1"><a href="https://materialx.org/">MaterialX.org</a></li>
<li class="toctree-l1"><a href="https://materialx.org/docs/api/index.html">MaterialX C++ API Docs</a></li>
<li class="toctree-l1"><a href="https://materialx.org/Specification.html">MaterialX Specification</a></li>
</ul>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2024 MaterialX Authors.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.2</a>
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
<a href="_sources/index.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>