[Bf-blender-cvs] [5bebc3cfb6e] temp-usd-prev-export2: USD Preview Surface export code comments.
Michael Kowalski
noreply at git.blender.org
Tue Dec 28 06:13:51 CET 2021
Commit: 5bebc3cfb6e3e3a63ab4f0049a926de982483bd8
Author: Michael Kowalski
Date: Sun Dec 26 20:23:04 2021 -0500
Branches: temp-usd-prev-export2
https://developer.blender.org/rB5bebc3cfb6e3e3a63ab4f0049a926de982483bd8
USD Preview Surface export code comments.
Moved comments from usd_writer_material.cc to header (per
suggestion by Sybren in his review).
===================================================================
M source/blender/io/usd/intern/usd_writer_material.cc
M source/blender/io/usd/intern/usd_writer_material.h
===================================================================
diff --git a/source/blender/io/usd/intern/usd_writer_material.cc b/source/blender/io/usd/intern/usd_writer_material.cc
index 53be811aa79..f33110ceb60 100644
--- a/source/blender/io/usd/intern/usd_writer_material.cc
+++ b/source/blender/io/usd/intern/usd_writer_material.cc
@@ -505,17 +505,6 @@ static pxr::UsdShadeShader create_usd_preview_shader(const USDExporterContext &u
return shader;
}
-/* Entry point to create an approximate USD Preview Surface network from a Cycles node graph.
- * Due to the limited nodes in the USD Preview Surface specification, only the following nodes
- * are supported:
- * - UVMap
- * - Texture Coordinate
- * - Image Texture
- * - Principled BSDF
- * More may be added in the future.
- *
- * The 'default_uv' paramter is used as the default UV set name sampled by the primvar
- * reader shaders generated for image texture nodes shat don't have an attached UVMAp node. */
void create_usd_preview_surface_material(const USDExporterContext &usd_export_context,
Material *material,
pxr::UsdShadeMaterial &usd_material,
@@ -753,7 +742,6 @@ void create_usd_preview_surface_material(const USDExporterContext &usd_export_co
}
}
-/* Entry point to create USD Shade Material network from Blender "Viewport Display". */
void create_usd_viewport_material(const USDExporterContext &usd_export_context,
Material *material,
pxr::UsdShadeMaterial &usd_material)
diff --git a/source/blender/io/usd/intern/usd_writer_material.h b/source/blender/io/usd/intern/usd_writer_material.h
index faa3fd9e9bf..5596b89623e 100644
--- a/source/blender/io/usd/intern/usd_writer_material.h
+++ b/source/blender/io/usd/intern/usd_writer_material.h
@@ -31,11 +31,23 @@ namespace blender::io::usd {
struct USDExporterContext;
+/* Entry point to create an approximate USD Preview Surface network from a Cycles node graph.
+ * Due to the limited nodes in the USD Preview Surface specification, only the following nodes
+ * are supported:
+ * - UVMap
+ * - Texture Coordinate
+ * - Image Texture
+ * - Principled BSDF
+ * More may be added in the future.
+ *
+ * The 'default_uv' paramter is used as the default UV set name sampled by the primvar
+ * reader shaders generated for image texture nodes shat don't have an attached UVMAp node. */
void create_usd_preview_surface_material(const USDExporterContext &usd_export_context,
Material *material,
pxr::UsdShadeMaterial &usd_material,
const std::string &default_uv = "");
+/* Entry point to create USD Shade Material network from Blender "Viewport Display". */
void create_usd_viewport_material(const USDExporterContext &usd_export_context,
Material *material,
pxr::UsdShadeMaterial &usd_material);
More information about the Bf-blender-cvs
mailing list