Hi everyone :)
I have a simple draggerContext tool that prints the square region of the
viewport like a marque. The problem is that I want to have a visual feedback
like the marquee tool has, that dotted openGL draw, is it possible or I have to
dive into the API? I did try to change the cursor type but all of them dont
give any drawing visual feedback like the native marquee tool. Thanks a lot in
adavance.
My code:
import maya.cmds as cmds
name = 'CustomTool'
if cmds.draggerContext(name, exists=True):
cmds.deleteUI(name)
def marquee():
pressPosition = cmds.draggerContext( name, query=True, anchorPoint=True)
dragPosition = cmds.draggerContext( name, query=True, dragPoint=True)
Pleft = int(pressPosition[0])
Pright = int(dragPosition[0])
Pbottom = int(dragPosition[1])
Ptop = int(pressPosition[1])
values = [Pleft,Pright,Pbottom,Ptop]
print values
cmds.draggerContext( name , releaseCommand=marquee,cursor='crossHair' )
cmds.setToolTo(name)
--
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.