Jump to content

Question regarding UV attribute of vertecies in Python


Nicolas90

Recommended Posts

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 by Nicolas90
Link to comment
Share on other sites

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 by Nicolas90
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...