exit while loop as clicking right mouse

i would like to exit while loop as clicking right mouse button

i made this code

but that is right

snapMode.active=true

while mouse.buttonStates[1.3] == false do
(

)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jahman's picture

.

yuo need to ensure that pickPoint returns Point3 before accessing its x y z

dussla's picture

pls can you fix this

i made this ~ x y z
it is x axis code
and i make 10 number boxs
and tested per box
first box is good
but next box is not working ~

z is good
but a axiz is not work ~~
what problem ~~
pls can you teach ~

savesnap=snapMode.active
snapMode.active=true

while NOT keyboard.escPressed do
(

in coordsys local pta = pickpoint snap:#3d

if classOf pta == point3 do

(

sx = pta[1]
sy = pta[2]
sz = pta[3]

npx = [sx+300,sy,sz]

ptd = ( npx - pta )
nptd = normalize ptd
na = nptd[1]
nb = nptd[2]
nc = nptd[3]

in coordsys local $.EditablePoly.slice [na,nb,nc] pta flaggedFacesOnly:off

)

)

snapMode.active=false
macros.run "Selection" "SmartSelect"

jahman's picture

.

I don't understand what this code is supposed to do, sorry.

dussla's picture

really thank you~~~ good good good work ~

good good good
you are genius~~

jahman's picture

.

use scripted mouse tool for that purpose

dussla's picture

i this code but error~

sorry i don;t know well about script mouse tool

so i used keyboard escaped

but that is error~~]
what problem ~~

savesnap=snapMode.active
snapMode.active=true

while NOT keyboard.escPressed do
(

in coordsys local pta = pickpoint snap:#3d

sx = pta[1]
sy = pta[2]
sz = pta[3]

npx = [sx,sy,sz+300]

ptd = ( npx - pta )
nptd = normalize ptd
na = nptd[1]
nb = nptd[2]
nc = nptd[3]

-- in coordsys local Point pos: pta
in coordsys local $.EditablePoly.slice [na,nb,nc] pta flaggedFacesOnly:on

)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.