i think i finally have it working decently. im currently making a tester script to select those uvs in each catergory small, medium and large. but running into syntax problem <div>//derived from texSortShellsByBounds, uses same idea of combining the shellarea into the shelllist<br><br>global proc string[]…
ahh I see im gona try translating this in mel. I know i know python is better. but i dont have time to recode everything. This is part of a large procedure which has 800+ lines. Thanks for your help. I will post the solution up once i have something working.
You're right about the first bit. Also, here's a way you can do the second part: mid = 0.0low = 0.0areas = set() # Get all of the areas, and make sure they're unique.for _, area in sortedShellArea: areas.add(area) # Convert the areas into a sorted list.areas = sorted(areas)# Pick an area that is in about the 2/3rds index…
thanks for the tip. I will double check on the sorted list part. Yeh i wish mel has tuples. not sure why they dont have it. So from what I understand is you put both the shells and the area together into the tuple and sorted it? If you dont mind i have another question. How do you separate numbers and group them. for…
Yeah, I think I've reached the end of my usefulness here. I tend to avoid MEL like the plague, and I don't have a copy of Maya at home, so I wouldn't be able to tinker with this. The only thing that I can offer is you should be using something like an else if or elif (not sure what the syntax is in MEL) to make sure that…
Just throwing a random guess out there, but my guess is when you sort shellArea, you are losing the indexes of the mesh, and that's why it isn't working as expected. If I were to do this in Python, I'd instead do something like this: # Assuming that getUVShellArea is a Python function.shellArea = getUVShellArea() #…
ok so after some more troubleshooting, i was able to solve the syntax errors. But getting incorrect results. where both Small shells and Medium shells identical. mesh to testhttps://drive.google.com/file/d/1dJc2MkHLkvvMaoIvA9eISOQyVcuRP0RI/view?usp=sharing new code<div>//derived from texSortShellsByBounds, uses same idea…
i tried to get as far as i can. but stuck on some syntax.<div>//derived from texSortShellsByBounds, uses same idea of combining the shellarea into the shelllist<br><br>global proc string[] sortShellsByUVArea(string $shellList[]){<br> global string $shellArea[];<br> string $prefixList[];<br><br> for ($i = 0; $i <…
trying to write a procedure thats groups the uvs shells into 3 seperate categories (Small, Medium, Large). but running into an issue where small uv shells doesnt get cast to the correct array $uvShellSmlList. Im been spending the whole day looking and testing to see why its doing that. Note this code only works on maya…