ZBrushCentral

3dconnexion expedient

I have tryed to create a Zscript for my 3dconnexion device:


     [vardef,xstep,1]
     [vardef,ystep,1]
     [vardef,zstep,1]
     
     //sensibility slider
     [Islider,"x",xstep,1,0,10,,,,80]
     
     
     //+XXXXXXXXXX
     
     [Ibutton,"+X",,
     
     [VarSet,xstep, [IGet,zscript:x]]
     [Ipress,Transform:Draw Pointer]
     [CanvasClick, 0, 0, xstep, 0]
     
     
     ]
     
     //-XXXXXXXXXX
     
     
     [Ibutton,"-X",,
     
     [VarSet,xstep, [IGet,zscript:x]]
     [Ipress,Transform:Draw Pointer]
     [CanvasClick, 0, 0, -xstep, 0]
     ]
     
     
this create 2 button to turn the object on Y axes then i create a little script for [Glovepie](http://carl.kenner.googlepages.com/glovepie_download) that press key 9 o 3 when i rotate my 3dconnesxion device:

     var.roll_on= Joystick1.roll - var.roll
     var.x=var.roll_on != 0
     
     if var.x then {
        if var.roll_on >0  then {
     	  Key.NUMPAD9=1
     	  Key.NUMPAD9=0
        }else{
     	  Key.NUMPAD3=1
     	  Key.NUMPAD3=0
     	  }
     }
     
     var.roll = Joystick1.roll
     
So if you assoce the hotkey 9 and 3 you can rotate the object with 3d device next step is to add the other axes there is 1 problem: some time the hotkeys don't work and i don't' know why ... PS:sorry for my english

i’m not a good scripter so if someone want to continue this script …