Thanks i got it.

On Feb 8, 2018 3:30 PM, "Justin Israel" <justinisr...@gmail.com> wrote:

>
>
> On Thu, Feb 8, 2018, 5:40 PM Virbhadra Gupta <viru.gup...@gmail.com>
> wrote:
>
>> Here is sample code. It will give first click value and keeps on giving
>> same again so i am unable to know drag direction.
>>
>> contx = "valueDrag"
>>
>> def onDrag ():
>>     x = cmds.dragferContext(contx, q=True, ap=True)
>>
>
> This is going to query the anchorPoint each time, which is the start point
> of the drag. You probably ly want to query the dragPoint to get the current
> position
>
> x = cmds.draggerContext(contx, q=True, dp=True)
>
>     print x
>>
>>
>> if cmds.draggerContext(contx, q=True, ex=True):
>>     cmd.deleteUI(contx)
>> cmd.draggerContext(contx, dc=onDrag, cur="tumble")
>> cmds.setToolTo(contx)
>> ____________
>> Result will be like on mouse drag
>> All anchor point will come same it give only first point of click.
>>
>> (2,45,0)
>> (2,45,0)
>> (2,45,0)
>> (2,45,0)
>>
>> --
>> 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/bfde6c2b-0208-4d7b-b766-
>> 6a307fa386b6%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/python_inside_maya/VThpSpH6Fi0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAPGFgA05oSTOQdQXL8VPcxWu0rGbY
> MEqSiEe%2BEyCr0y98CJPzw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA05oSTOQdQXL8VPcxWu0rGbYMEqSiEe%2BEyCr0y98CJPzw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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/CAOWdtYY1PJTSZ4aGuJZP2G4gne-OBA4z2qcGS08KZfU%2BHCncpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to