I am taking a class right now where we are doing some simple scripting. The assignment for this script was to make something where if you migrate files to another folder you could update your paths to reflect the new location by searching an replacing the path, of all files or selected ones. before I go on here is my code…
Hello I'm wondering is it possible to run mel expressions not through expression editor but inside python script here is my script: import maya.cmds as cmds import maya.mel as mel def lag(frame, goal, follower, lagAmt): goalTrans = cmds.getAttr(goal +".translate", t=frame-lagAmt) goalRot = cmds.getAttr(goal +".rotate",…
I figured out where I may have an issue. I had been testing this in Maya 2010, and my instructor told me that Maya 2011 will not rename paths that don't exist, apparently this behaviour is the same in 2010 it seems and maybe earlier. Trying my script on actual file names like MoP did works fine but this was intended as…
That's weird, I tried it here and it works fine on Maya 2011. I added a file called "C:/path/to/file/desktop_01.jpg" and ran your script, typed "desktop" into the first prompt and "schmesktop" into the second prompt, and I ended up with "C:/path/to/file/schmesktop_01.jpg".