+
+
+◆ end_headers()
+
+
+
+
+
+ def myserver.MyHTTPRequestHandler.end_headers |
+ ( |
+ |
+ self | ) |
+ |
+
+
+
+
+
Definition at line 8 of file myserver.py.
+
8 def end_headers(self):
+
9 self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
+
10 self.send_header("Pragma", "no-cache")
+
11 self.send_header("Expires", "0")
+
12 super().end_headers()
+
13
+
+
+
+
The documentation for this class was generated from the following file:
@@ -116,7 +148,7 @@
diff --git a/documents/html/classmyserver_1_1_my_h_t_t_p_request_handler.png b/documents/html/classmyserver_1_1_my_h_t_t_p_request_handler.png
index fdd0259..453e2a2 100644
Binary files a/documents/html/classmyserver_1_1_my_h_t_t_p_request_handler.png and b/documents/html/classmyserver_1_1_my_h_t_t_p_request_handler.png differ
diff --git a/documents/html/dir_0e7a2bf207642fde32bb2644c27b5ffb.js b/documents/html/dir_0e7a2bf207642fde32bb2644c27b5ffb.js
new file mode 100644
index 0000000..e277716
--- /dev/null
+++ b/documents/html/dir_0e7a2bf207642fde32bb2644c27b5ffb.js
@@ -0,0 +1,4 @@
+var dir_0e7a2bf207642fde32bb2644c27b5ffb =
+[
+ [ "JsMaterialXPhysicallyBased.js", "_js_material_x_physically_based_8js_source.html", null ]
+];
\ No newline at end of file
diff --git a/documents/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/documents/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js
new file mode 100644
index 0000000..34ca4df
--- /dev/null
+++ b/documents/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js
@@ -0,0 +1,4 @@
+var dir_68267d1309a1af8e8297ef4c3efbcdba =
+[
+ [ "materialxMaterials", "dir_ed2309c38062a0ffa21222134f4047e1.html", "dir_ed2309c38062a0ffa21222134f4047e1" ]
+];
\ No newline at end of file
diff --git a/documents/html/dir_ed2309c38062a0ffa21222134f4047e1.js b/documents/html/dir_ed2309c38062a0ffa21222134f4047e1.js
new file mode 100644
index 0000000..5257a07
--- /dev/null
+++ b/documents/html/dir_ed2309c38062a0ffa21222134f4047e1.js
@@ -0,0 +1,9 @@
+var dir_ed2309c38062a0ffa21222134f4047e1 =
+[
+ [ "__init__.py", "____init_____8py_source.html", null ],
+ [ "__main__.py", "____main_____8py_source.html", null ],
+ [ "GPUOpenLoader.py", "_g_p_u_open_loader_8py_source.html", null ],
+ [ "GPUOpenLoaderCmd.py", "_g_p_u_open_loader_cmd_8py_source.html", null ],
+ [ "physicallyBasedMaterialX.py", "physically_based_material_x_8py_source.html", null ],
+ [ "physicallyBasedMaterialXCmd.py", "physically_based_material_x_cmd_8py_source.html", null ]
+];
\ No newline at end of file
diff --git a/documents/html/docd.png b/documents/html/docd.png
new file mode 100644
index 0000000..d7c94fd
Binary files /dev/null and b/documents/html/docd.png differ
diff --git a/documents/html/files.html b/documents/html/files.html
index 9393c09..ea301d1 100644
--- a/documents/html/files.html
+++ b/documents/html/files.html
@@ -94,8 +94,8 @@
__main__.py | |
GPUOpenLoader.py | |
GPUOpenLoaderCmd.py | |
- JsMaterialXPhysicallyBased.js | |
- myserver.py | |
+ JsGPUOpenLoader.js | |
+ JsMaterialXPhysicallyBased.js | |
physicallyBasedMaterialX.py | |
physicallyBasedMaterialXCmd.py | |
diff --git a/documents/html/files_dup.js b/documents/html/files_dup.js
index d704c23..ea7f2b3 100644
--- a/documents/html/files_dup.js
+++ b/documents/html/files_dup.js
@@ -4,8 +4,8 @@ var files_dup =
[ "__main__.py", "____main_____8py_source.html", null ],
[ "GPUOpenLoader.py", "_g_p_u_open_loader_8py_source.html", null ],
[ "GPUOpenLoaderCmd.py", "_g_p_u_open_loader_cmd_8py_source.html", null ],
+ [ "JsGPUOpenLoader.js", "_js_g_p_u_open_loader_8js_source.html", null ],
[ "JsMaterialXPhysicallyBased.js", "_js_material_x_physically_based_8js_source.html", null ],
- [ "myserver.py", "myserver_8py_source.html", null ],
[ "physicallyBasedMaterialX.py", "physically_based_material_x_8py_source.html", null ],
[ "physicallyBasedMaterialXCmd.py", "physically_based_material_x_cmd_8py_source.html", null ]
];
\ No newline at end of file
diff --git a/documents/html/hierarchy.html b/documents/html/hierarchy.html
index 71d1185..f0d1bd3 100644
--- a/documents/html/hierarchy.html
+++ b/documents/html/hierarchy.html
@@ -1,9 +1,9 @@
-
+
-
-
+
+
MaterialXMaterials: Class Hierarchy
@@ -24,10 +24,9 @@
-
-
- MaterialXMaterials
- 0.0.1
+
+
+ MaterialXMaterials 0.0.1
Utilities for retrieving materials from remote servers
|
@@ -36,21 +35,22 @@
|
-
+
+/* @license-end */
+
@@ -64,7 +64,7 @@
@@ -78,22 +78,28 @@
-
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
@@ -102,7 +108,7 @@
diff --git a/documents/html/index.html b/documents/html/index.html
index b0951b2..0e89fc8 100644
--- a/documents/html/index.html
+++ b/documents/html/index.html
@@ -99,6 +99,7 @@
The Python utilities require:
- The MaterialX 1.39 or greater package for PhysicallyBased OpenPBR shader creation
- The
requests
package.
+- The
pillow
package for image handling for GPUOpen package handling
Building
pip install .
diff --git a/documents/html/menudata.js b/documents/html/menudata.js
index 9e7fb09..f3f143b 100644
--- a/documents/html/menudata.js
+++ b/documents/html/menudata.js
@@ -29,7 +29,6 @@ var menudata={children:[
{text:"Classes",url:"annotated.html",children:[
{text:"Class List",url:"annotated.html"},
{text:"Class Index",url:"classes.html"},
-{text:"Class Hierarchy",url:"hierarchy.html"},
{text:"Class Members",url:"functions.html",children:[
{text:"All",url:"functions.html",children:[
{text:"_",url:"functions.html#index__5F"},
diff --git a/documents/html/myserver_8py_source.html b/documents/html/myserver_8py_source.html
index 070e2d8..212e243 100644
--- a/documents/html/myserver_8py_source.html
+++ b/documents/html/myserver_8py_source.html
@@ -1,9 +1,9 @@
-
+
-
-
+
+
MaterialXMaterials: myserver.py Source File
@@ -24,10 +24,9 @@
-
-
- MaterialXMaterials
- 0.0.1
+
+
+ MaterialXMaterials 0.0.1
Utilities for retrieving materials from remote servers
|
@@ -36,21 +35,22 @@
|
-
+
+/* @license-end */
+
@@ -64,7 +64,7 @@
@@ -78,43 +78,49 @@
-
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
-
-
-
-
-
-
-
9 self.send_header(
"Cache-Control",
"no-cache, no-store, must-revalidate")
-
10 self.send_header(
"Pragma",
"no-cache")
-
11 self.send_header(
"Expires",
"0")
-
-
-
14 def signal_handler(sig, frame):
-
15 print(
'Exiting server...')
-
-
-
-
19 signal.signal(signal.SIGINT, signal_handler)
-
-
21 print(
"Serving at port: ", PORT)
-
22 with socketserver.TCPServer((
"", PORT), MyHTTPRequestHandler)
as httpd:
-
-
-
25 except KeyboardInterrupt:
-
-
+
+
+
+
+
+
+
+
+
9 self.send_header(
"Cache-Control",
"no-cache, no-store, must-revalidate")
+
10 self.send_header(
"Pragma",
"no-cache")
+
11 self.send_header(
"Expires",
"0")
+
+
+
14def signal_handler(sig, frame):
+
15 print(
'Exiting server...')
+
+
+
+
19signal.signal(signal.SIGINT, signal_handler)
+
+
21print(
"Serving at port: ", PORT)
+
22with socketserver.TCPServer((
"", PORT), MyHTTPRequestHandler)
as httpd:
+
+
+
25 except KeyboardInterrupt:
+
+
@@ -123,7 +129,7 @@
diff --git a/documents/html/namespaces.html b/documents/html/namespaces.html
index b0f9175..182900e 100644
--- a/documents/html/namespaces.html
+++ b/documents/html/namespaces.html
@@ -98,8 +98,6 @@
▼NphysicallyBasedMaterialX | Class to load Physically Based Materials from the PhysicallyBased site |
CPhysicallyBasedMaterialLoader | Class to load Physically Based Materials from the PhysicallyBased site |
NphysicallyBasedMaterialXCmd | |
-
▼Nmyserver | |
-
CMyHTTPRequestHandler | |
diff --git a/documents/html/namespaces_dup.js b/documents/html/namespaces_dup.js
index 269d7d4..8e94be5 100644
--- a/documents/html/namespaces_dup.js
+++ b/documents/html/namespaces_dup.js
@@ -13,10 +13,5 @@ var namespaces_dup =
[ "physicallBasedMaterialXCmd", "physically_based_material_x_cmd_8py.html#a962926b309ce16afa06401e2549c4f77", null ]
] ],
[ "__version__", "____init_____8py.html#a0a3e35178588ad1393c61d4b0b4952d3", null ]
- ] ],
- [ "myserver", null, [
- [ "MyHTTPRequestHandler", "classmyserver_1_1_my_h_t_t_p_request_handler.html", "classmyserver_1_1_my_h_t_t_p_request_handler" ],
- [ "signal_handler", "myserver_8py.html#a191864830612a53884eaf67ea50f9358", null ],
- [ "PORT", "myserver_8py.html#ae64865fb0c0c5b2daccffaa0caf57b0b", null ]
] ]
];
\ No newline at end of file
diff --git a/documents/html/nav_fd.png b/documents/html/nav_fd.png
new file mode 100644
index 0000000..032fbdd
Binary files /dev/null and b/documents/html/nav_fd.png differ
diff --git a/documents/html/nav_hd.png b/documents/html/nav_hd.png
new file mode 100644
index 0000000..de80f18
Binary files /dev/null and b/documents/html/nav_hd.png differ
diff --git a/documents/html/navtreedata.js b/documents/html/navtreedata.js
index e99b441..cb7632e 100644
--- a/documents/html/navtreedata.js
+++ b/documents/html/navtreedata.js
@@ -31,7 +31,6 @@ var NAVTREE =
[ "Classes", "annotated.html", [
[ "Class List", "annotated.html", "annotated_dup" ],
[ "Class Index", "classes.html", null ],
- [ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
[ "Class Members", "functions.html", [
[ "All", "functions.html", null ],
[ "Functions", "functions_func.html", null ],
@@ -46,7 +45,7 @@ var NAVTREE =
var NAVTREEINDEX =
[
-"____init_____8py.html#a0a3e35178588ad1393c61d4b0b4952d3"
+""
];
var SYNCONMSG = 'click to disable panel synchronisation';
diff --git a/documents/html/navtreeindex0.js b/documents/html/navtreeindex0.js
index e87919e..476b959 100644
--- a/documents/html/navtreeindex0.js
+++ b/documents/html/navtreeindex0.js
@@ -1,5 +1,9 @@
var NAVTREEINDEX0 =
{
+"":[0,0,0],
+"":[0,0,0,0],
+"":[0,0,0,2],
+"":[0,0,0,4],
"____init_____8py.html#a0a3e35178588ad1393c61d4b0b4952d3":[0,0,0,5],
"____init_____8py_source.html":[2,0,0],
"____main_____8py.html#acd7f5fefcd7146c6dd868607d85c04f7":[0,0,0,0,0],
@@ -7,8 +11,14 @@ var NAVTREEINDEX0 =
"_g_p_u_open_loader_8py_source.html":[2,0,2],
"_g_p_u_open_loader_cmd_8py.html#acba9ba30ffec65ce6e1120f01a32b4b1":[0,0,0,2,0],
"_g_p_u_open_loader_cmd_8py_source.html":[2,0,3],
-"_js_material_x_physically_based_8js_source.html":[2,0,4],
+"_js_g_p_u_open_loader_8js_source.html":[2,0,4],
+"_js_material_x_physically_based_8js_source.html":[2,0,5],
"annotated.html":[1,0],
+"class_g_p_u_open_material_loader.html":[1,0,1],
+"class_g_p_u_open_material_loader.html#a4155c2fcf6b2c38088f85c63e933aef9":[1,0,1,0],
+"class_g_p_u_open_material_loader.html#a44ccdf25c1654dd628e8351889298e83":[1,0,1,2],
+"class_g_p_u_open_material_loader.html#aa20236461b74f2fd756649fa63757f05":[1,0,1,3],
+"class_g_p_u_open_material_loader.html#ae420983c6072cceb216459ed5ab2a2aa":[1,0,1,1],
"class_js_physically_based_material_loader.html":[1,0,2],
"class_js_physically_based_material_loader.html#a0ff670b529d0d01fe96d6e7d656c8f2a":[1,0,2,12],
"class_js_physically_based_material_loader.html#a19ba3f660663b91ec2be3fe81b45b2b4":[1,0,2,14],
@@ -81,27 +91,16 @@ var NAVTREEINDEX0 =
"classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ae10fc6e2a8a66c4e09ad3f6b5dc320f3":[1,0,0,1,0,22],
"classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ae9e0898cb48b3c163eeea4e7c035cc92":[1,0,0,1,0,1],
"classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aec5e05618ea141395f94a2ecc897ab96":[1,0,0,1,0,15],
-"classmyserver_1_1_my_h_t_t_p_request_handler.html":[1,0,1,0],
-"classmyserver_1_1_my_h_t_t_p_request_handler.html#a2d03d79df5573d7b5948be8039e744b8":[1,0,1,0,0],
"files.html":[2,0],
-"functions.html":[1,3,0],
-"functions_func.html":[1,3,1],
-"functions_vars.html":[1,3,2],
-"hierarchy.html":[1,2],
+"functions.html":[1,2,0],
+"functions_func.html":[1,2,1],
+"functions_vars.html":[1,2,2],
"index.html":[],
-"myserver_8py.html#a191864830612a53884eaf67ea50f9358":[0,0,1,1],
-"myserver_8py.html#ae64865fb0c0c5b2daccffaa0caf57b0b":[0,0,1,2],
-"myserver_8py_source.html":[2,0,5],
"namespacematerialx_materials_1_1_g_p_u_open_loader.html":[0,0,0,1],
"namespacematerialx_materials_1_1physically_based_material_x.html":[0,0,0,3],
"namespaces.html":[0,0],
"pages.html":[],
"physically_based_material_x_8py_source.html":[2,0,6],
"physically_based_material_x_cmd_8py.html#a962926b309ce16afa06401e2549c4f77":[0,0,0,4,0],
-"physically_based_material_x_cmd_8py_source.html":[2,0,7],
-"":[0,0,1],
-"":[0,0,0,0],
-"":[0,0,0],
-"":[0,0,0,4],
-"":[0,0,0,2]
+"physically_based_material_x_cmd_8py_source.html":[2,0,7]
};
diff --git a/documents/html/physically_based_material_x_8py_source.html b/documents/html/physically_based_material_x_8py_source.html
index 2a5f75f..3bb8652 100644
--- a/documents/html/physically_based_material_x_8py_source.html
+++ b/documents/html/physically_based_material_x_8py_source.html
@@ -182,333 +182,359 @@
93 'ior':
'specular_IOR',
- 95 'thinFilmIor' :
'thin_film_IOR',
- 96 'thinFilmThickness' :
'thin_film_thickness',
- 97 'transmissionDispersion' :
'transmission_dispersion',
-
-
- 100 openpbr_remapKeys = {
- 101 'color':
'base_color',
- 102 'specularColor':
'specular_color',
- 103 'roughness':
'specular_roughness',
- 104 'metalness':
'base_metalness',
- 105 'ior':
'specular_ior',
- 106 'transmission':
'transmission_weight',
- 107 'subsurfaceRadius':
'subsurface_radius',
- 108 'thinFilmIor' :
'thinfilm_ior',
- 109 'thinFilmThickness' :
'thinfilm_thickness',
- 110 'transmissionDispersion' :
'transmission_dispersion_scale',
-
-
-
- 114 'color':
'base_color',
- 115 'specularColor':
'specular_color',
- 116 'roughness':
'roughness',
- 117 'metalness':
'metallic',
-
-
-
-
-
- 123 self.
remapMapremapMap[
'standard_surface'] = standard_surface_remapKeys;
- 124 self.
remapMapremapMap[
'gltf_pbr'] = gltf_remapKeys;
-
- 126 self.
remapMapremapMap[
'open_pbr_surface'] = openpbr_remapKeys;
-
-
- 129 ''' Get the JSON object representing the Physically Based Materials '''
-
-
-
-
- 134 Get the list of material names from the JSON object
- 135 @return The list of material names
-
-
-
-
-
- 141 Get the MaterialX document
- 142 @return The MaterialX document
-
-
-
-
-
- 148 @brief Load the Physically Based Materials from a JSON file
- 149 @param fileName The filename to load the JSON file from
- 150 @return The JSON object representing the Physically Based Materials
-
-
-
- 154 if not os.path.exists(fileName):
- 155 self.
loggerlogger.error(f
'> File does not exist: {fileName}')
-
-
- 158 with open(fileName,
'r')
as json_file:
- 159 self.
materialsmaterials = json.load(json_file)
-
-
-
-
-
-
-
- 167 @brief Load the Physically Based Materials from a JSON string
- 168 @param matString The JSON string to load the Physically Based Materials from
- 169 @return The JSON object representing the Physically Based Materials
-
-
-
- 173 self.
materialsmaterials = json.loads(matString)
-
-
-
-
+ 95 'transmission_color':
'transmission_color',
+ 96 'thinFilmIor' :
'thin_film_IOR',
+ 97 'thinFilmThickness' :
'thin_film_thickness',
+ 98 'transmissionDispersion' :
'transmission_dispersion',
+
+
+ 101 openpbr_remapKeys = {
+ 102 'color':
'base_color',
+ 103 'specularColor':
'specular_color',
+ 104 'roughness':
'specular_roughness',
+ 105 'metalness':
'base_metalness',
+ 106 'ior':
'specular_ior',
+ 107 'transmission':
'transmission_weight',
+ 108 'transmission_color':
'transmission_color',
+ 109 'subsurfaceRadius':
'subsurface_radius',
+ 110 'thinFilmIor' :
'thinfilm_ior',
+ 111 'thinFilmThickness' :
'thinfilm_thickness',
+ 112 'transmissionDispersion' :
'transmission_dispersion_scale',
+
+
+
+ 116 'color':
'base_color',
+ 117 'specularColor':
'specular_color',
+ 118 'roughness':
'roughness',
+ 119 'metalness':
'metallic',
+
+
+
+
+
+ 125 self.
remapMapremapMap[
'standard_surface'] = standard_surface_remapKeys;
+ 126 self.
remapMapremapMap[
'gltf_pbr'] = gltf_remapKeys;
+
+ 128 self.
remapMapremapMap[
'open_pbr_surface'] = openpbr_remapKeys;
+
+
+ 131 ''' Get the JSON object representing the Physically Based Materials '''
+
+
+
+
+ 136 Get the list of material names from the JSON object
+ 137 @return The list of material names
+
+
+
+
+
+ 143 Get the MaterialX document
+ 144 @return The MaterialX document
+
+
+
+
+
+ 150 @brief Load the Physically Based Materials from a JSON file
+ 151 @param fileName The filename to load the JSON file from
+ 152 @return The JSON object representing the Physically Based Materials
+
+
+
+ 156 if not os.path.exists(fileName):
+ 157 self.
loggerlogger.error(f
'> File does not exist: {fileName}')
+
+
+ 160 with open(fileName,
'r')
as json_file:
+ 161 self.
materialsmaterials = json.load(json_file)
+
+
+
+
+
+
+
+ 169 @brief Load the Physically Based Materials from a JSON string
+ 170 @param matString The JSON string to load the Physically Based Materials from
+ 171 @return The JSON object representing the Physically Based Materials
+
+
+
+ 175 self.
materialsmaterials = json.loads(matString)
+
+
-
-
- 181 @brief Get the Physically Based Materials from the PhysicallyBased site
- 182 @return The JSON object representing the Physically Based Materials
-
-
-
-
-
-
- 189 'Accept':
'application/json'
-
-
- 192 response = requests.get(url, headers=headers)
+
+
+
+
+ 183 @brief Get the Physically Based Materials from the PhysicallyBased site
+ 184 @return The JSON object representing the Physically Based Materials
+
+
+
+
+
+
+ 191 'Accept':
'application/json'
+
- 194 if response.status_code == HTTPStatus.OK:
- 195 self.
materialsmaterials = response.json()
-
-
-
-
- 200 self.
loggerlogger.error(f
'> Status: {response.status_code}, {response.text}')
-
-
-
-
-
- 206 @brief Print the materials to the console
-
-
-
- 210 self.
loggerlogger.info(
'Material name: ' + mat[
'name'])
-
- 212 for key, value
in mat.items():
- 213 if (key !=
'name' and value):
- 214 self.
loggerlogger.info(f
'> - {key}: {value}')
-
-
-
- 218 @brief Write the materials to a JSON file
- 219 @param filename The filename to write the JSON file to
- 220 @return True if the file was written successfully, otherwise False
-
-
- 223 self.
loggerlogger.warning(
'No materials to write')
-
-
- 226 with open(filename,
'w')
as json_file:
- 227 json.dump(self.
materialsmaterials, json_file, indent=4)
-
-
-
-
-
-
-
- 235 @brief Utility to skip library elements when iterating over elements in a document.
- 236 @return True if the element is not in a library, otherwise False.
-
- 238 return not elem.hasSourceUri()
-
- 240 def _getMethodName(self):
- 241 frame = inspect.currentframe().f_back
- 242 method_name = frame.f_code.co_name
-
-
-
-
-
- 248 @brief Validate the MaterialX document
- 249 @param doc The MaterialX document to validate
- 250 @return A tuple of (valid, errors) where valid is True if the document is valid, and errors is a list of errors if the document is invalid.
-
-
- 253 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
-
-
-
- 257 self.
loggerlogger.warning(f
'> {self._getMethodName()}: MaterialX document is required')
-
-
- 260 valid, errors = doc.validate()
-
-
-
-
- 265 @brief Add a comment to the MaterialX document
- 266 @param doc The MaterialX document to add the comment to
- 267 @param commentString The comment string to add
-
-
- 270 comment = doc.addChildOfCategory(
'comment')
- 271 comment.setDocString(commentString)
-
-
- 274 remapKeys = {}, shaderPreFix ='') -> mx.Document:
-
- 276 @brief Convert the Physically Based Materials to MaterialX format for a given target shading model.
- 277 @param materialNames The list of material names to convert. If empty, all materials will be converted.
- 278 @param shaderCategory The target shading model to convert to. Default is 'standard_surface'.
- 279 @param remapKeys The remapping keys for the target shading model. If empty, the default remapping keys will be used.
- 280 @param shaderPreFix The prefix to add to the shader name. Default is an empty string.
- 281 @return The MaterialX document
-
-
- 284 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
-
-
- 287 if not self.
support_openpbrsupport_openpbr
and shaderCategory ==
'open_pbr_surface':
- 288 self.
loggerlogger.warning(f
'> OpenPBR shading model not supported in MaterialX version {self.mx.getVersionString()}')
-
-
-
- 292 self.
loggerlogger.info(
'> No materials to convert')
-
-
- 295 if len(remapKeys) == 0:
-
- 297 if len(remapKeys) == 0:
- 298 self.
loggerlogger.warning(f
'> No remapping keys found for shading model: {shaderCategory}')
-
-
- 301 self.
docdoc = self.
mxmx.createDocument()
- 302 self.
docdoc.importLibrary(self.
stdlibstdlib)
-
-
- 305 self.
addCommentaddComment(self.
docdoc,
'Physically Based Materials from https://api.physicallybased.info ')
- 306 self.
addCommentaddComment(self.
docdoc,
' Processsed via API and converted to MaterialX ')
- 307 self.
addCommentaddComment(self.
docdoc,
' Target Shading Model: ' + shaderCategory)
- 308 self.
addCommentaddComment(self.
docdoc,
' Utility Author: Bernard Kwok. kwokcb@gmail.com ')
-
-
-
- 312 matName = mat[
'name']
-
-
- 315 if len(materialNames) > 0
and matName
not in materialNames:
-
-
-
- 319 if (len(shaderPreFix) > 0):
- 320 matName = shaderPreFix +
'_' + matName
-
- 322 shaderName = self.
docdoc.createValidChildName(
'SHD_PBM_' + matName)
- 323 self.
addCommentaddComment(self.
docdoc,
' Generated shader: ' + shaderName +
' ')
- 324 shaderNode = self.
docdoc.addNode(shaderCategory, shaderName, self.
mxmx.SURFACE_SHADER_TYPE_STRING)
- 325 docString = mat[
'description']
- 326 refString = mat[
'reference']
- 327 if len(refString) > 0:
- 328 if len(docString) > 0:
-
- 330 docString +=
'Reference: ' + refString[0]
- 331 if len(docString) > 0:
- 332 shaderNode.setDocString(docString)
-
-
-
-
- 337 materialName = self.
docdoc.createValidChildName(
'MAT_PBM_' + matName)
- 338 self.
addCommentaddComment(self.
docdoc,
' Generated material: ' + materialName +
' ')
- 339 materialNode = self.
docdoc.addNode(self.
mxmx.SURFACE_MATERIAL_NODE_STRING, materialName, self.
mxmx.MATERIAL_TYPE_STRING)
- 340 shaderInput = materialNode.addInput(self.
mxmx.SURFACE_SHADER_TYPE_STRING, self.
mxmx.SURFACE_SHADER_TYPE_STRING)
-
-
-
- 344 skipKeys = [
'name',
"density",
"category",
"description",
"sources",
"tags",
"reference"]
-
- 346 for key, value
in mat.items():
- 347 if (key
not in skipKeys):
-
-
- 350 input = shaderNode.addInputFromNodeDef(key)
-
-
- 353 if isinstance(value, list):
- 354 value =
','.join([str(x)
for x
in value])
-
- 356 elif isinstance(value, (int, float)):
-
- 358 input.setValueString(value)
-
-
-
-
-
-
-
- 366 @brief Write the MaterialX document to disk
- 367 @param filename The filename to write the MaterialX document to
-
-
-
- 371 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
-
-
- 374 writeOptions = self.
mxmx.XmlWriteOptions()
- 375 writeOptions.writeXIncludeEnable =
False
-
- 377 self.
mxmx.writeToXmlFile(self.
docdoc, filename, writeOptions)
-
-
-
- 381 @brief Convert the MaterialX document to a string
- 382 @return The MaterialX document as a string
-
-
- 385 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
-
+ 194 response = requests.get(url, headers=headers)
+
+ 196 if response.status_code == HTTPStatus.OK:
+ 197 self.
materialsmaterials = response.json()
+
+
+
+
+ 202 self.
loggerlogger.error(f
'> Status: {response.status_code}, {response.text}')
+
+
+
+
+
+ 208 @brief Print the materials to the console
+
+
+
+ 212 self.
loggerlogger.info(
'Material name: ' + mat[
'name'])
+
+ 214 for key, value
in mat.items():
+ 215 if (key !=
'name' and value):
+ 216 self.
loggerlogger.info(f
'> - {key}: {value}')
+
+
+
+ 220 @brief Write the materials to a JSON file
+ 221 @param filename The filename to write the JSON file to
+ 222 @return True if the file was written successfully, otherwise False
+
+
+ 225 self.
loggerlogger.warning(
'No materials to write')
+
+
+ 228 with open(filename,
'w')
as json_file:
+ 229 json.dump(self.
materialsmaterials, json_file, indent=4)
+
+
+
+
+
+
+
+ 237 @brief Utility to skip library elements when iterating over elements in a document.
+ 238 @return True if the element is not in a library, otherwise False.
+
+ 240 return not elem.hasSourceUri()
+
+ 242 def _getMethodName(self):
+ 243 frame = inspect.currentframe().f_back
+ 244 method_name = frame.f_code.co_name
+
+
+
+
+
+ 250 @brief Validate the MaterialX document
+ 251 @param doc The MaterialX document to validate
+ 252 @return A tuple of (valid, errors) where valid is True if the document is valid, and errors is a list of errors if the document is invalid.
+
+
+ 255 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
+
+
+
+ 259 self.
loggerlogger.warning(f
'> {self._getMethodName()}: MaterialX document is required')
+
+
+ 262 valid, errors = doc.validate()
+
+
+
+
+ 267 @brief Add a comment to the MaterialX document
+ 268 @param doc The MaterialX document to add the comment to
+ 269 @param commentString The comment string to add
+
+
+ 272 comment = doc.addChildOfCategory(
'comment')
+ 273 comment.setDocString(commentString)
+
+
+ 276 remapKeys = {}, shaderPreFix ='') -> mx.Document:
+
+ 278 @brief Convert the Physically Based Materials to MaterialX format for a given target shading model.
+ 279 @param materialNames The list of material names to convert. If empty, all materials will be converted.
+ 280 @param shaderCategory The target shading model to convert to. Default is 'standard_surface'.
+ 281 @param remapKeys The remapping keys for the target shading model. If empty, the default remapping keys will be used.
+ 282 @param shaderPreFix The prefix to add to the shader name. Default is an empty string.
+ 283 @return The MaterialX document
+
+
+ 286 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
+
+
+ 289 if not self.
support_openpbrsupport_openpbr
and shaderCategory ==
'open_pbr_surface':
+ 290 self.
loggerlogger.warning(f
'> OpenPBR shading model not supported in MaterialX version {self.mx.getVersionString()}')
+
+
+
+ 294 self.
loggerlogger.info(
'> No materials to convert')
+
+
+ 297 if len(remapKeys) == 0:
+
+ 299 if len(remapKeys) == 0:
+ 300 self.
loggerlogger.warning(f
'> No remapping keys found for shading model: {shaderCategory}')
+
+
+ 303 self.
docdoc = self.
mxmx.createDocument()
+ 304 self.
docdoc.importLibrary(self.
stdlibstdlib)
+
+
+ 307 self.
addCommentaddComment(self.
docdoc,
'Physically Based Materials from https://api.physicallybased.info ')
+ 308 self.
addCommentaddComment(self.
docdoc,
' Processsed via API and converted to MaterialX ')
+ 309 self.
addCommentaddComment(self.
docdoc,
' Target Shading Model: ' + shaderCategory)
+ 310 self.
addCommentaddComment(self.
docdoc,
' Utility Author: Bernard Kwok. kwokcb@gmail.com ')
+
+
+
+ 314 matName = mat[
'name']
+
+
+ 317 if len(materialNames) > 0
and matName
not in materialNames:
+
+
+
+ 321 if (len(shaderPreFix) > 0):
+ 322 matName = matName +
'_' + shaderPreFix
+
+ 324 shaderName = self.
docdoc.createValidChildName(matName +
'_SHD_PBM')
+ 325 self.
addCommentaddComment(self.
docdoc,
' Generated shader: ' + shaderName +
' ')
+ 326 shaderNode = self.
docdoc.addNode(shaderCategory, shaderName, self.
mxmx.SURFACE_SHADER_TYPE_STRING)
+ 327 docString = mat[
'description']
+ 328 refString = mat[
'reference']
+ 329 if len(refString) > 0:
+ 330 if len(docString) > 0:
+
+ 332 docString +=
'Reference: ' + refString[0]
+ 333 if len(docString) > 0:
+ 334 shaderNode.setDocString(docString)
+
+
+
+
+ 339 materialName = self.
docdoc.createValidChildName(matName +
'_MAT_PBM')
+ 340 self.
addCommentaddComment(self.
docdoc,
' Generated material: ' + materialName +
' ')
+ 341 materialNode = self.
docdoc.addNode(self.
mxmx.SURFACE_MATERIAL_NODE_STRING, materialName, self.
mxmx.MATERIAL_TYPE_STRING)
+ 342 shaderInput = materialNode.addInput(self.
mxmx.SURFACE_SHADER_TYPE_STRING, self.
mxmx.SURFACE_SHADER_TYPE_STRING)
+
+
+
+ 346 skipKeys = [
'name',
"density",
"category",
"description",
"sources",
"tags",
"reference"]
+
+
+
+
+
+ 352 for key, value
in mat.items():
+
+ 354 if (key
not in skipKeys):
+ 355 if key ==
'metalness':
+
+ 357 if key ==
'roughness':
+
+ 359 if key ==
'transmission':
+
+
+
+
+
+
+ 366 input = shaderNode.addInputFromNodeDef(key)
+
+
+ 369 if isinstance(value, list):
+ 370 value =
','.join([str(x)
for x
in value])
+
+ 372 elif isinstance(value, (int, float)):
+
+ 374 input.setValueString(value)
+
+
+
+ 378 if (transmission !=
None)
and (metallness !=
None)
and (roughness !=
None)
and (color !=
None):
+ 379 if (metallness == 0)
and (roughness == 0):
+ 380 if 'transmission_color' in remapKeys:
+ 381 key = remapKeys[
'transmission_color']
+ 382 input = shaderNode.addInputFromNodeDef(key)
+
+ 384 self.
loggerlogger.debug(f
'Set transmission color {key}: {color}')
+ 385 value =
','.join([str(x)
for x
in color])
+ 386 input.setValueString(value)
- 388 writeOptions = self.
mxmx.XmlWriteOptions()
- 389 writeOptions.writeXIncludeEnable =
False
-
- 391 mtlx = self.
mxmx.writeToXmlString(self.
docdoc, writeOptions)
-
+
+
+
+
+ 392 @brief Write the MaterialX document to disk
+ 393 @param filename The filename to write the MaterialX document to
+
+
+
+ 397 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
+
+
+ 400 writeOptions = self.
mxmx.XmlWriteOptions()
+ 401 writeOptions.writeXIncludeEnable =
False
+
+ 403 self.
mxmx.writeToXmlFile(self.
docdoc, filename, writeOptions)
+
+
+
+ 407 @brief Convert the MaterialX document to a string
+ 408 @return The MaterialX document as a string
+
+
+ 411 self.
loggerlogger.critical(f
'> {self._getMethodName()}: MaterialX module is required')
+
+
+ 414 writeOptions = self.
mxmx.XmlWriteOptions()
+ 415 writeOptions.writeXIncludeEnable =
False
+
+ 417 mtlx = self.
mxmx.writeToXmlString(self.
docdoc, writeOptions)
+
Class to load Physically Based Materials from the PhysicallyBased site.
dict getInputRemapping(self, shadingModel)
Get the remapping keys for a given shading model.
-def validateMaterialXDocument(self, doc)
Validate the MaterialX document.
-list getJSONMaterialNames(self)
Get the list of material names from the JSON object.
-dict loadMaterialsFromString(self, matString)
Load the Physically Based Materials from a JSON string.
+def validateMaterialXDocument(self, doc)
Validate the MaterialX document.
+list getJSONMaterialNames(self)
Get the list of material names from the JSON object.
+dict loadMaterialsFromString(self, matString)
Load the Physically Based Materials from a JSON string.
-dict loadMaterialsFromFile(self, fileName)
Load the Physically Based Materials from a JSON file.
+dict loadMaterialsFromFile(self, fileName)
Load the Physically Based Materials from a JSON file.
def setDebugging(self, debug=True)
Set the debugging level for the logger.
def __init__(self, mx_module, mx.Document mx_stdlib=None)
Constructor for the PhysicallyBasedMaterialLoader class.
-
-def convertToMaterialXString(self)
Convert the MaterialX document to a string.
-def printMaterials(self)
Print the materials to the console.
+
+def convertToMaterialXString(self)
Convert the MaterialX document to a string.
+def printMaterials(self)
Print the materials to the console.
-dict getMaterialsFromURL(self)
Get the Physically Based Materials from the PhysicallyBased site.
+dict getMaterialsFromURL(self)
Get the Physically Based Materials from the PhysicallyBased site.
-dict getJSON(self)
Get the JSON object representing the Physically Based Materials.
-mx.Document getMaterialXDocument(self)
Get the MaterialX document.
+dict getJSON(self)
Get the JSON object representing the Physically Based Materials.
+mx.Document getMaterialXDocument(self)
Get the MaterialX document.
def initializeInputRemapping(self)
Initialize remapping keys for different shading models.
-bool skipLibraryElement(elem)
Utility to skip library elements when iterating over elements in a document.
-mx.Document convertToMaterialX(self, materialNames=[], shaderCategory='standard_surface', remapKeys={}, shaderPreFix='')
Convert the Physically Based Materials to MaterialX format for a given target shading model.
-def writeMaterialXToFile(self, filename)
Write the MaterialX document to disk.
+bool skipLibraryElement(elem)
Utility to skip library elements when iterating over elements in a document.
+mx.Document convertToMaterialX(self, materialNames=[], shaderCategory='standard_surface', remapKeys={}, shaderPreFix='')
Convert the Physically Based Materials to MaterialX format for a given target shading model.
+def writeMaterialXToFile(self, filename)
Write the MaterialX document to disk.
-def addComment(self, doc, commentString)
Add a comment to the MaterialX document.
-def writeJSONToFile(self, filename)
Write the materials to a JSON file.
+def addComment(self, doc, commentString)
Add a comment to the MaterialX document.
+def writeJSONToFile(self, filename)
Write the materials to a JSON file.
diff --git a/documents/html/search/all_10.js b/documents/html/search/all_10.js
index 3934b81..aebbd2d 100644
--- a/documents/html/search/all_10.js
+++ b/documents/html/search/all_10.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['validatedocument_42',['validateDocument',['../class_js_physically_based_material_loader.html#af3a192ef1a27b937ab8d5b67eeebb808',1,'JsPhysicallyBasedMaterialLoader']]],
- ['validatematerialxdocument_43',['validateMaterialXDocument',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a0e370e9ac4e8cefa9ab0136067ed55cf',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
+ ['validatedocument_41',['validateDocument',['../class_js_physically_based_material_loader.html#af3a192ef1a27b937ab8d5b67eeebb808',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['validatematerialxdocument_42',['validateMaterialXDocument',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a0e370e9ac4e8cefa9ab0136067ed55cf',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/all_11.js b/documents/html/search/all_11.js
index e023942..563e654 100644
--- a/documents/html/search/all_11.js
+++ b/documents/html/search/all_11.js
@@ -1,8 +1,8 @@
var searchData=
[
- ['writejsontofile_44',['writeJSONToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aec5e05618ea141395f94a2ecc897ab96',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['writematerialfiles_45',['writeMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a547938c19b0d7e814389a4f6e6da3b1d',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['writematerialnamestofile_46',['writeMaterialNamesToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#ad058328e04f5400c5d33c93f4a116ea9',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['writematerialxtofile_47',['writeMaterialXToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#adefb5c1b44257ae287109366909e914c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['writepackagedatatofile_48',['writePackageDataToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a6e21d13a797c2291f867883624ec1e26',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
+ ['writejsontofile_43',['writeJSONToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aec5e05618ea141395f94a2ecc897ab96',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['writematerialfiles_44',['writeMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a547938c19b0d7e814389a4f6e6da3b1d',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['writematerialnamestofile_45',['writeMaterialNamesToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#ad058328e04f5400c5d33c93f4a116ea9',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['writematerialxtofile_46',['writeMaterialXToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#adefb5c1b44257ae287109366909e914c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['writepackagedatatofile_47',['writePackageDataToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a6e21d13a797c2291f867883624ec1e26',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/all_6.js b/documents/html/search/all_6.js
index eeeceb3..e652191 100644
--- a/documents/html/search/all_6.js
+++ b/documents/html/search/all_6.js
@@ -10,5 +10,5 @@ var searchData=
['getmaterialxdocument_16',['getMaterialXDocument',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ab5cb1ede45bf58bfeddb8948fde47a3e',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getMaterialXDocument()'],['../class_js_physically_based_material_loader.html#a50d3f165475f4b6857db44f46b3e24b9',1,'JsPhysicallyBasedMaterialLoader::getMaterialXDocument()']]],
['getmaterialxstring_17',['getMaterialXString',['../class_js_physically_based_material_loader.html#a7dc871ee8d3fc8aa1f5cc1429f27bc7a',1,'JsPhysicallyBasedMaterialLoader']]],
['getphysicallybasedmaterials_18',['getPhysicallyBasedMaterials',['../class_js_physically_based_material_loader.html#a8faa3eec07fd099bb55a65187b07460d',1,'JsPhysicallyBasedMaterialLoader']]],
- ['gpuopenmaterialloader_19',['GPUOpenMaterialLoader',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html',1,'materialxMaterials::GPUOpenLoader']]]
+ ['gpuopenmaterialloader_19',['GPUOpenMaterialLoader',['../class_g_p_u_open_material_loader.html',1,'GPUOpenMaterialLoader'],['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html',1,'materialxMaterials.GPUOpenLoader.GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/all_b.js b/documents/html/search/all_b.js
index 92ba7bd..2623af0 100644
--- a/documents/html/search/all_b.js
+++ b/documents/html/search/all_b.js
@@ -5,6 +5,5 @@ var searchData=
['materials_29',['materials',['../class_js_physically_based_material_loader.html#a57aeca3f4ef045e2f8d844495ea9bcf2',1,'JsPhysicallyBasedMaterialLoader']]],
['mx_30',['mx',['../class_js_physically_based_material_loader.html#aaa493b357111b16358c52bdcd99047b6',1,'JsPhysicallyBasedMaterialLoader']]],
['mxmaterialnames_31',['mxMaterialNames',['../class_js_physically_based_material_loader.html#ab5c494882c44f41a973cd826591c0497',1,'JsPhysicallyBasedMaterialLoader']]],
- ['myhttprequesthandler_32',['MyHTTPRequestHandler',['../classmyserver_1_1_my_h_t_t_p_request_handler.html',1,'myserver']]],
- ['physicallybasedmaterialx_33',['physicallyBasedMaterialX',['../namespacematerialx_materials_1_1physically_based_material_x.html',1,'materialxMaterials']]]
+ ['physicallybasedmaterialx_32',['physicallyBasedMaterialX',['../namespacematerialx_materials_1_1physically_based_material_x.html',1,'materialxMaterials']]]
];
diff --git a/documents/html/search/all_c.js b/documents/html/search/all_c.js
index aa45625..c1ddae8 100644
--- a/documents/html/search/all_c.js
+++ b/documents/html/search/all_c.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['physicallybasedmaterialloader_34',['PhysicallyBasedMaterialLoader',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html',1,'materialxMaterials::physicallyBasedMaterialX']]],
- ['printmaterials_35',['printMaterials',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a836f19e92aeee30884613e4d9e2c4698',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
+ ['physicallybasedmaterialloader_33',['PhysicallyBasedMaterialLoader',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html',1,'materialxMaterials::physicallyBasedMaterialX']]],
+ ['printmaterials_34',['printMaterials',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a836f19e92aeee30884613e4d9e2c4698',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/all_d.js b/documents/html/search/all_d.js
index 0821ec9..9d2a76a 100644
--- a/documents/html/search/all_d.js
+++ b/documents/html/search/all_d.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['readmaterialfiles_36',['readMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#aea6443970a62b7e354441e331e99d962',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['remapmap_37',['remapMap',['../class_js_physically_based_material_loader.html#a547c339e2799cf483f11af5c1883a5ac',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['readmaterialfiles_35',['readMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#aea6443970a62b7e354441e331e99d962',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['remapmap_36',['remapMap',['../class_js_physically_based_material_loader.html#a547c339e2799cf483f11af5c1883a5ac',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/all_e.js b/documents/html/search/all_e.js
index 2c9944e..1d0f288 100644
--- a/documents/html/search/all_e.js
+++ b/documents/html/search/all_e.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['setdebugging_38',['setDebugging',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a55f6fd9b37754a25499353a360f7c85c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['skiplibraryelement_39',['skipLibraryElement',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ad188128fa3e0493c5dcb6bf0a139329f',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.skipLibraryElement()'],['../class_js_physically_based_material_loader.html#a0ff670b529d0d01fe96d6e7d656c8f2a',1,'JsPhysicallyBasedMaterialLoader::skipLibraryElement(element)']]],
- ['stdlib_40',['stdlib',['../class_js_physically_based_material_loader.html#ac5ea5952dab870a8e936f1974b34a8a6',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['setdebugging_37',['setDebugging',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a55f6fd9b37754a25499353a360f7c85c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['skiplibraryelement_38',['skipLibraryElement',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ad188128fa3e0493c5dcb6bf0a139329f',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.skipLibraryElement()'],['../class_js_physically_based_material_loader.html#a0ff670b529d0d01fe96d6e7d656c8f2a',1,'JsPhysicallyBasedMaterialLoader::skipLibraryElement(element)']]],
+ ['stdlib_39',['stdlib',['../class_js_physically_based_material_loader.html#ac5ea5952dab870a8e936f1974b34a8a6',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/all_f.js b/documents/html/search/all_f.js
index 6938319..c9f4e22 100644
--- a/documents/html/search/all_f.js
+++ b/documents/html/search/all_f.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['url_41',['url',['../class_js_physically_based_material_loader.html#abd951385181b05d2e82d28a0d6fe4918',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['url_40',['url',['../class_js_physically_based_material_loader.html#abd951385181b05d2e82d28a0d6fe4918',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/classes_0.js b/documents/html/search/classes_0.js
index 39f8af5..23dd6ce 100644
--- a/documents/html/search/classes_0.js
+++ b/documents/html/search/classes_0.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['gpuopenmaterialloader_49',['GPUOpenMaterialLoader',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html',1,'materialxMaterials::GPUOpenLoader']]]
+ ['gpuopenmaterialloader_48',['GPUOpenMaterialLoader',['../class_g_p_u_open_material_loader.html',1,'GPUOpenMaterialLoader'],['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html',1,'materialxMaterials.GPUOpenLoader.GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/classes_1.js b/documents/html/search/classes_1.js
index 0e9345c..974f4d9 100644
--- a/documents/html/search/classes_1.js
+++ b/documents/html/search/classes_1.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['jsphysicallybasedmaterialloader_50',['JsPhysicallyBasedMaterialLoader',['../class_js_physically_based_material_loader.html',1,'']]]
+ ['jsphysicallybasedmaterialloader_49',['JsPhysicallyBasedMaterialLoader',['../class_js_physically_based_material_loader.html',1,'']]]
];
diff --git a/documents/html/search/classes_2.js b/documents/html/search/classes_2.js
index 1656c62..d2a25ad 100644
--- a/documents/html/search/classes_2.js
+++ b/documents/html/search/classes_2.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['myhttprequesthandler_51',['MyHTTPRequestHandler',['../classmyserver_1_1_my_h_t_t_p_request_handler.html',1,'myserver']]]
+ ['physicallybasedmaterialloader_50',['PhysicallyBasedMaterialLoader',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html',1,'materialxMaterials::physicallyBasedMaterialX']]]
];
diff --git a/documents/html/search/classes_3.js b/documents/html/search/classes_3.js
index cf5b1c9..301d59d 100644
--- a/documents/html/search/classes_3.js
+++ b/documents/html/search/classes_3.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['physicallybasedmaterialloader_52',['PhysicallyBasedMaterialLoader',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html',1,'materialxMaterials::physicallyBasedMaterialX']]]
+ ['physicallybasedmaterialloader_0',['PhysicallyBasedMaterialLoader',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html',1,'materialxMaterials::physicallyBasedMaterialX']]]
];
diff --git a/documents/html/search/functions_0.js b/documents/html/search/functions_0.js
index 8f63b8d..0673abd 100644
--- a/documents/html/search/functions_0.js
+++ b/documents/html/search/functions_0.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['_5f_5finit_5f_5f_55',['__init__',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a562aa01290163eac86d6b7a2a8cb7382',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
+ ['_5f_5finit_5f_5f_53',['__init__',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a562aa01290163eac86d6b7a2a8cb7382',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/functions_1.js b/documents/html/search/functions_1.js
index dd8872e..a6588cb 100644
--- a/documents/html/search/functions_1.js
+++ b/documents/html/search/functions_1.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['addcomment_56',['addComment',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ae9e0898cb48b3c163eeea4e7c035cc92',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.addComment()'],['../class_js_physically_based_material_loader.html#aedfda1b37416f4385f4c29f6671ad5a7',1,'JsPhysicallyBasedMaterialLoader::addComment()']]]
+ ['addcomment_54',['addComment',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ae9e0898cb48b3c163eeea4e7c035cc92',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.addComment()'],['../class_js_physically_based_material_loader.html#aedfda1b37416f4385f4c29f6671ad5a7',1,'JsPhysicallyBasedMaterialLoader::addComment()']]]
];
diff --git a/documents/html/search/functions_2.js b/documents/html/search/functions_2.js
index 57e9c71..be67b66 100644
--- a/documents/html/search/functions_2.js
+++ b/documents/html/search/functions_2.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['constructor_57',['constructor',['../class_js_physically_based_material_loader.html#a5f0042da938b9c18e1906422a61962cb',1,'JsPhysicallyBasedMaterialLoader']]],
- ['converttomaterialx_58',['convertToMaterialX',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ad568a7f8abedc69fb614271dd3faff2a',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.convertToMaterialX()'],['../class_js_physically_based_material_loader.html#ae1e44b5689e8a3d9b434ea9828c9ae9d',1,'JsPhysicallyBasedMaterialLoader::convertToMaterialX()']]],
- ['converttomaterialxstring_59',['convertToMaterialXString',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a7935dfb3fc52dfa51d4ddef5016d28f7',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
+ ['constructor_55',['constructor',['../class_js_physically_based_material_loader.html#a5f0042da938b9c18e1906422a61962cb',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['converttomaterialx_56',['convertToMaterialX',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ad568a7f8abedc69fb614271dd3faff2a',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.convertToMaterialX()'],['../class_js_physically_based_material_loader.html#ae1e44b5689e8a3d9b434ea9828c9ae9d',1,'JsPhysicallyBasedMaterialLoader::convertToMaterialX()']]],
+ ['converttomaterialxstring_57',['convertToMaterialXString',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a7935dfb3fc52dfa51d4ddef5016d28f7',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/functions_3.js b/documents/html/search/functions_3.js
index 7aa9827..8b20a17 100644
--- a/documents/html/search/functions_3.js
+++ b/documents/html/search/functions_3.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['downloadpackage_60',['downloadPackage',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a4f093fe70aa6759e2a137fbff2591c6c',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
+ ['downloadpackage_58',['downloadPackage',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a4f093fe70aa6759e2a137fbff2591c6c',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/functions_4.js b/documents/html/search/functions_4.js
index e4b49ae..6c07a2e 100644
--- a/documents/html/search/functions_4.js
+++ b/documents/html/search/functions_4.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['extractpackagedata_61',['extractPackageData',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#accf473c9f3b11dfe6184228bb45c1234',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
+ ['extractpackagedata_59',['extractPackageData',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#accf473c9f3b11dfe6184228bb45c1234',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/functions_5.js b/documents/html/search/functions_5.js
index 48d9afa..c635f86 100644
--- a/documents/html/search/functions_5.js
+++ b/documents/html/search/functions_5.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['findmaterialsbyname_62',['findMaterialsByName',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a761935f0293fab3ffb6b852ecf543c64',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
+ ['findmaterialsbyname_60',['findMaterialsByName',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a761935f0293fab3ffb6b852ecf543c64',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/functions_6.js b/documents/html/search/functions_6.js
index e119e19..365ecd2 100644
--- a/documents/html/search/functions_6.js
+++ b/documents/html/search/functions_6.js
@@ -1,13 +1,13 @@
var searchData=
[
- ['getinputremapping_63',['getInputRemapping',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a00df7f744ae51556d8f63db4360eef43',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getInputRemapping()'],['../class_js_physically_based_material_loader.html#a4cb1672349161e2f5b4f7f282814e491',1,'JsPhysicallyBasedMaterialLoader::getInputRemapping()']]],
- ['getjson_64',['getJSON',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aae3e6a57ee0e7f49e394a172d87dc410',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getJSON()'],['../class_js_physically_based_material_loader.html#a4eec8fc92b4eec481aaf47dc4a8c19f8',1,'JsPhysicallyBasedMaterialLoader::getJSON()']]],
- ['getjsonmaterialnames_65',['getJSONMaterialNames',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a0fac543d80540406546451822598309e',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getJSONMaterialNames()'],['../class_js_physically_based_material_loader.html#a2920d468eb277062a3be0c9b5a149876',1,'JsPhysicallyBasedMaterialLoader::getJSONMaterialNames()']]],
- ['getmaterialnames_66',['getMaterialNames',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#adacaa6cff169e56b7df3ddb761ffcde0',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['getmaterials_67',['getMaterials',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a19a2e9d18f0191f9576f384d4f3ee4d9',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['getmaterialsasjsonstring_68',['getMaterialsAsJsonString',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a9f18efa789dd3a63ef8cd1abdcd38224',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['getmaterialsfromurl_69',['getMaterialsFromURL',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aa38eb83c67b0f4c139f523450e1de525',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['getmaterialxdocument_70',['getMaterialXDocument',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ab5cb1ede45bf58bfeddb8948fde47a3e',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getMaterialXDocument()'],['../class_js_physically_based_material_loader.html#a50d3f165475f4b6857db44f46b3e24b9',1,'JsPhysicallyBasedMaterialLoader::getMaterialXDocument()']]],
- ['getmaterialxstring_71',['getMaterialXString',['../class_js_physically_based_material_loader.html#a7dc871ee8d3fc8aa1f5cc1429f27bc7a',1,'JsPhysicallyBasedMaterialLoader']]],
- ['getphysicallybasedmaterials_72',['getPhysicallyBasedMaterials',['../class_js_physically_based_material_loader.html#a8faa3eec07fd099bb55a65187b07460d',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['getinputremapping_61',['getInputRemapping',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a00df7f744ae51556d8f63db4360eef43',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getInputRemapping()'],['../class_js_physically_based_material_loader.html#a4cb1672349161e2f5b4f7f282814e491',1,'JsPhysicallyBasedMaterialLoader::getInputRemapping()']]],
+ ['getjson_62',['getJSON',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aae3e6a57ee0e7f49e394a172d87dc410',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getJSON()'],['../class_js_physically_based_material_loader.html#a4eec8fc92b4eec481aaf47dc4a8c19f8',1,'JsPhysicallyBasedMaterialLoader::getJSON()']]],
+ ['getjsonmaterialnames_63',['getJSONMaterialNames',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a0fac543d80540406546451822598309e',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getJSONMaterialNames()'],['../class_js_physically_based_material_loader.html#a2920d468eb277062a3be0c9b5a149876',1,'JsPhysicallyBasedMaterialLoader::getJSONMaterialNames()']]],
+ ['getmaterialnames_64',['getMaterialNames',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#adacaa6cff169e56b7df3ddb761ffcde0',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['getmaterials_65',['getMaterials',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a19a2e9d18f0191f9576f384d4f3ee4d9',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['getmaterialsasjsonstring_66',['getMaterialsAsJsonString',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a9f18efa789dd3a63ef8cd1abdcd38224',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['getmaterialsfromurl_67',['getMaterialsFromURL',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aa38eb83c67b0f4c139f523450e1de525',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['getmaterialxdocument_68',['getMaterialXDocument',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ab5cb1ede45bf58bfeddb8948fde47a3e',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.getMaterialXDocument()'],['../class_js_physically_based_material_loader.html#a50d3f165475f4b6857db44f46b3e24b9',1,'JsPhysicallyBasedMaterialLoader::getMaterialXDocument()']]],
+ ['getmaterialxstring_69',['getMaterialXString',['../class_js_physically_based_material_loader.html#a7dc871ee8d3fc8aa1f5cc1429f27bc7a',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['getphysicallybasedmaterials_70',['getPhysicallyBasedMaterials',['../class_js_physically_based_material_loader.html#a8faa3eec07fd099bb55a65187b07460d',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/functions_7.js b/documents/html/search/functions_7.js
index b17b888..b01bf5f 100644
--- a/documents/html/search/functions_7.js
+++ b/documents/html/search/functions_7.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['initializeinputremapping_73',['initializeInputRemapping',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#abd638d0f058fc0c5b15858c28c759df3',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.initializeInputRemapping()'],['../class_js_physically_based_material_loader.html#a35561414959983ac09c200bd74bacc9a',1,'JsPhysicallyBasedMaterialLoader::initializeInputRemapping()']]]
+ ['initializeinputremapping_71',['initializeInputRemapping',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#abd638d0f058fc0c5b15858c28c759df3',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.initializeInputRemapping()'],['../class_js_physically_based_material_loader.html#a35561414959983ac09c200bd74bacc9a',1,'JsPhysicallyBasedMaterialLoader::initializeInputRemapping()']]]
];
diff --git a/documents/html/search/functions_8.js b/documents/html/search/functions_8.js
index b0e9619..a0f0516 100644
--- a/documents/html/search/functions_8.js
+++ b/documents/html/search/functions_8.js
@@ -1,7 +1,7 @@
var searchData=
[
- ['loadmaterialsfromfile_74',['loadMaterialsFromFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a1695a75528ef0135abd02f6aab93d2c9',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['loadmaterialsfromstring_75',['loadMaterialsFromString',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a14c9374702631d0c03e305fb57b0c45c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['loadmaterialx_76',['loadMaterialX',['../class_js_physically_based_material_loader.html#a61db9877dc4783b689e4091cebcc8de8',1,'JsPhysicallyBasedMaterialLoader']]],
- ['loadstandardlibraries_77',['loadStandardLibraries',['../class_js_physically_based_material_loader.html#a5a31fc8486c2df7204263a0ca9af9410',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['loadmaterialsfromfile_72',['loadMaterialsFromFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a1695a75528ef0135abd02f6aab93d2c9',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['loadmaterialsfromstring_73',['loadMaterialsFromString',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a14c9374702631d0c03e305fb57b0c45c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['loadmaterialx_74',['loadMaterialX',['../class_js_physically_based_material_loader.html#a61db9877dc4783b689e4091cebcc8de8',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['loadstandardlibraries_75',['loadStandardLibraries',['../class_js_physically_based_material_loader.html#a5a31fc8486c2df7204263a0ca9af9410',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/functions_9.js b/documents/html/search/functions_9.js
index 0021ee5..6a58b45 100644
--- a/documents/html/search/functions_9.js
+++ b/documents/html/search/functions_9.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['printmaterials_78',['printMaterials',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a836f19e92aeee30884613e4d9e2c4698',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
+ ['printmaterials_76',['printMaterials',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a836f19e92aeee30884613e4d9e2c4698',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/functions_a.js b/documents/html/search/functions_a.js
index 8d8469d..21b7502 100644
--- a/documents/html/search/functions_a.js
+++ b/documents/html/search/functions_a.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['readmaterialfiles_79',['readMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#aea6443970a62b7e354441e331e99d962',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
+ ['readmaterialfiles_77',['readMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#aea6443970a62b7e354441e331e99d962',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/functions_b.js b/documents/html/search/functions_b.js
index 3e48cdc..1e9713c 100644
--- a/documents/html/search/functions_b.js
+++ b/documents/html/search/functions_b.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['setdebugging_80',['setDebugging',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a55f6fd9b37754a25499353a360f7c85c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['skiplibraryelement_81',['skipLibraryElement',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ad188128fa3e0493c5dcb6bf0a139329f',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.skipLibraryElement()'],['../class_js_physically_based_material_loader.html#a0ff670b529d0d01fe96d6e7d656c8f2a',1,'JsPhysicallyBasedMaterialLoader::skipLibraryElement()']]]
+ ['setdebugging_78',['setDebugging',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a55f6fd9b37754a25499353a360f7c85c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['skiplibraryelement_79',['skipLibraryElement',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#ad188128fa3e0493c5dcb6bf0a139329f',1,'materialxMaterials.physicallyBasedMaterialX.PhysicallyBasedMaterialLoader.skipLibraryElement()'],['../class_js_physically_based_material_loader.html#a0ff670b529d0d01fe96d6e7d656c8f2a',1,'JsPhysicallyBasedMaterialLoader::skipLibraryElement()']]]
];
diff --git a/documents/html/search/functions_c.js b/documents/html/search/functions_c.js
index 6269e7e..8ce3b76 100644
--- a/documents/html/search/functions_c.js
+++ b/documents/html/search/functions_c.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['validatedocument_82',['validateDocument',['../class_js_physically_based_material_loader.html#af3a192ef1a27b937ab8d5b67eeebb808',1,'JsPhysicallyBasedMaterialLoader']]],
- ['validatematerialxdocument_83',['validateMaterialXDocument',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a0e370e9ac4e8cefa9ab0136067ed55cf',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
+ ['validatedocument_80',['validateDocument',['../class_js_physically_based_material_loader.html#af3a192ef1a27b937ab8d5b67eeebb808',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['validatematerialxdocument_81',['validateMaterialXDocument',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#a0e370e9ac4e8cefa9ab0136067ed55cf',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/functions_d.js b/documents/html/search/functions_d.js
index 2976d95..9469e80 100644
--- a/documents/html/search/functions_d.js
+++ b/documents/html/search/functions_d.js
@@ -1,8 +1,8 @@
var searchData=
[
- ['writejsontofile_84',['writeJSONToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aec5e05618ea141395f94a2ecc897ab96',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['writematerialfiles_85',['writeMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a547938c19b0d7e814389a4f6e6da3b1d',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['writematerialnamestofile_86',['writeMaterialNamesToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#ad058328e04f5400c5d33c93f4a116ea9',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
- ['writematerialxtofile_87',['writeMaterialXToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#adefb5c1b44257ae287109366909e914c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
- ['writepackagedatatofile_88',['writePackageDataToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a6e21d13a797c2291f867883624ec1e26',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
+ ['writejsontofile_82',['writeJSONToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#aec5e05618ea141395f94a2ecc897ab96',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['writematerialfiles_83',['writeMaterialFiles',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a547938c19b0d7e814389a4f6e6da3b1d',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['writematerialnamestofile_84',['writeMaterialNamesToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#ad058328e04f5400c5d33c93f4a116ea9',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]],
+ ['writematerialxtofile_85',['writeMaterialXToFile',['../classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html#adefb5c1b44257ae287109366909e914c',1,'materialxMaterials::physicallyBasedMaterialX::PhysicallyBasedMaterialLoader']]],
+ ['writepackagedatatofile_86',['writePackageDataToFile',['../classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html#a6e21d13a797c2291f867883624ec1e26',1,'materialxMaterials::GPUOpenLoader::GPUOpenMaterialLoader']]]
];
diff --git a/documents/html/search/mag.svg b/documents/html/search/mag.svg
new file mode 100644
index 0000000..9f46b30
--- /dev/null
+++ b/documents/html/search/mag.svg
@@ -0,0 +1,37 @@
+
+
diff --git a/documents/html/search/mag_d.svg b/documents/html/search/mag_d.svg
new file mode 100644
index 0000000..b9a814c
--- /dev/null
+++ b/documents/html/search/mag_d.svg
@@ -0,0 +1,37 @@
+
+
diff --git a/documents/html/search/mag_seld.svg b/documents/html/search/mag_seld.svg
new file mode 100644
index 0000000..6e720dc
--- /dev/null
+++ b/documents/html/search/mag_seld.svg
@@ -0,0 +1,74 @@
+
+
+
+
diff --git a/documents/html/search/namespaces_0.js b/documents/html/search/namespaces_0.js
index 978ab54..16333d3 100644
--- a/documents/html/search/namespaces_0.js
+++ b/documents/html/search/namespaces_0.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['gpuopenloader_53',['GPUOpenLoader',['../namespacematerialx_materials_1_1_g_p_u_open_loader.html',1,'materialxMaterials']]],
- ['physicallybasedmaterialx_54',['physicallyBasedMaterialX',['../namespacematerialx_materials_1_1physically_based_material_x.html',1,'materialxMaterials']]]
+ ['gpuopenloader_51',['GPUOpenLoader',['../namespacematerialx_materials_1_1_g_p_u_open_loader.html',1,'materialxMaterials']]],
+ ['physicallybasedmaterialx_52',['physicallyBasedMaterialX',['../namespacematerialx_materials_1_1physically_based_material_x.html',1,'materialxMaterials']]]
];
diff --git a/documents/html/search/pages_0.js b/documents/html/search/pages_0.js
new file mode 100644
index 0000000..900c3be
--- /dev/null
+++ b/documents/html/search/pages_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['materialxmaterials_0',['MaterialXMaterials',['../index.html',1,'']]]
+];
diff --git a/documents/html/search/searchdata.js b/documents/html/search/searchdata.js
index 6399bfc..fb8c62b 100644
--- a/documents/html/search/searchdata.js
+++ b/documents/html/search/searchdata.js
@@ -1,7 +1,7 @@
var indexSectionsWithContent =
{
0: "_acdefghijlmprsuvw",
- 1: "gjmp",
+ 1: "gjp",
2: "m",
3: "_acdefgilprsvw",
4: "dhmrsu"
diff --git a/documents/html/search/variables_0.js b/documents/html/search/variables_0.js
index 16811ed..193ce1a 100644
--- a/documents/html/search/variables_0.js
+++ b/documents/html/search/variables_0.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['doc_89',['doc',['../class_js_physically_based_material_loader.html#a19ba3f660663b91ec2be3fe81b45b2b4',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['doc_87',['doc',['../class_js_physically_based_material_loader.html#a19ba3f660663b91ec2be3fe81b45b2b4',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/variables_1.js b/documents/html/search/variables_1.js
index 19c5a4c..6666b4f 100644
--- a/documents/html/search/variables_1.js
+++ b/documents/html/search/variables_1.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['headers_90',['headers',['../class_js_physically_based_material_loader.html#ab92e487175c47f2d8f2c9ce2f8500765',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['headers_88',['headers',['../class_js_physically_based_material_loader.html#ab92e487175c47f2d8f2c9ce2f8500765',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/variables_2.js b/documents/html/search/variables_2.js
index aa7b16a..f3bcdcc 100644
--- a/documents/html/search/variables_2.js
+++ b/documents/html/search/variables_2.js
@@ -1,7 +1,7 @@
var searchData=
[
- ['materialnames_91',['materialNames',['../class_js_physically_based_material_loader.html#a928e3076af0dcaf80dd46476c854a574',1,'JsPhysicallyBasedMaterialLoader']]],
- ['materials_92',['materials',['../class_js_physically_based_material_loader.html#a57aeca3f4ef045e2f8d844495ea9bcf2',1,'JsPhysicallyBasedMaterialLoader']]],
- ['mx_93',['mx',['../class_js_physically_based_material_loader.html#aaa493b357111b16358c52bdcd99047b6',1,'JsPhysicallyBasedMaterialLoader']]],
- ['mxmaterialnames_94',['mxMaterialNames',['../class_js_physically_based_material_loader.html#ab5c494882c44f41a973cd826591c0497',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['materialnames_89',['materialNames',['../class_js_physically_based_material_loader.html#a928e3076af0dcaf80dd46476c854a574',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['materials_90',['materials',['../class_js_physically_based_material_loader.html#a57aeca3f4ef045e2f8d844495ea9bcf2',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['mx_91',['mx',['../class_js_physically_based_material_loader.html#aaa493b357111b16358c52bdcd99047b6',1,'JsPhysicallyBasedMaterialLoader']]],
+ ['mxmaterialnames_92',['mxMaterialNames',['../class_js_physically_based_material_loader.html#ab5c494882c44f41a973cd826591c0497',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/variables_3.js b/documents/html/search/variables_3.js
index de463de..96c71d8 100644
--- a/documents/html/search/variables_3.js
+++ b/documents/html/search/variables_3.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['remapmap_95',['remapMap',['../class_js_physically_based_material_loader.html#a547c339e2799cf483f11af5c1883a5ac',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['remapmap_93',['remapMap',['../class_js_physically_based_material_loader.html#a547c339e2799cf483f11af5c1883a5ac',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/variables_4.js b/documents/html/search/variables_4.js
index 5411b91..4cdcae9 100644
--- a/documents/html/search/variables_4.js
+++ b/documents/html/search/variables_4.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['stdlib_96',['stdlib',['../class_js_physically_based_material_loader.html#ac5ea5952dab870a8e936f1974b34a8a6',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['stdlib_94',['stdlib',['../class_js_physically_based_material_loader.html#ac5ea5952dab870a8e936f1974b34a8a6',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/search/variables_5.js b/documents/html/search/variables_5.js
index 50b2eb3..684b6a5 100644
--- a/documents/html/search/variables_5.js
+++ b/documents/html/search/variables_5.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['url_97',['url',['../class_js_physically_based_material_loader.html#abd951385181b05d2e82d28a0d6fe4918',1,'JsPhysicallyBasedMaterialLoader']]]
+ ['url_95',['url',['../class_js_physically_based_material_loader.html#abd951385181b05d2e82d28a0d6fe4918',1,'JsPhysicallyBasedMaterialLoader']]]
];
diff --git a/documents/html/splitbard.png b/documents/html/splitbard.png
new file mode 100644
index 0000000..8367416
Binary files /dev/null and b/documents/html/splitbard.png differ
diff --git a/documents/html/tab_ad.png b/documents/html/tab_ad.png
new file mode 100644
index 0000000..e34850a
Binary files /dev/null and b/documents/html/tab_ad.png differ
diff --git a/documents/html/tab_bd.png b/documents/html/tab_bd.png
new file mode 100644
index 0000000..91c2524
Binary files /dev/null and b/documents/html/tab_bd.png differ
diff --git a/documents/html/tab_hd.png b/documents/html/tab_hd.png
new file mode 100644
index 0000000..2489273
Binary files /dev/null and b/documents/html/tab_hd.png differ
diff --git a/documents/html/tab_sd.png b/documents/html/tab_sd.png
new file mode 100644
index 0000000..757a565
Binary files /dev/null and b/documents/html/tab_sd.png differ
diff --git a/index.html b/index.html
index 022db82..739c510 100644
--- a/index.html
+++ b/index.html
@@ -89,6 +89,7 @@ Dependencies
- The MaterialX 1.39 or greater package for PhysicallyBased OpenPBR shader creation
- The
requests
package.
+- The
pillow
package for image handling for GPUOpen package handling
Building
The GitHub repository can be cloned and the package built using:
diff --git a/javascript/JsMaterialXPhysicallyBased.js b/javascript/JsMaterialXPhysicallyBased.js
index 22e0a53..fe50ec0 100644
--- a/javascript/JsMaterialXPhysicallyBased.js
+++ b/javascript/JsMaterialXPhysicallyBased.js
@@ -149,6 +149,7 @@ class JsPhysicallyBasedMaterialLoader {
//'metalness': 'metalness',
'ior': 'specular_IOR',
//'transmission': 'transmission',
+ 'transmission_color': 'transmission_color',
'thinFilmIor': 'thin_film_IOR',
'thinFilmThickness': 'thin_film_thickness',
'transmissionDispersion': 'transmission_dispersion',
@@ -161,6 +162,7 @@ class JsPhysicallyBasedMaterialLoader {
'metalness': 'base_metalness',
'ior': 'specular_ior',
'transmission': 'transmission_weight',
+ 'transmission_color': 'transmission_color',
'subsurfaceRadius': 'subsurface_radius',
'thinFilmIor': 'thinfilm_ior',
'thinFilmThickness': 'thinfilm_thickness',
@@ -381,8 +383,31 @@ class JsPhysicallyBasedMaterialLoader {
// to Autodesk Standard Surface shader inputs
const skipKeys = ['name', "density", "category", "description", "sources", "tags", "reference"];
+ let metallness = null;
+ let roughness = null;
+ let transmission_color = null;
+ let transmission = null;
Object.entries(mat).forEach(([key, value]) => {
+
if (!skipKeys.includes(key)) {
+
+ if (key == 'metalness') {
+ metallness = value;
+ //console.log('Metalness:', metallness);
+ }
+ if (key == 'roughness') {
+ roughness = value;
+ //console.log('Roughness:', roughness);
+ }
+ if (key == 'transmission') {
+ transmission = value;
+ //console.log('Transmission:', transmission);
+ }
+ if (key == 'color') {
+ transmission_color = value;
+ //console.log('Color:', color);
+ }
+
if (remapKeys[key]) {
key = remapKeys[key];
}
@@ -413,6 +438,22 @@ class JsPhysicallyBasedMaterialLoader {
}
}
});
+
+ if (transmission !== null && metallness !== null && roughness !== null && transmission_color !== null)
+ {
+ if (metallness == 0 && roughness == 0)
+ {
+ if (remapKeys['transmission_color']) {
+ let inputName = remapKeys['transmission_color'];
+ let input = shaderNode.addInput(inputName);
+ if (input) {
+ let value = transmission_color.join(',');
+ console.log(`Add "${inputName}": "${value}"`);
+ input.setValueString(value, 'color3');
+ }
+ }
+ }
+ };
}
return true;
}
diff --git a/pyproject.toml b/pyproject.toml
index 74cb85a..7c2aadf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -22,6 +22,7 @@ classifiers = [
dependencies = [
"materialx>=1.39",
"requests",
+ "pillow"
]
[tool.setuptools.packages.find]
diff --git a/src/materialxMaterials.egg-info/PKG-INFO b/src/materialxMaterials.egg-info/PKG-INFO
index e2248a4..e25b42d 100644
--- a/src/materialxMaterials.egg-info/PKG-INFO
+++ b/src/materialxMaterials.egg-info/PKG-INFO
@@ -219,6 +219,7 @@ Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: materialx>=1.39
Requires-Dist: requests
+Requires-Dist: pillow
diff --git a/src/materialxMaterials.egg-info/requires.txt b/src/materialxMaterials.egg-info/requires.txt
index 35a101b..cc2aa67 100644
--- a/src/materialxMaterials.egg-info/requires.txt
+++ b/src/materialxMaterials.egg-info/requires.txt
@@ -1,2 +1,3 @@
materialx>=1.39
requests
+pillow
diff --git a/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_OPBR.mtlx b/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_OPBR.mtlx
index 2055caa..aec0fcf 100644
--- a/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_OPBR.mtlx
+++ b/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_OPBR.mtlx
@@ -45,6 +45,7 @@
+
@@ -171,6 +172,7 @@
+
@@ -196,6 +198,7 @@
+
@@ -219,6 +222,7 @@
+
@@ -231,6 +235,7 @@
+
@@ -254,6 +259,7 @@
+
@@ -267,6 +273,7 @@
+
@@ -302,6 +309,7 @@
+
@@ -457,6 +465,7 @@
+
@@ -469,6 +478,7 @@
+
@@ -481,6 +491,7 @@
+
@@ -493,6 +504,7 @@
+
@@ -505,6 +517,7 @@
+
@@ -529,6 +542,7 @@
+
@@ -565,6 +579,7 @@
+
@@ -683,6 +698,7 @@
+
@@ -743,6 +759,7 @@
+
diff --git a/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_SS.mtlx b/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_SS.mtlx
index fadec96..765989e 100644
--- a/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_SS.mtlx
+++ b/src/materialxMaterials/data/PhysicallyBasedMaterialX/PhysicallyBasedMaterialX_SS.mtlx
@@ -45,6 +45,7 @@
+
@@ -170,6 +171,7 @@
+
@@ -195,6 +197,7 @@
+
@@ -218,6 +221,7 @@
+
@@ -230,6 +234,7 @@
+
@@ -253,6 +258,7 @@
+
@@ -266,6 +272,7 @@
+
@@ -301,6 +308,7 @@
+
@@ -453,6 +461,7 @@
+
@@ -465,6 +474,7 @@
+
@@ -477,6 +487,7 @@
+
@@ -489,6 +500,7 @@
+
@@ -501,6 +513,7 @@
+
@@ -525,6 +538,7 @@
+
@@ -561,6 +575,7 @@
+
@@ -675,6 +690,7 @@
+
@@ -735,6 +751,7 @@
+
diff --git a/src/materialxMaterials/physicallyBasedMaterialX.py b/src/materialxMaterials/physicallyBasedMaterialX.py
index 8b62e38..8fce013 100644
--- a/src/materialxMaterials/physicallyBasedMaterialX.py
+++ b/src/materialxMaterials/physicallyBasedMaterialX.py
@@ -92,6 +92,7 @@ def initializeInputRemapping(self):
#'metalness': 'metalness',
'ior': 'specular_IOR',
#'transmission': 'transmission',
+ 'transmission_color': 'transmission_color',
'thinFilmIor' : 'thin_film_IOR',
'thinFilmThickness' : 'thin_film_thickness',
'transmissionDispersion' : 'transmission_dispersion',
@@ -104,6 +105,7 @@ def initializeInputRemapping(self):
'metalness': 'base_metalness',
'ior': 'specular_ior',
'transmission': 'transmission_weight',
+ 'transmission_color': 'transmission_color',
'subsurfaceRadius': 'subsurface_radius',
'thinFilmIor' : 'thinfilm_ior',
'thinFilmThickness' : 'thinfilm_thickness',
@@ -343,8 +345,22 @@ def convertToMaterialX(self, materialNames = [], shaderCategory='standard_surfac
# Keys to skip.
skipKeys = ['name', "density", "category", "description", "sources", "tags", "reference"]
+ metallness = None
+ roughness = None
+ color = None
+ transmission = None
for key, value in mat.items():
+
if (key not in skipKeys):
+ if key == 'metalness':
+ metallness = value
+ if key == 'roughness':
+ roughness = value
+ if key == 'transmission':
+ transmission = value
+ if key == 'color':
+ color = value
+
if key in remapKeys:
key = remapKeys[key]
input = shaderNode.addInputFromNodeDef(key)
@@ -359,6 +375,16 @@ def convertToMaterialX(self, materialNames = [], shaderCategory='standard_surfac
#else:
# self.logger.debug('Skip unsupported key: ' + key)
+ if (transmission != None) and (metallness != None) and (roughness != None) and (color != None):
+ if (metallness == 0) and (roughness == 0):
+ if 'transmission_color' in remapKeys:
+ key = remapKeys['transmission_color']
+ input = shaderNode.addInputFromNodeDef(key)
+ if input:
+ self.logger.debug(f'Set transmission color {key}: {color}')
+ value = ','.join([str(x) for x in color])
+ input.setValueString(value)
+
return self.doc
def writeMaterialXToFile(self, filename):
diff --git a/myserver.py b/utilities/myserver.py
similarity index 100%
rename from myserver.py
rename to utilities/myserver.py