Adverti horiz upsell

Hair grabber 2.9.9 for Maya (maya script)

A helper tool for authoring hair cards for game assets.

License
Button download
3,065 Downloads

Reviews

Rating: 5.0
(8)

Compatibility

  • 2016

Operating Systems

  • Windows

History

Created:03/11/2016
Last Modified:09/08/2017
File Size: 134 KB

Keywords

hair

Q/A

Script starts and UI comes up, but no matter what I do I get this error

Date:04/26/2016
Submitted by: theycallmecheese theycallmecheese
# Error: IndexError: file ..scripts\hairGrabber2.py line 251: list index out of range # 
This also happens on newly-created hair planes with no history/transformations.

Thanks for your time! 

Replies to this question:

  • Replyindent
    zahal

    zahal said about 8 years ago:

    Hey! Im still looking in to it when I get asome free time.. at the moment Im not sure what's wrong here.. it seems like it has to do with pymel on your maya. If I have an idea Ill post here. Sorry that it doesnt work for you, Im new to scripting in general and not experienced with remote troubleshooting. good luck with you'r project!
  • Replyindent
    theycallmecheese

    theycallmecheese said about 8 years ago:

    Ah ok! This is what it printed in the script editor: flatUvSet map1 all tips [MeshVertex(u'pPlaneShape1.vtx[0]'), MeshVertex(u'pPlaneShape1.vtx[10]'), MeshVertex(u'pPlaneShape1.vtx[110]'), MeshVertex(u'pPlaneShape1.vtx[120]')] tipsUVs [[0.0, 0.0], [0.0, 0.0], [0.0, 1.0], [1.0, 1.0]] tipUvAvg [0.25, 0.5] pair1 [] pair2 [MeshVertex(u'pPlaneShape1.vtx[0]'), MeshVertex(u'pPlaneShape1.vtx[10]'), MeshVertex(u'pPlaneShape1.vtx[110]'), MeshVertex(u'pPlaneShape1.vtx[120]')]
  • Replyindent
    zahal

    zahal said about 8 years ago:

    whoops, it seems that the forum removed the indentation from my script I sent you.. here is it in txt form just open it in a text editor, copy the content and paste in a python tab. https://www.dropbox.com/s/dnzqnnkt9r5ovfw/testScriptHB29.txt?dl=0
  • Replyindent
    theycallmecheese

    theycallmecheese said about 8 years ago:

    Thank you for replying! I am running maya 2016 and the only other script I have is NightShade UV editor. I select the plane with its UVs all set up, hit grab to get the correct UVset (there's only one) and try the functions but they all give the same error. I followed your instructions and when I ran that script the script editor gave me: # Error: expected an indented block #
  • Replyindent
    zahal

    zahal said about 8 years ago:

    Hey there! Sorry to hear about the tool not doing what it should. Ill try to help as much as I can even though Im not professionally trained as a programmer so can't promise sure success.. First of all, what version of maya are you using? are you using many scripts in general? If you do theres a good chance that you'r maya instalation is not 'clean' try it on another computer if you get a chance. did you watch the video and did you grab the appropriate UV set in the tool? Im sending you a test script. Select one geo plane and run it through the python script editor, and send me all that it prints out. Paste the script without the quotes the script: ''' import pymel.core as pm s = pm.selected()[0] flatUvSet = pm.polyUVSet(s,q = True, cuv = True)[0] print 'flatUvSet', flatUvSet tips, tipsUV, pair1, pair2 = [],[],[],[] for selVert in s.vtx: if selVert.isOnBoundary() and len(selVert.connectedVertices()) tipUvAvg[1] : if t not in pair1: pair1.append(t) elif t not in pair2: pair2.append(t) pair1.sort(key=lambda item: (item.getUV( str(flatUvSet) )[0], item) ) pair2.sort(key=lambda item: (item.getUV( str(flatUvSet) )[0], item) ) print 'pair1', pair1 print 'pair2', pair2 '''

Post a reply: