Jump to content

Syntax to read point string attribute in a font text field


Recommended Posts

Using a Block Begin SOP / for loop, I'm trying to generate one font SOP which text is read from a string attribute set on each point

I don't manage to get the syntax right for the text field

It should be something like this: a reference to the node containing the string attribute, an attribute name, and an index, per Houdini documentation:

point(surface_node, point_number, attribute, index)

So I thought this should work:

point("../pointwrangle1/", detail("../foreach_begin1_metadata1/","iteration",0), "letter",0)
 

It doesn't reject it, but it doesn't return the text in string attribute "letter", but the integer value of iteration instead

What's happening here ?

 

odforce.text.hipnc

Edited by AntoineSfx
Link to comment
Share on other sites

To return a string value, use points() instead of point()
http://www.sidefx.com/docs/houdini/expressions/points.html
 

The same applies for detail() / details() and prim() / prims().

This should work, last argument (the index 0) is not used with points()

points("../pointwrangle1/", detail("../foreach_begin1_metadata1/","iteration",0), "letter")

 

Link to comment
Share on other sites

was just goofing around and found that if you change your font command to:

points("../foreach_begin1", 0, "letter")

it works too.....and even if you change the 0 to WHATEVER number...it still works coz...everytime it executes for a point there is only ONE point it's getting the "letter" from

A bit more cryptic..but much shorter...

Link to comment
Share on other sites

11 minutes ago, Noobini said:

was just goofing around and found that if you change your font command to:

points("../foreach_begin1", 0, "letter")

it works too.....and even if you change the 0 to WHATEVER number...it still works coz...everytime it executes for a point there is only ONE point it's getting the "letter" from

A bit more cryptic..but much shorter...

yes, no need to mess with nested function calls. I like it better because it seems to refer to  .. the point being processed, whereas using the variable iteration kinda defeats the purpose of having an iterator..

Thanks for the trick, hoping it's no going to come haunt me later

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...