Sunday, September 25, 2011

Change Controllers Shape on Rigged Character in MAYA

#ctrPar
#parents the shape of the controller and keeps it on the same place
#by Daria Eremina
#17.02.2010
#DESCRITION
####################
#Create new ctrl on the top of old one with exact position.
#Now select the shape of new Ctrl by selecting New Controller and then hitting down #arrow.
#Run the script
#Go to hypergraph: Hirarchy, Turn on Shapes from display inside hyper graph.
# Delete the old Shape.
#TO RUN SCRIPT COPY PASTE BELOW 3 LINES IN PYTHON EDITOR AND RUN.
######################################################################
#import maya.cmds as de
#reload (cp)
#ctrPar();
######################################################################
#sel the shape of pretty ctr, sel the working ctr

#get the position of the cvs of the pretty ctr
#de.parent(r=1,s=1)
#get the new pos of all vrts of the pretty ctr
#snap them to the preveus positions
import maya.cmds as de
def ctrPar():
selected=de.ls(sl=1)
prettyCtrShape=selected[0]
workingCtr=selected[1]
#get cvs of the pretty ctr
prettyCvs=de.ls(prettyCtrShape+'.cv[*]', flatten=1)
#get position of cvs of the pretty ctr
allOldCvPos=[]
for cv in prettyCvs:
oldPos= de.xform(cv, q=1,worldSpace=1, t=1)
allOldCvPos.append(oldPos)
#parent shape to the working ctr
de.parent(prettyCtrShape, workingCtr,r=1, s=1)
#get new cvs
newCvs=de.ls(prettyCtrShape+'.cv[*]', flatten=1)
print allOldCvPos
print newCvs
#change their position
for cvNum in range(len(allOldCvPos)):
de.xform(newCvs[cvNum], worldSpace=1, t=allOldCvPos[cvNum])
#delete old ctr
if de.objExists(selected[1]+'Shape'):
de.delete(selected[1]+'Shape')
else:
print selected[1]+'Shape'+' doesnt exist'

Monday, September 19, 2011

Transfering animation from one rig to another similar Rig in one click.

1) Reference in new rig along with broken rig.
2) Intall script called "nwTrnsfrAnim" ( Download from Creativecrash.com if you donot have it)
3) Run nwTrnsfrAnimUI; in script editor
4) select the Broken rig called source.
5) select new rig called destination.
6) Hit Tranfer its done.

Why i cannnot save my Maya file as *.ma?

'File contains unknown nodes or data'
Some people happens to run into a problem when trying to save a Maya Binary (.MB) file to Maya ASCII (.MA) file. An error message would pop up mentioning, 'File contains unknown nodes or data. To preserve this information, the current file type cannot be changed.'

In this case, you can write this MEL script to look for the 'unknown' node(s):

ls -type unknown;

A list of unknown node(s) will be generated.
You can delete them by typing:

delete `ls -type unknown`;

By deleting the unknown nodes, the problem should be solved. =]

UPDATED 12.01.2010 :
Thank you to Ariel for adding extra info.
If it says "Cannot delete locked node", make sure you get the name of that node and select it, and then type:

lockNode -l 0;
Then type again:

ls -type unknown;
delete `ls -type unknown`;

That should do it.

Posted by Wai Keat Wong at 9:00 PM
Labels: Maya, MEL


Thanks to my friend Leigh Ausiello for forwarding me this link.

Saturday, September 17, 2011

Making your own shot mask (frame counter) By:Ziv Ariel

Making your own shot mask (frame counter)
First of all, I would like to personally thank a friend from AM who send me this - Tobias Von Burkersroda, for making a great effort to bring this tutorial to life, and for letting me post it here.


1. Create a Shot Mask in an empty file



2. Create Text ( Create --> Text Options)



3. Write '0123456789'



4. Select Poly



5. Click on the Arrow ans select your favorite text type



6. Select the created poly numbers



7. Delete the history (Edit --> Delete by Type --> History)



8.Delete the created curves



9. Select all numbers and center the pivot ( Modify --> Center Pivot)



10. Create a Locator



11. Snap all numbers to the Locator



12. Rename the numbers the same way like the numbers of the original Shot Mask




13. Pose them where you want them to be



14. Delete the original Shot Mask number



15. In the outliner move the numbers to the group where the original numbers had been.



16. Move the time Slider. First of three parts done :)



17. Delete the 'AM:digit_2' and 'AM:digit_3'



18. Duplicate 'AM:digit_1' two times and rename the copies to AM:digit_2' and 'AM:digit_3



19. move all the 3 AM:digit_x groups



20. If you have crated a cam, delete it and save the file



21. Go to your scene and import the frame counter and parent it under your Shot Cam



22. DONE ;)