Can you execute this:
import maya.api.OpenMaya as om2
selList = om2.MGlobal.getActiveSelectionList()
dag = selList.getDagPath(0)
matr = dag.inclusiveMatrix()
mesh = dag.child(0)
meshIntersect = om2.MMeshIntersector()
meshIntersect.create(mesh, matr)
I get an error, because it won`t accept the "
You should at least pass the identity matrix like this
meshIntersect.create(mesh, om2.MMatrix.identity)
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, se
Try this
matr = om2.MMatrix(dag.inclusiveMatrix())
meshIntersect.create(mesh, matr)
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to pyth
...I tried what you wrote in your last sentence with inverse matrix, but
may be its to late, I'm getting wrong results. I will try again tomorow,
thanks
2018-08-02 0:44 GMT+02:00 igo rov :
> Hi,
> as for the missing Matrix parameter, there is this thread:
> https://groups.google.com/forum/#!topic
Hi,
as for the missing Matrix parameter, there is this thread:
https://groups.google.com/forum/#!topic/python_inside_maya/axX7W8imeEU
I have the same problems as described there, if I pass the matrix I will
get this error: More keyword list entries (4) than format specifiers (2)
But you are right
Hey there,
“ ‘Point’ Specifies the location for which to evaluate the closest point on the
mesh. `point' is transformed using the matrix parameter passed to the create()
method, so for example if your matrix maps world to object space, then `point'
should be specified in world space.”
You shou
Really that much simple.
Thanks!!!
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to python_inside_maya+unsubscr...@googlegroups.com.
To vi
try:
do_something()except Exception as e:
cmds.warning(e)
On Wed, 1 Aug 2018 at 21:19, Virbhadra Gupta wrote:
> hello,
> i have a code where i am using try and except
>
> ex:
>
> try:
> do_something()
> except:
> cmds.warning("some error")
>
> function may give some error ex: "p
hello,
i have a code where i am using try and except
ex:
try:
do_something()
except:
cmds.warning("some error")
function may give some error ex: "pCube03 not found", "can't constraint
pCube02"
how can we catch that error message and use that in except as warning.
--
You received this
hi thanks,
I thought I did this with "worldM = childMatr * matr". But I first tried to
construct a matrix from "pos3d" in order to multiply the matrix.
The code I posted, works somehow, but not what I expect: the locator jumps
to a exposed point on the cube, but not on the nearest point to locat
10 matches
Mail list logo