Skip to content

Incorrect enum values for wrapS and wrapT on ND_UsdUVTexture_23 #2704

@fhechtAdobe

Description

@fhechtAdobe

Greetings,

Issue

The valid enum values for the wrapS and wrapT inputs on the ND_UsdUVTexture_23 node are listed as:

enum="black,clamp,periodic,mirror"

This seems to be a blend between the valid options from the original UsdUVTexture node, which are:

allowedTokens = ["black", "clamp", "repeat", "mirror", "useMetadata"]

And the options for the uaddressmode and vaddressmode on a regular ND_image_* node, which are:

enum="constant,clamp,periodic,mirror"

Suggested Fix

Considering that the implementation of the ND_UsdUVTexture_23 is based on a ND_image_color4 node and that there is a direct mapping of wrapS -> uaddressmode and wrapT -> vaddressmode, I think the enum values should match those on a normal ND_image_* node.

https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/bxdf/usd_preview_surface.mtlx#L345-L356

... unless you have plans to actually accept the tokens from the USD version with some form of remapping.

Cheers!

Affected versions:

This issue is present in the current 1.39.4 version of MaterialX:
https://github.com/AcademySoftwareFoundation/MaterialX/blob/v1.39.4/libraries/bxdf/usd_preview_surface.mtlx#L41-L42

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions