Hello all,
I have been sat on this process I have been trying to nail for almost 2 years and never quite managed to solve. (started it and just kinda left it as life did its thing)
So here is the process in steps:
- Select a mesh
- Drag the mouse over faces one after the other
- As you drag from one face to the adjacent face stitch the UVs together
Problems:
If I try to run the stitch Maya fatal crashes straight away.
If I try to drag or select outside the mesh, Maya crashes (sometimes)
if I try to click something else, Maya crashes
If I try to run it twice Maya crashes...sometimes/most of the time
Basically when inside the context or when the context has been triggered Maya will find a way to crash.
I have a couple of theories that I want to test out:
My first instinct is perhaps to run contextual functions in a separate thread.
My second thought is that the context is being triggered so rapidly that the function is going out of scope before the commands have had time to finish or that the call stack is being jammed up by it.
You can copy the script directly into Maya and run it directly from github (listed below)
Note: you might need to change the Qt setup if you do not have Qt.py
Please let me know your thoughts, perhaps there is some serious violation that I have overlooked in my code or was not aware about.
Cheers,
Ben