cloudfx Posted December 15, 2011 Share Posted December 15, 2011 What is the expression name which allows you to read parent node or node's string or integer as value. let say node name is "null24" and I can read "null" as string value and 24 as integer value? Quote Link to comment Share on other sites More sharing options...
Macha Posted December 15, 2011 Share Posted December 15, 2011 opdigits() gives you the digits, that much I know... Quote Link to comment Share on other sites More sharing options...
3dbeing Posted December 15, 2011 Share Posted December 15, 2011 (edited) opdigits will give you the number not sure about striping the number out... you could do it in python with regex **edit import re ##<---dont forget this **eidt node = hou.node('path') check = re.search('(.[^0-9]+)([0-9]+)',node.name()) print check.group(1) print check.group(2) Edited December 15, 2011 by 3dbeing Quote Link to comment Share on other sites More sharing options...
3dbeing Posted December 16, 2011 Share Posted December 16, 2011 after a little thought you can strip the digits out in hscript like this...pretty ugly, but it works `substr(${OS},0,strlen(${OS})-strlen(opdigits(".")))` 1 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.