tag:blogger.com,1999:blog-45319947080139028502024-02-20T08:33:59.650-08:00Juss Rig ItUnknownnoreply@blogger.comBlogger11125tag:blogger.com,1999:blog-4531994708013902850.post-50846831024534000982017-09-29T05:17:00.001-07:002017-09-29T05:17:29.820-07:00Zero-out Rotation Axis in MayaRecently while working on some rigs, I was needed to strictly move the current skinned finger joints position to match a newly given set of finger joints by another TD. Usually, we should receive nicely oriented joints but it was not the case. Not only the rotations and joint orient values are messy, but there is also rotation axis value. If I were to directly snap to the new joints (following its translation + rotation), my joints will be messed up too.<br />
<br />
It has been awhile since I last dealt with such a problem, so I forgot I solved it. Thanks to Goggle Search, someone has shared their solution, so I thought more people can benefits from it.<br />
<br />
Basically, it is a short script to zero-out Rotation Axis in the joint <b>without affecting the rest of the children joints</b>. Pretty need and simple. Just select the joints that you would like to zero out the rotation axis values, and run this:<br />
<br /><span style="font-family: "Courier New",Courier,monospace;">joint -e -zso;</span><br />
<br />
Voila! It worked flawlessly. I think my old method required a bunch of calculations but this is magical. Hope it helps.<br />
<br />
Thank you to Oana Jones for this sharing at :<br />
<br />
http://oanajones.blogspot.my/2013/08/zero-out-rotation-axis-in-maya.htmlUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-4531994708013902850.post-62042369638639269662011-06-25T11:28:00.000-07:002011-09-25T11:33:10.162-07:00Weight Painting - Maya 2011<span class="Apple-style-span"; font-family: verdana, arial, sans-serif; font-size: 11px;">I was using Maya 2011 and could not get used to the new weight painting system. To weight paint like how we used to in the previous Maya (2009 and before), just go into the Paint Skin Weights Tool options, change the "Normalize Weights" from "Post" (default) to "Interactive". A message box will pop up and ask if you want to normalize the weights, in which I prefer to pick 'No'. Normalize Weights is accessible from "Edit Smooth Skins option" if I need it later.</span><br />
<span class="Apple-style-span" style="font-family: verdana, arial, sans-serif;"><span class="Apple-style-span" style="font-size: 11px;"><br />
</span></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4531994708013902850.post-36494908466266684272011-02-04T15:06:00.000-08:002011-02-04T15:10:15.169-08:00joint Zero-ing<div style="font-family: inherit;"><span style="font-size: small;">Here's a simple Python script that is used to zero-out selected joints' or given joint's rotation value and joint orient value. </span><br />
<br />
<span style="font-size: small;">INSTRUCTION:</span><br />
<span style="font-size: small;">For the first argument,</span><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"> </span>'jointName'</span> is used to specify a given joint name. If you intend to run the script for selected joints instead, give a<span style="font-family: "Courier New",Courier,monospace;"> 'None' </span>or do not use this argument at all. It is defaulted as<span style="font-family: "Courier New",Courier,monospace;"> 'None' </span>though. Second and third argument is <span style="font-family: "Courier New",Courier,monospace;">'rot'</span> and<span style="font-family: "Courier New",Courier,monospace;"> 'jo'</span>. Give it a <span style="font-family: "Courier New",Courier,monospace;">1</span> to<span style="font-family: "Courier New",Courier,monospace;"> 'rot' </span>to zero-out rotation values or a <span style="font-family: "Courier New",Courier,monospace;">1</span> to<span style="font-family: "Courier New",Courier,monospace;"> 'jo'</span> to zero-out joint orient values. Otherwise, give them a <span style="font-family: "Courier New",Courier,monospace;">0</span> to do nothing on that particular arguments.</span></div><div style="font-family: inherit;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: inherit;"><span style="font-size: small;">EXAMPLE:</span></div><div style="font-family: inherit;"><span style="font-size: small;">1) This will zero-out rotation values for joint1, but its joint orient will not be affected:</span></div><div style="font-family: inherit;"><span style="font-size: x-small;"> </span></div><div style="font-family: inherit;"><span style="font-size: x-small;"> <span style="font-family: "Courier New",Courier,monospace;">jointZero (jointName='joint1', rot=1, jo=0)</span></span></div><div style="font-family: inherit;"><br />
</div><div style="font-family: inherit;"><span style="font-size: small;">2) This will zero-out rotation values and joint orient values for all selected joints:</span></div><div style="font-family: inherit;"><br />
</div><div style="font-family: inherit;"><span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">jointZero (rot=1,jo=1) </span><span style="font-size: x-small;"><br />
</span></div><div style="font-family: inherit;"><span style="font-size: x-small;"><br />
</span></div><span style="font-size: small;">FULL SCRIPTS (to run before hand):</span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><br />
</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">def jointZero (jointName=None, rot=1, jo=1):</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> if jointName == None:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> sel = cmds.ls(sl=True)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> for joint in sel:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> if rot == 1:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.rx'%joint, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.ry'%joint, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.rz'%joint, 0) </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> if jo == 1:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.jointOrientX'%joint, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.jointOrientY'%joint, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.jointOrientZ'%joint, 0) </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> else:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> if rot == 1:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.rx'%jointName, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.ry'%jointName, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.rz'%jointName, 0) </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> if jo == 1:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.jointOrientX'%jointName, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.jointOrientY'%jointName, 0)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> cmds.setAttr ('%s.jointOrientZ'%jointName, 0) </span></span><br />
<br />
<span style="font-size: small;"><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-size: small;">Note that this is a very simple script. Fail-proof procedures are not added. So make sure your selection type is 'joint' and no rotation or joint orient attributes are locked or non-keyable.</span> </span><br />
<br />
<span style="font-size: small;">That is all for now. Hope this sheds some lights to the blog's viewers.</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4531994708013902850.post-51480793576625189302011-01-11T23:26:00.000-08:002011-11-01T08:19:13.902-07:00Animation Transfer ScriptA friend of mine was asking me if it is possible to have a script that can save the animation data into a text file and load the saved animation data text file into another object. So I wrote a simple Python script that could perform such operation. It saves the keys as well as its animation curves and tangents.<br />
<br />
The GUI is pretty simple to navigate. There are two tabs, LOAD and SAVE. To save out animation data into a text file, first select the object with the animation that you like to save out. Then click 'Browse' to browse to a directory where you want to save the text file containing the animation data. You can specify the start frame and end frame, as well as choosing the channels you like to save such as translate, rotate, scale and visibility. I made an additional custom attribute if you ever need one. The 'Save Data' button executes the saving data script. And to load the animation data, all you need to do is to choose your object, click 'Browse' to select your saved animation data text file, and decide whether if you like to remove the current keys on the selected object by ticking the checkbox. A click on 'Load Data' will executes the loading data script.<br />
<br />
That is all.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDvbhxLQiRF8XWZksAmLLWb7Jf2vdouqzqxcGR9KwuGoXGoR_JHQtdo4B_10l7Mb2jQ2najVzyj0pZjXR2FjZ928iaf65qQ1HYLsj8j1dj6KHUDiNh8_xQZPj-UQ6DjCQ4eQMbDfakklaA/s1600/jwAnimTransferSS.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDvbhxLQiRF8XWZksAmLLWb7Jf2vdouqzqxcGR9KwuGoXGoR_JHQtdo4B_10l7Mb2jQ2najVzyj0pZjXR2FjZ928iaf65qQ1HYLsj8j1dj6KHUDiNh8_xQZPj-UQ6DjCQ4eQMbDfakklaA/s400/jwAnimTransferSS.jpg" width="400" /></a></div><br />
Download link:<b> <a href="http://www.justinwwk.com/images/temp/jwAnimTransfer.py">Python File : jwAnimTransfer.py</a> </b><br />
<br />
** Note that this script is very simple. It can only save 1 object's animation at one time. Not that great, I know! Well, if you have any suggestions to make it more useful, let me know. Thanks!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4531994708013902850.post-22179084228975685452011-01-04T00:09:00.000-08:002011-01-09T00:23:15.371-08:00Joint Labeling<span style="font-size: x-small;">I developed this script about a year ago. It is used to rename the joint labeling and set the 'side' of the selected joints according to their prefix. In my case, I used 'cc' for center, 'll' for left side and 'rr' for right side. You may modify that to suit your preference. It is important to make sure the name on both sides of the selected joints are the same except its prefix. The script is as below:</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><br />
# Import Maya functions</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">import maya.cmds as cmds</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"># Prefixes change here</span><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">leftSide = 'll'</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">rightSide = 'rr'</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">center = 'cc'</span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">def jointLabeling ():<br />
<br />
sel = []<br />
sel = cmds.ls (sl=True, fl=True)<br />
<br />
for i in sel:<br />
<br />
afterName=i.split ('_', 1)[0] # take the starting prefix and check<br />
afterNameTwo=i.split ('_', 1)[1] # take the obj's name and check<br />
<br />
if afterName == </span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">leftSide</span></span><span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">:<br />
cmds.setAttr ('%s.side'%i, 1)<br />
cmds.setAttr ('%s.type'%i, 18)<br />
cmds.setAttr ('%s.otherType'%i, '%s'%afterNameTwo, type= "string")<br />
print 'Labeled %s prefix called %s' %(afterName, afterNameTwo)<br />
<br />
if afterName == rightSide:<br />
cmds.setAttr ('%s.side'%i, 2)<br />
cmds.setAttr ('%s.type'%i, 18)<br />
cmds.setAttr ('%s.otherType'%i, '%s'%afterNameTwo, type= "string")<br />
print 'Labeled %s prefix called %s' %(afterName, afterNameTwo)<br />
<br />
if afterName == center:<br />
cmds.setAttr ('%s.side'%i, 0)<br />
cmds.setAttr ('%s.type'%i, 18)<br />
cmds.setAttr ('%s.otherType'%i, '%s'%afterNameTwo, type= "string")<br />
print 'Labeled %s prefix called %s' %(afterName, afterNameTwo)</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><br />
</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4531994708013902850.post-10376074330501583612010-12-15T00:00:00.000-08:002011-01-12T10:53:32.526-08:00IK Spring Solver<span style="font-size: x-small;">IK Spring Solver is useful when posing and animating limbs that have numerous joints such as insect legs. The most prominent function is the ability to adjust the spring angle bias to keep the joint angles to be evenly distributed. To use this IK solver, it has to be activated through an easy MEL script:</span><br />
<div style="font-family: "Courier New",Courier,monospace;"><br />
<span class="code" style="font-size: x-small;">ikSpringSolver</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: inherit;"><span style="font-size: x-small;">Through the Internet, there are many people who bumps into problems while using this IK Solver, especially when performing world rotation that seems not to affect the joints rigged with IK Spring Solver. This problem has been a plague since Maya 7.0 and no rectification is being done up till Maya 2009 (which I am using) to make it behave properly.</span></div><div style="font-family: inherit;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: inherit;"><span style="font-size: x-small;">The only available fix to it, is to have the first joint of a series of joints bounded to an IK Spring Solver not to be parented to its whatever parent. That joint shall be parent constrained to whatever parent it supposed to be, instead of directly parented underneath them. </span></div><div style="font-family: inherit;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: inherit;"><span style="font-size: x-small;">Note that IK Spring Solver will also break if you choose to parent the joints under a transform node and choose that transform node to perform the required parent-constraining. It is okay if you parent constrain the joints to whatever parents it supposed to be as described above, and group the joints in an empty transform node for clarity purposes. </span></div><div style="font-family: inherit;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: inherit;"><span style="font-size: x-small;">I guess that is as much as I could explain. Please do drop a message if the problem persists, or my instructions being unclear.</span></div><div style="font-family: inherit;"><span style="font-size: x-small;"><br />
</span></div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-4531994708013902850.post-21549977931686579812010-02-22T23:00:00.000-08:002010-03-08T21:17:49.533-08:00Returning multiple values from a Python function<span style="font-size: x-small;">I was working on my Python scripts. Then I came to a point where I require more than 1 value to be returned from a function that I wrote. Usually, functions in Python can only return one thing, but the one thing can be a collection of items - tuple. The returned values can be broken down into a bunch of variables:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"># Create a function as below, with three returns:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> def addme(num):</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> v1 = num + 15</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> v2 = num - 10</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> v3 = num * 2</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> return v1,v2,v3; </span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"># Running the function: </span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> main = addme (15)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> sA, sB, sC = addme (15)</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">#By printing main, main will be equal to (30,5,30):</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">print main</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span></span><br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#By printing main[0], main[1] and main[2], you'll get individual values of 30, 5 and 30 respectively:<br />
</span></div><span style="font-size: x-small;"> <span style="font-family: "Courier New",Courier,monospace;">print main[0]</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">print main[1]</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">print main[2]</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">#Or, another way would be printing sA, sB and sC; you'll get 30, 5 and 30 respectively as well:</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">print sA</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">print sB</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">print sC</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><br />
<br />
<br />
<br />
</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4531994708013902850.post-66532710708805702782010-02-18T17:00:00.000-08:002012-02-03T20:25:31.326-08:00'It has non-zero rotations'UPDATE:<br />
<span style="font-size: x-small;">Awhile ago I haven't update this. So the previous method was outdated for some time.</span><br />
<span style="font-size: x-small;">A big thanks to Jakub Krompolc who has suggested a more effective solution which I should have rectify to this post earlier. </span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">cmds.makeIdentity( 'jointName'</span><span style="font-family: 'Courier New', Courier, monospace;">, a=1, r=1 )</span><br />
<br />
<span style="font-size: x-small;">"This will convert all rotations to joint orients. Unless your joint hierarchy contains non-resettable objects, like some shapes etc. That`s the only limitation."</span>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-4531994708013902850.post-46397739972363227782010-02-12T05:00:00.000-08:002010-02-12T05:52:32.701-08:00Modeling bumpy polygon plane<span style="font-size: x-small;">This simply Python script creates bumpy surface on a polygon plane by altering the Y position of each vertex points in a random manner. The User Presets area can be edited according to your needs.</span><br />
<br />
<div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">import maya.cmds as cmds</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">import random</span><br />
<br />
</div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"></span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#User Presets Below This Line-----------------</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"></span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">numberOfVertex = 10200 # Number of vertexes</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">pName = 'pPlane1' # Name of polygon plane</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">loR = -5 # Lowest point of bumping</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">hiR = 5 # Highest point of bumping</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">mult = 0.1 # Magnitude of randomness</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"></span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#</span><span style="font-size: x-small;">User Presets Above This Line</span><span style="font-size: x-small;">-----------------</span><br />
<br />
</div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"></span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">for i in range(1,numberOfVertex):</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"></span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> vtx = ('%s.vtx[%s]'%(pName,i))</span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> cmds.move(0,(random.randrange(loR,hiR)*mult),0,vtx,r=True,ws=True)</span></div><div style="font-family: "Courier New",Courier,monospace;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkLWlMTET1-wRz5mb9ai132zSTH1ezjuQSxNlLTuqTy49_B-LXVZUU_YxvqnKa8tQJN1AEh-C11RVDzaJ4MPDS9iTXJWic9D5DhyrqcgrvWV9q8SbeQ7PNN0tOUKq0zTZKB8-yL_7YO7RV/s1600-h/TOpost_nobump.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkLWlMTET1-wRz5mb9ai132zSTH1ezjuQSxNlLTuqTy49_B-LXVZUU_YxvqnKa8tQJN1AEh-C11RVDzaJ4MPDS9iTXJWic9D5DhyrqcgrvWV9q8SbeQ7PNN0tOUKq0zTZKB8-yL_7YO7RV/s320/TOpost_nobump.jpg" width="320" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLuFwI1q4X1CEz0id-0z1s-c_P_rG3lvuAvChTzR3EsM78eWe8Y6IlVWBFldjtNKzhEmQcHV0fSIw-XBp8d55HPodk2Pu-QmKlucw6RSR6UjbJOWm-uyyWRZuQ-V_Dy9EvseyEr82w5TL6/s1600-h/TOpost_withbump.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLuFwI1q4X1CEz0id-0z1s-c_P_rG3lvuAvChTzR3EsM78eWe8Y6IlVWBFldjtNKzhEmQcHV0fSIw-XBp8d55HPodk2Pu-QmKlucw6RSR6UjbJOWm-uyyWRZuQ-V_Dy9EvseyEr82w5TL6/s320/TOpost_withbump.jpg" /></a></div><br />
<span style="font-size: x-small;">Note that if your polygon plane is very high in resolution, it might take longer to complete depending on the processing power of your machine. I tried 10000+ vertexes and it took my computer's Maya about 30 seconds to complete.</span><br />
<br />
<span style="font-size: x-small;">Don't panic if Maya froze during the process!</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4531994708013902850.post-87430874953371061002010-02-10T21:00:00.000-08:002010-12-01T13:15:32.534-08:00'File contains unknown nodes or data'<span style="font-size: x-small;">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, <i><span style="color: red;">'File contains unknown nodes or data. To preserve this information, the current file type cannot be changed.' </span></i></span><br />
<br />
<span style="font-size: x-small;">In this case, you can write this MEL script to look for the 'unknown' node(s):</span><br />
<br />
<span style="color: #666666; font-family: "Courier New",Courier,monospace; font-size: x-small;">ls -type unknown;</span><br />
<br />
<span style="font-size: x-small;">A list of unknown node(s) will be generated.</span><br />
<span style="font-size: x-small;">You can delete them by typing:</span><br />
<br />
<span style="color: #666666; font-family: "Courier New",Courier,monospace; font-size: x-small;">delete `ls -type unknown`;</span><br />
<br />
<span style="font-size: x-small;">By deleting the unknown nodes, the problem should be solved. =]</span><br />
<br />
<u><b><i><span style="font-size: x-small;"> UPDATED 12.01.2010 :</span></i></b></u><br />
<span style="font-size: x-small;">Thank you to Ariel for adding extra info.</span><br />
<span style="font-size: x-small;">If it says "Cannot delete locked node", make sure you get the name of that node and select it, and then type:</span><br />
<br />
<div style="color: #666666;"><span style="font-size: x-small;"> <span style="font-family: "Courier New",Courier,monospace;">lockNode -l 0;</span></span></div><span style="font-size: x-small;">Then type again:</span><br />
<br />
<div style="color: #666666;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">ls -type unknown;</span></span></div><div style="color: #666666; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">delete `ls -type unknown`;</span><br />
<br />
<div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: x-small;"><span style="color: black;">That should do it.</span></span></div><div style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: x-small;"><span style="color: black;"> </span> </span></div></div>Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-4531994708013902850.post-48096612530687102392010-02-01T00:00:00.000-08:002010-02-01T00:00:00.165-08:00Juss Rig ItOfficially online!Unknownnoreply@blogger.com4