Sunday, September 29, 2013

Save and Reload Selection [Maya Python]

This is a Python script for Maya that can save your selection and reload it at a later point in your session.
 ## --------------------------------------------------------------------  
 Author: Andrew Kin Fun Chan  
 Date: Sept 2013  
 Version: 1.0  
 Compatibility: Maya 2011+ (It will probably work in older versions as well. Contact me if you have issues.)  
 Function:        Commands:  
 Load Selection:     reloadSel = AC_RememberSelection(1)  
 Reload Selection:    AC_RememberSelection(0)  
 ## --------------------------------------------------------------------  
 import maya.cmds as mc  
 def AC_RememberSelection(x):  
   if x == 1:  
     print 'Storing Selection'  
     loadSel =  
     print 'Reloading Selection.' (reloadSel)  
   return (loadSel)  

No comments: