Re: [Maya-Python] MMeshIntersector: Getting world position / matrix of point in object space

2018-08-02 Thread Cedric Bazillou
Hi guys ,
normally by design the closest point value returned by the intersector is 
in object space
http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__cpp_ref_closest_point_cmd_2closest_point_cmd_8cpp_example_html

in the function closestPointCmd::createDisplay( MPointOnMesh 
&
 
info, MMatrix 
&
 
matrix )
we go from local to worldspace by applying the mesh parent transform ( and 
its what is used as well for the matrix initialization.) is quite horrible 
that they labelled a local point as world point though..

i would as well stay as far as possible from the OpenMaya 2 layer if i can 
as you will soon see some hidden bugs and only 30 percent of the function 
are exposed ( dont concern yourself with pythonic argument as you will need 
to convert your code to c++ if your are serious about your work)

Le jeudi 2 août 2018 15:34:56 UTC-4, Luiz Amaral a écrit :
>
> OK I’m out of ideas now :/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/7aed4d19-7f93-415d-8f83-50a98dad7f4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] how to add hyperlink in text ?

2018-08-02 Thread Justin Israel
On Fri, Aug 3, 2018, 7:20 AM Virbhadra Gupta  wrote:

> hello,
>
> i have create a window. it has some text. i want to add hyperlink to some
> text let's www.google.com
>
> anyone know about it ?
> is it cmds.text() ?
>

http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/CommandsPython/text.html#flaghyperlink

> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/2285ee9c-f7ad-4042-8489-6de05e37cb75%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0JzSfVpgCeXE3QXiXWCRkdxSZTfWsjHCrF%2B5BxGVLcVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] MMeshIntersector: Getting world position / matrix of point in object space

2018-08-02 Thread Luiz Amaral
OK I’m out of ideas now :/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/d49e25b8-3d57-47d9-8bb5-c0af4442cff1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] how to add hyperlink in text ?

2018-08-02 Thread Virbhadra Gupta
hello,

i have create a window. it has some text. i want to add hyperlink to some 
text let's www.google.com

anyone know about it ?
is it cmds.text() ?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/2285ee9c-f7ad-4042-8489-6de05e37cb75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] MMeshIntersector: Getting world position / matrix of point in object space

2018-08-02 Thread igo rov
I get the same error

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/16e2c4e6-565a-41f8-b559-83c20ac28095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] MMeshIntersector: Getting world position / matrix of point in object space

2018-08-02 Thread Luiz Amaral
Try this

meshIntersect.create(mesh, om2.MMatrix(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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/9e6d8b5d-32d6-4bcc-b359-41b81a665a86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] MMeshIntersector: Getting world position / matrix of point in object space

2018-08-02 Thread igo rov
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 "matr" argument

Am Donnerstag, 2. August 2018 02:19:20 UTC+2 schrieb Luiz Amaral:
>
> 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, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/6455b845-aa61-4458-932b-867c1c16c895%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.