Krion Posted February 22, 2019 Share Posted February 22, 2019 Hello, I want to read the float attributes of a point in the Font node. And i want it to view as, for example, 740, when the point value is 0.74. Or 1000, when it is 1. Is this possible? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
kiryha Posted February 22, 2019 Share Posted February 22, 2019 s@str = sprintf('%03d', 1); This will give you "001" string. But how to convert 0.74 to 740 other than multiply by 1000 I have no idea, its different numbers (not the same number with different padding). Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted February 22, 2019 Share Posted February 22, 2019 2 hours ago, DévinOdforce said: Hello, I want to read the float attributes of a point in the Font node. And i want it to view as, for example, 740, when the point value is 0.74. Or 1000, when it is 1. Is this possible? Thanks in advance. Hello, yes this is possible attr_value_to_font.hipnc Quote Link to comment Share on other sites More sharing options...
Krion Posted February 22, 2019 Author Share Posted February 22, 2019 (edited) Do i do something wrong here? `round(point("../line1", 0, "P.x", 1) * 1000)` ReadPointsPos.hipnc Edited February 22, 2019 by DévinOdforce Cleaner Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted February 22, 2019 Share Posted February 22, 2019 (edited) 24 minutes ago, DévinOdforce said: Do i do something wrong here? `round(point("../line1", 0, "P.x", 1) * 1000)` ReadPointsPos.hipnc Yes, correct is `round(point("../line1", 0, "P", 0) * 1000)` it helps you: http://www.sidefx.com/docs/houdini/expressions/point.html Edited February 22, 2019 by vicvvsh Quote Link to comment Share on other sites More sharing options...
kiryha Posted February 22, 2019 Share Posted February 22, 2019 In expression round(point("../line1", 0, "P", 1) - 0 is a point number of your line (select line and check values in geometry spreadsheet) - 1 is "P" component. 0 = P.x, 1 = P.y, 2 = P.z Quote Link to comment Share on other sites More sharing options...
Krion Posted February 22, 2019 Author Share Posted February 22, 2019 Thank you so much! It's clear. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.