diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-09 14:46:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-09 14:47:58 +0300 |
commit | d812e46f40bce18f37b192f423e61360239a295c (patch) | |
tree | 9e6fdd354e171f4400b0cab8adc36e420801ed69 /source/blender/io/usd/intern/usd_reader_material.h | |
parent | 74e57efb2d1dee73cdef6f31131ca4b3bbc6e81c (diff) |
Cleanup: move public doc-strings into headers for 'io/usd'
Ref T92709
Diffstat (limited to 'source/blender/io/usd/intern/usd_reader_material.h')
-rw-r--r-- | source/blender/io/usd/intern/usd_reader_material.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/io/usd/intern/usd_reader_material.h b/source/blender/io/usd/intern/usd_reader_material.h index a17504bd590..fb40b4f2f6d 100644 --- a/source/blender/io/usd/intern/usd_reader_material.h +++ b/source/blender/io/usd/intern/usd_reader_material.h @@ -90,12 +90,14 @@ class USDMaterialReader { Material *add_material(const pxr::UsdShadeMaterial &usd_material) const; protected: + /** Create the Principled BSDF shader node network. */ void import_usd_preview(Material *mtl, const pxr::UsdShadeShader &usd_shader) const; void set_principled_node_inputs(bNode *principled_node, bNodeTree *ntree, const pxr::UsdShadeShader &usd_shader) const; + /** Convert the given USD shader input to an input on the given Blender node. */ void set_node_input(const pxr::UsdShadeInput &usd_input, bNode *dest_node, const char *dest_socket_name, @@ -103,6 +105,10 @@ class USDMaterialReader { int column, NodePlacementContext *r_ctx) const; + /** + * Follow the connected source of the USD input to create corresponding inputs + * for the given Blender node. + */ void follow_connection(const pxr::UsdShadeInput &usd_input, bNode *dest_node, const char *dest_socket_name, @@ -118,8 +124,18 @@ class USDMaterialReader { int column, NodePlacementContext *r_ctx) const; + /** + * Load the texture image node's texture from the path given by the USD shader's + * file input value. + */ void load_tex_image(const pxr::UsdShadeShader &usd_shader, bNode *tex_image) const; + /** + * This function creates a Blender UV Map node, under the simplifying assumption that + * UsdPrimvarReader_float2 shaders output UV coordinates. + * TODO(makowalski): investigate supporting conversion to other Blender node types + * (e.g., Attribute Nodes) if needed. + */ void convert_usd_primvar_reader_float2(const pxr::UsdShadeShader &usd_shader, const pxr::TfToken &usd_source_name, bNode *dest_node, |