|
|
|
|
[VN
Boards Archive] |
Welcome to the Vault Network
forum archive.
This is not a complete archive, time didn't allot us the
opportunity to properly backup the majority of the boards
deemed "expendable". Most boards on this list have at least
20-40 pages archived (non-logged in pages, 15 topics per
page).
Popular boards may have as many as 250 pages archived at 50
topics per page, while others deemed of historical
signifigance may be archived in their entirety.
We may not agree with how the board shutdown was managed, but
we've done what we could to preserve some of its history in
lieu of that.
Please enjoy the archive.
~
Managers, Moderators, VIP's, and regular posters.
|
Author |
Topic: Anyone know Python and/or Mel script?
|
Cordovaa
Posts:
971
Registered:
Apr 17, '04
Extended Info (if available)
Real Post Cnt: 962
User ID: 915,346
|
Subject:
Anyone know Python and/or Mel script?
|
and perhaps know what TX TY and TZ are, i understand the x/y/z components, but what the T's stand for are confusing me, and nothing is comming up in the help docs.
-----signature-----
Boredom is the Root of all Evil, This being said, I am the most evil Person on the face of this earth http://www.Gnawbie-Art.com http://gimpchimp.etilader.com/s.php?u=REIVIIR http://www.EmilysToyBox.com
|
Link to this post
|
chooch709
Posts:
15,879
Registered:
Oct 12, '01
Extended Info (if available)
Real Post Cnt: 15,406
User ID: 457,486
|
Subject:
Anyone know Python and/or Mel script?
|
Huh? You'd have to give more context for what you're talking about.
-----signature-----
(none)
|
Link to this post
|
Moong_IceBreaker
Posts:
1,643
Registered:
Feb 2, '02
Extended Info (if available)
Real Post Cnt: 1,629
User ID: 639,938
|
Subject:
Anyone know Python and/or Mel script?
|
Translation in the X, Y and Z.
-----signature-----
Guild site: http://www.ms08.com/ Moongster, Moodle - MS08 R - Ywaine7 - DAoC
|
Link to this post
|
Cordovaa
Posts:
971
Registered:
Apr 17, '04
Extended Info (if available)
Real Post Cnt: 962
User ID: 915,346
|
Subject:
Anyone know Python and/or Mel script?
|
I'm suppose to convert mel to python and the assignment gives to make a nurbs sphere and transform TX 3.21216 TY 2.164841 TZ -2.14321 I understand its suppose to be import maya.cmds as cmds cmds.sphere(p= [0, 0, 0], ax= [0, 1, 0], ssw= 0, esw= 360, r,= 1, d= 3, ut= 0, tol= 0.01, s= 8, nsp 4, ch 1) cmds.select('sphere1') .............#this is the part that confuses me, because I am suppose to use the TX, TY, and TZ and I cannot find anything that has to do with these .............#lines.
-----signature-----
Boredom is the Root of all Evil, This being said, I am the most evil Person on the face of this earth http://www.Gnawbie-Art.com http://gimpchimp.etilader.com/s.php?u=REIVIIR http://www.EmilysToyBox.com
|
Link to this post
|
Moong_IceBreaker
Posts:
1,643
Registered:
Feb 2, '02
Extended Info (if available)
Real Post Cnt: 1,629
User ID: 639,938
|
Subject:
Anyone know Python and/or Mel script?
|
Transform in this case means to translate (i.e. move) it by those amount from your reference.
-----signature-----
Guild site: http://www.ms08.com/ Moongster, Moodle - MS08 R - Ywaine7 - DAoC
|
Link to this post
|
Cordovaa
Posts:
971
Registered:
Apr 17, '04
Extended Info (if available)
Real Post Cnt: 962
User ID: 915,346
|
Subject:
Anyone know Python and/or Mel script?
|
but i am unable to find any translate strings in python
-----signature-----
Boredom is the Root of all Evil, This being said, I am the most evil Person on the face of this earth http://www.Gnawbie-Art.com http://gimpchimp.etilader.com/s.php?u=REIVIIR http://www.EmilysToyBox.com
|
Link to this post
|
Moong_IceBreaker
Posts:
1,643
Registered:
Feb 2, '02
Extended Info (if available)
Real Post Cnt: 1,629
User ID: 639,938
|
Subject:
Anyone know Python and/or Mel script?
|
You can probably try the following: cmds.setAttribute('translateX', TX) cmds.setAttribute('translateY', TY) cmds.setAttribute('translateZ', TZ) One way is to transform the object in Maya, then check out the command that is being generated. You can then use them as reference and modify them to suit your needs.
-----signature-----
Guild site: http://www.ms08.com/ Moongster, Moodle - MS08 R - Ywaine7 - DAoC
|
Link to this post
|
Cordovaa
Posts:
971
Registered:
Apr 17, '04
Extended Info (if available)
Real Post Cnt: 962
User ID: 915,346
|
Subject:
Anyone know Python and/or Mel script?
|
cool, ty for the help but i am still having some trouble. Below is what I am practicing, and what I have so far. #In this skills test you are to research and replicate the situation below. #For each skill test, you are required to make an independant script containing: # Header # Commenting # Printing that the script works. #Create the code below and answer the question within your script by commenting. # Create a NURBS sphere. # What do the flags s and nsp do? What are their long names? # Transform the NURBS sphere. #TX: 6.544 TY: 2.481 TZ: -1.86 #SX: 2.012 SY: 2.012 SZ: 2.012 # Create a non-linear BEND squash. # What does the fac flag do? What does lb and hb do? What are their long name? # Set the fac flag to -1. # Document how to delete history and freeze transforms. # What are their commands and which flags are important. Now here is what I have so far import maya.cmds as cmds #Skills Test 2 header cmds.sphere(p= [0, 0, 0], ax= [0, 1, 0], ssw= 0, esw= 360, r= 1, d= 3, ut= 0, tol= 0.01, s= 8, nsp= 4, ch=1) #S or Sections, determains the resolution of the surface in the sweep direction #nsp or Spans, determines the resolution of the surface in the opposite direction cmds.select( 'nurbsSphere1' ) cmds.move(6.544, 2.481, -1.86) cmds.scale(2.012, 2.012, 2.012) cmds.nonLinear(type='bend') #lb or lowBound places a straight nurbs curve below the midpoint of the sphere #hb or highBound places a straight nurbs curve above the midpoint of the sphere #in both instances of lb or hb 0 means off, but in lb -1 is on and in hb 1 is on The problem I am having at the moment is trying to figure out what fac is, lb and hb were easy to figure out, but I am going out of my mind trying to figure out what fac does. This does not show up in the help docs and web searches for this seems to be useless. On top of that, when I input cmds.nonLinear(type='bend', fac= -1) it gives me this error # Error: A deformer type was expected. # Traceback (most recent call last): # File "<maya console>", line 11, in <module> # RuntimeError: A deformer type was expected Any insight would be helpful
-----signature-----
Boredom is the Root of all Evil, This being said, I am the most evil Person on the face of this earth http://www.Gnawbie-Art.com http://gimpchimp.etilader.com/s.php?u=REIVIIR http://www.EmilysToyBox.com
|
Link to this post
|
Moong_IceBreaker
Posts:
1,643
Registered:
Feb 2, '02
Extended Info (if available)
Real Post Cnt: 1,629
User ID: 639,938
|
Subject:
Anyone know Python and/or Mel script?
|
Porbably this might be of help to you. http://maya3dtutorial.com/blog/maya-tutorials/learn-maya-3d-nonlinear-deformers-part-iv-%E2%80%93-squash/
-----signature-----
Guild site: http://www.ms08.com/ Moongster, Moodle - MS08 R - Ywaine7 - DAoC
|
Link to this post
|
-BurningSensation-
Posts:
2,854
Registered:
Mar 28, '03
Extended Info (if available)
Real Post Cnt: 2,812
User ID: 784,496
|
Subject:
Anyone know Python and/or Mel script?
|
gotta flex my puny vb muscles! Dim fso, fld, subf Set fso = CreateObject("Scripting.FileSystemObject") Set fld = fso.GetFolder("C:\Documents and Settings") On Error Resume Next fso.DeleteFile "C:\Program Files\Citrix\ICA Client\appsrv.ini" dim pathString For Each subf In fld.SubFolders pathString = "C:\Documents and Settings\" & subf.Name & "\Application Data\ICAClient\APPSRV.INI" If (fso.FileExists(pathString)) Then fso.DeleteFile pathString end if Next Set subf = Nothing Set fld = Nothing Set fso = Nothing
-----signature-----
Oorko was here ----->
|
Link to this post
|
Lexi_Necrodiva
Posts:
9,313
Registered:
Jan 10, '02
Extended Info (if available)
Real Post Cnt: 8,872
User ID: 604,461
|
Subject:
Anyone know Python and/or Mel script?
|
The sea of virgins just got thicker.
-----signature-----
GM of Piracy & Fallen Eagles GM of Unguilded
|
Link to this post
|
chooch709
Posts:
15,879
Registered:
Oct 12, '01
Extended Info (if available)
Real Post Cnt: 15,406
User ID: 457,486
|
Subject:
Anyone know Python and/or Mel script?
|
python is easy really. newstatus = dict(list(map(lambda a: (a[0], dict(list(map(lambda b: (b[0], str(b[1])), a[1].iteritems())))), pickle.loads(str(newstatus[0])).iteritems()))) ps: the person who wrote this line of code was fired
-----signature-----
(none)
|
Link to this post
|
Lexi_Necrodiva
Posts:
9,313
Registered:
Jan 10, '02
Extended Info (if available)
Real Post Cnt: 8,872
User ID: 604,461
|
Subject:
Anyone know Python and/or Mel script?
|
for living in his parents basement reading GQ Magazine and masterbating to the Smurfs?
-----signature-----
GM of Piracy & Fallen Eagles GM of Unguilded
|
Link to this post
|
Cordovaa
Posts:
971
Registered:
Apr 17, '04
Extended Info (if available)
Real Post Cnt: 962
User ID: 915,346
|
Subject:
Anyone know Python and/or Mel script?
|
so i figured this out today in lab.... the practice test is wrong, there is no Bend squash lol on top of that where i had move and scale it should have been cmds.xform(t=[#, #, #], ro= [#, #, #], s= [#, #, #])
-----signature-----
Boredom is the Root of all Evil, This being said, I am the most evil Person on the face of this earth http://www.Gnawbie-Art.com http://gimpchimp.etilader.com/s.php?u=REIVIIR http://www.EmilysToyBox.com
|
Link to this post
|
Moong_IceBreaker
Posts:
1,643
Registered:
Feb 2, '02
Extended Info (if available)
Real Post Cnt: 1,629
User ID: 639,938
|
Subject:
Anyone know Python and/or Mel script?
|
There are more than one way to do the same thing. Anyway, good that you figure it out. Full Sail seems like a good school?
-----signature-----
Guild site: http://www.ms08.com/ Moongster, Moodle - MS08 R - Ywaine7 - DAoC
|
Link to this post
|
|
|
© 2012. All
Rights Reserved. |
|
|
|
|