Nicolas90 Posted July 20, 2016 Share Posted July 20, 2016 (edited) Hello dear community, I am just writing a little Python sop that can Unwrap a polycurve like a uvtexture node does on a nurbs curve with [Arc Length Spline] setup. My question is, what is the attribute name of the uv coordinate? I tried uv and uv[1] as its shown on the spreadsheet. Does anybody know the answer? Best wishes, Nicolas Edited July 20, 2016 by Nicolas90 Quote Link to comment Share on other sites More sharing options...
edward Posted July 21, 2016 Share Posted July 21, 2016 uv but i think it's a float attribute with a tuple size of 3. Quote Link to comment Share on other sites More sharing options...
Nicolas90 Posted July 21, 2016 Author Share Posted July 21, 2016 (edited) Hello Edward, thank you very much for your reply. I already tried the following: # This code is called when instances of this SOP cook. node = hou.pwd() geo = node.geometry() # Add code to modify the contents of geo. for vert in geo.prims()[0].vertices(): vert.setAttribValue("uv",(0,0,0)) However, the node fails and states that the attribute doesnt exist Is there any way to read and print out all properties in the console? EDIT: I found out how to query the verts Attribs, but the tuple that gets returned is empty Edited July 21, 2016 by Nicolas90 Quote Link to comment Share on other sites More sharing options...
edward Posted July 22, 2016 Share Posted July 22, 2016 Geometry in Houdini doesn't come with uv's by default. So you first need to create the attribute in your python code if it doesn't exist yet. 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.