photex Posted September 2, 2008 Share Posted September 2, 2008 Hello, I'm trying to use a python expression to convert a point group into a string that can tell the polybevel sop to bevel edges instead of points. If I select the edges manually and polybevel things work as normal. But when I try to use this expression: `"p%s" % "-".join(hou.hscriptExpression("pointlist(\"../bevel_group\",\"bevel_group\")").split())` and I get an error that the group name is invalid. I'm guessing that it has something to do with the quotes that get returned since if I paste the evaluated string into an identical sop I get the bevel as expected. Any advice would rock. I know that I still need work out how to append the first point to the end of that list, but I need this expression to at least evaluate before I spend more time on that. Cheers! Quote Link to comment Share on other sites More sharing options...
photex Posted September 2, 2008 Author Share Posted September 2, 2008 AHA! My familiarity with Hscript damned me as I try to do fancy things. The trick is to alt-e the field and then just treat the expression as a python function body: list = hou.hscriptExpression("pointlist(\"../bevel_group\",\"bevel_group\")").split() return "p%s-%s" % ("-".join(list),list[0]) 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.