I have been a 3D animator in game industry for over a decade. I also interested in script and love to solving problems. Now I am learning how to write plugin.
the first ch is small
next three chs is bigger
comiing a smaill one
three bigger one go after
finall there has small one
data=open('c:/Python27/level3.txt')
smallLetter=""
lines=data.readlines()
print 'lines:',len(lines)
i=0
while i < len(lines):
#print 'i:',i,'len:',len(lines[i])
a=0
while a+9< len(lines[i]):
#print 'lines[',i,'][',a,']:',lines[i][a]
if lines[i][a].islower() and lines[i][a+1:a+4].isupper()and lines[i][a+4].islower()and lines[i][a+5:a+8].isupper()and lines[i][a+8].islower():
smallLetter=smallLetter+lines[i][a+4]
print 'i',i,'a:',a+4
a =a+1
"i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url."
==============12/25=================== here is the way to using string.maketrans()
follow the example, and here is my code. text="g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj." intab = "abcdefghijklmnopqrstuvwxyz" #string.ascii_lowercase, outtab = "cdefghijklmnopqrstuvwxyzab"#string.ascii_lowercase[2:]+string.ascii_lowercase[:2] from string import maketrans trantab = maketrans(intab, outtab)# print text.translate(trantab);
This script will let you do two things that are extremely simple, but insanely useful for animators that are posing and setting a lot of keys on characters, as well as animators who are doing a lot of anim transfer onto characters:
It has a single super simple UI that lets you:
1. Save and label the setAttr (pose) commands for all keyable attributes of all selected nodes to your shelf, with the push of a single button!
2. Save and label your current selection set to the shelf with the push of a single button.
This script uses the "catch" command, so in case you re-name some nodes, the nodes that still exist will still get affected. This script is a solid replacement for recordPose and savePose; it is faster to use, and requires no copy/paste from the script editor. It still prints the commands into the output window, though, just incase this is useful to you. enjoy!
dkAnim.mel is for Importing or Exporting animation channels in Maya. dkAnim has many advantages over Maya's import/export .anim plugin, read dkAnim.txt or the header of dkAnim.mel for more information.
This script was written a long time ago, actually surprised it's still useful.. guess that's either a testament to mel or a hit against Maya for not making this process easier out of the box.