| Item | Quantity | Price |
|---|
| Your cart is empty. Check out our collection of 3d models! |
Prices in:
Clear Cart
You could make your global string variable a global string Array with one entry.
Then use the "clear" Mel command to reset it to an empty array.
I would put this action first so it would reset the variable before doing the rest of the script
Hope this wiil help.
Cool idea, thanks Pilou. Seems to work for me now.
When I meant Isolate selected objects on render layer not working, I meant things like faces which does not work!
1 | global string $isolate_original[]; |
Hi there,
I've written the above code. As you may know, Maya does not isolate an object when on a Render Layer. As someonw who uses them a lot it is very annoying.
I've attempted to write a script that will toggle back to the defaultRednerLayer, isolate an object and then toggle back to the previous render layer.
Everything is working as expected....however when going back to the defaultRenderLayer, the script still remembers the global string from previous excecution.
Is there a way to clear a global string on a 2nd excecution of a script? Or am I totally doing everything the wrong way and in fact there is possibly a better way to approach this whole thing?
This is beginning to reach the limits of my MEL capability. :((