Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Generate Mesh Using Points" always has wrong uv sets #8

Open
jwu opened this issue Aug 27, 2019 · 0 comments
Open

"Generate Mesh Using Points" always has wrong uv sets #8

jwu opened this issue Aug 27, 2019 · 0 comments

Comments

@jwu
Copy link

jwu commented Aug 27, 2019

Hi,

I just find and fix a problem when "Generate Mesh Using Points", it will not copy the correct uv since the code miss checking the _uvsAttr.Length.

Here is the bug line:

if (geoCache._uvsAttrInfo[u].exists && geoCache._uvsAttrInfo[u].owner == HAPI_AttributeOwner.HAPI_ATTROWNER_POINT && positionIndex < geoCache._uvsAttr.Length)

just change the code from:

for (int u = 0; u < HEU_Defines.HAPI_MAX_UVS; ++u)
{
  if (... && positionIndex < geoCache._uvsAttr.Length)

to

for (int u = 0; u < HEU_Defines.HAPI_MAX_UVS; ++u)
{
  if (... && positionIndex < geoCache._uvsAttr[u].Length)

will fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant