Hi All!
I'm new in python scripting in maya, and I have two different
question:
1. are maya.cmds based on strings?
2. if I create torus
import maya.cmds as mc
radiL=0.07/2
radi=1
radi=(radi+radiL)*1.102#r=1
tori=mc.polyTorus( ax=[0,0,1], sx=8, sy=10, r=radi, sr=radiL)
how it is possible to get
hey Gurus,
can anyone help me please?
I need it realy
Best!
Dima
On May 27, 6:16 pm, Dimitry wrote:
> Hi All!
>
> I'm new in python scripting in maya, and I have two different
> question:
>
> 1. are maya.cmds based on strings?
> 2. if I create torus
>
> impor
Hi Ofer!
thank you for the answer.
yes I meaning exact the vector from each face in the torus,
I want save it in an array.
Best!
Dima
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
Hi Chad,
thank you for reply!
if I copy>pasted your code , i got an error
# Error: ('invalid syntax', ('', 2, 21, 'from pymel
import * \xe2\x80\xa8torus = polyTorus()[0] \xe2\x80\xa8normals =
torus.getNormals()\n'))
# File "", line 1
# from pymel import *
# torus = polyTorus()[0]
# normal
hey Chad,
thank you for tip, I reinstall my pymel and got it with just
copy&paste.
but I have other problem
arrMesh = mc.ls(sl=True)
#here i save mesh as string
print arrMesh[0]#prints |polySurface1
normals = arrMesh.getNormals()
#prints 'list' object has no attribute 'getNormals'
the mesh obje
ok...
but how I can save a mesh as variable to work with it in pymel?
My knowledge of pymel is to less,I don't know how I can get the mesh
from pymel import *
arrMesh = getMesh(selection=true) #it is possible to let a selected
mesh to be a arrMesh as pymel object
normals = arrMesh.getNormals()
yep, it works!
from pymel import *
arrMesh = ls(selection=True)[0]
print arrMesh
normals = arrMesh.getNormals()
it is also possible to get the middle point coordinate of each face in
the mesh?
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
mal(i)
arrMesh.getVertexNormalCoordinate(i)
how it is possible?
where i can download pymel documentation on my mac?to make possible
open it outline.
Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
iddle point of this array?
best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
support!
Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
Ofer, Chad,
but anyway it's interested how it's possible to get mesh middle point
- centroid of each poly in a mesh
it is possible to get it in the similar way as arrMesh.f[0].getNormal
()
arrMesh.f[0].centroid() - something like this?
all the bes
i put
print arrMesh.faces[0].getPositions()
or
print arrMesh.faces[0].getPosition()
and got
# AttributeError: 'MeshFace' object has no attribute 'getPositions' #
and checked at pymel docs there is just getPosition for vertexes but
not for faces
if i pasted
from pymel import *
v1=Vector([1,2,3]
hi,
try it:
from pymel import *
polyCu = polyCube(ax=(0,0,1))[0]
print polyCu
toSub=polyToSubdiv(polyCu, maxPolyCount=1, maxEdgesPerVert=32,
applyMatrixToResult=True)[0]
print toSub
mc.select(clear=True)
select(toSub, add=True)
best!
D
--~--~-~--~~~---~--~~
ht
ok,
then if u want select some elements from subdiv, like vertex or faces
select(toSub.vtx[0], add=True)#select first vertex
select(toSub.f[0], add=True)#select first face
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~
but if I trying to select unordered vertexes i got crash
#unitMesh= ls(selection=True)[0]
mc.select(clear=True)
select (unitMesh.vtx[6422:6429], add=True)
select (unitMesh.vtx[3273:3275, 3278:3279, 3282:3283, 3285], add=True)
nows somebody how possible to avoid it?
--~--~-~--~~--
Hi,
each vertex has own order(name, number),
it is possible to make own order?
best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
Thanks for the workaroun, i'll try it.
best!
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
line 1, in
# ImportError: cannot import name Vector #
and what means *args?
All the Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
successful.
All the Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
Hi Ashourl,
is there a mac version of mapy?
Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
ecent call last):
# File "", line 1, in
# ImportError: No module named pythonika #
any proposal?
All the Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
Hey Farsheed,
I'm from architectural background, I'm using python in maya for
generating of structures and forms.
Do you interested in such input? I have also an editor for my bad
english.
Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google
Hi Paige,
I did the same steps, what you described here, but I if I typing in
Eclipse:
import maya.standalone
maya.standalone.initialize()
print("hello World")
import maya.cmds as mc
def makeCube():
print "PolyCube was added."
mc.polyCube()
I got just my "hello World" in the console, b
Paige, thanx for rush replay!
I forgot something,
I got errors(graphical as red cross):
by
import maya.standalone
...
Unresolved import: maya
Unresolved import: maya.standalone
and by
import maya.cmds as mc
...
Unresolved import: mc
I didn't try the Chads way, to get maya directly, but I like mo
slowly I'm getting a filing that nobody got eclipse with maya on the
mac :(
i did everything to make it alive, so Chads video on youtube, did
"Paigs" tutorial, and installed Eclipse Maya Editor
http://www.highend3d.com/maya/tutorials/using_tools_scripts/367-2.html
but i there is no cube in maya w
me to mac book pro with version 10.5.7
but after install last version of pymel it seems to work(see help in
the zip file(it is possible to search it in finder, just put
eclipse)),
but i still haven't something showing in maya.
(can i put a screenshot here?)
by
import maya.standalone
import maya
Hey Guys,
I have a question according Vector Class(pymel)
is didn't find a add vector function, it's inside?
Thanks!
Best
Dima
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
Hi Guys,
it is possible to hide selected faces, by using pymel?
Is there invert selection command?
cheers,
Dima
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
tank you Chadrik,
a+b - it's easy, works and cool!
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
Hey Ryan,
thanks for the reply!
but I meant how is possible to read data from text file.
And I forgot to mention that I'm a mac user.
1000Thanx!
Dimitry
ps. since a long time I discovered your blog - great works!
--~--~-~--~~~---~--~~
http://groups.googl
Thanks Lutz,
Thanks Guys
strip and split - commands exactly what I needed!
Best!
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
aya window at 0,0,0 coordinate.
Could somebody of you guru guys help me please?
Thank you in advise!
Cheers,
Dimitry
--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---
I'd like to be added to that wave as well
dima.archit...@gmail.com
tanks
--
http://groups.google.com/group/python_inside_maya
stuff
http://www.cs.princeton.edu/~traer/physics/cloth/index.html
By the way how I can get the list/count of the all vertexes in one
mesh object?
Thank you in advise!
Best
Dimitry
--
http://groups.google.com/group/python_inside_maya
ve not yet stumbled on a
solution. Has anyone here encountered something similar? And if so, how did
you resolve it?
Kind regards,
Dimitry
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe
Hey guys,
Perhaps someone might be able to help me out: I have a piece of code that
creates a bunch of attributes, and afterwards I want to remove them, all using
the api. Here is the test code I wrote to do the same on a small set (this is
in Maya 2012):
import maya.OpenMaya as om
import maya
37 matches
Mail list logo