I’m looking for some help for the following things on my scripts
I don’t want the view port to update in some of my procedures. For example if I create a locator and snap it several times and I just want the end result and not to show how the locators are created and snapped. What command can I use?
When you’re snapping overtime you can do one of 2 things. Either use the time flags in the getAttr/setAttr so you get the value at a specific time, or if you’re having to updated the currentTime do it with the Update flag OFF. This means you’re scrolling time but without the draw updates.
NB: Do be careful with this though, as if something errors before you reach the last refresh, your vp will still be disabled and you’ll have to enable it manually through the command line! Oh, and if your giving it to an artist to use they’ll probably just whinge that Maya’s crashed - which of course it hasn’t!!
[QUOTE=Bugsy;10777]if something errors before you reach the last refresh, your vp will still be disabled and you’ll have to enable it manually through the command line! [/QUOTE]
This is when you use try finally blocks if you’re in python.
E.g.
try:
# Turn off viewport updating
# Do stuff
finally:
# Turn on viewport updating
So even if an error ocurs in the try block, the viewport will still be re-enabled. (Although, I wouldn’t recommend disabling the viewport updating…)
NB: Do be careful with this though, as if something errors before you reach the last refresh, your vp will still be disabled and you’ll have to enable it manually through the command line! Oh, and if your giving it to an artist to use they’ll probably just whinge that Maya’s crashed - which of course it hasn’t!![/QUOTE]
Incidentally, I think the -suspend flag is >=2011 only.