Don't forget that, if you don't need to use vex for any other reason, you can use a python expression in the ‘Text’ field of the font SOP… something like:
ndickson An example of how to do something like this is in the Point Attribute Text asset on Orbolt [orbolt.com]. It also shows how to adjust the font face, size, orientation, etc per point.
Thanks, I D/L the HDA, and he's using a HScript expression ‘points’ to read upstream point attribute data.
So, looks like this is possible, you just have to use ‘points’ to read point attributes. I was trying to use ‘detail’ to read detail attributes, but, for some reason, the Font SOP didnt like that.
Oh well, another day, another Houdini mystery solved.
Daryl Dunlap I was trying to use ‘detail’ to read detail attributes, but, for some reason, the Font SOP didnt like that.
Yeah, it's a bit confusing, but the “points”, “vertexs”, “prims”, and “details” functions return a string value, whereas “point”, “vertex”, “prim”, and “detail” return numerical values. The latter set probably returns something like zero if the attribute in question is a string attribute, since they need to choose some arbitrary numeric value.
Is there something I'm missing here? If there would be a need for documentation update what would be the best venue to report it?
Backtick expressions are HScript expressions for use in string parameter values. The detailexpression function is documented here [www.sidefx.com], (not to be confused with the VEX function of the same name). It has an attribute index parameter, as documented. However, it looks like you're probably also wanting to use the detailsexpression function, documented here [www.sidefx.com], instead, to get a string attribute value instead of a numeric value. It doesn't have an attribute index parameter. Hopefully that helps clear things up.