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

String attributes are not stored by points #7

Open
eprana opened this issue Jul 16, 2020 · 2 comments
Open

String attributes are not stored by points #7

eprana opened this issue Jul 16, 2020 · 2 comments

Comments

@eprana
Copy link

eprana commented Jul 16, 2020

Hi,

String attributes are not stored by points.

When iterating through houio::HouGeo::AttributeAdapter::Ptr, (retrieved with houio::HouGeo::getPointAttributeNames() ), string attributes are not stored by points.
HouGeo::HouAttribute::getString() only returns unique values of a specific attribute.
For instance, there are 10 points with a string attribute.
The value of this attribute is "A" or "B" according to point id (even or odd).
attribute->getNumElements() returns 2 instead of 10

Is there an index by point somewhere to get the value of this attribute for each point ?

@dkoerner
Copy link
Owner

Hi,
the information about this must be somewhere, like an index table, but it is not read or at least not interpreted/unpacked as you would expect. So it seems like duplicate string attributes on points are not functional like this. As a workaround you may be able to enforce a unique string per point by appending the point index to the string when generating the attribute values in houdini.

Sorry for the inconvenience. Looked at this repo the first time after a couple of years and find myself surprised that some people are actually using it :D

@eprana
Copy link
Author

eprana commented Jul 20, 2020

Hi,
To be honest, I wasn't expecting a answer 😆
I submit a PR to solve this issue, if you have time to look at it : #8

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

2 participants