TomDym

From The Foundry MODO SDK wiki
Revision as of 10:49, 24 October 2019 by TomDym (Talk | contribs) (Created page with "=== DoWhileUserIsIdle === <pre> //If you try to execute a script while holding down a modifier like ctrl or shift, it will postpone execution until you release the modifier...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DoWhileUserIsIdle

//If you try to execute a script while holding down a modifier like ctrl or shift, it will postpone execution until you release the modifier
#python
import lx, lxifc
 
class visitor(lxifc.Visitor):                  
    def __init__(self):     # The initial setup method 
        pass
 
    def vis_Evaluate(self):                           
        lx.out("Visitor")
pSrv = lx.service.Platform()
vis = visitor()
com_visitor = lx.object.Unknown(vis)
pSrv.DoWhenUserIsIdle(com_visitor, lx.symbol.fUSERIDLE_MODIFIER_KEYS_UP)

//Too cancel it you need to pass exactly the same com object and flags
pSrv.CancelDoWhenUserIsIdle(com_visitor, lx.symbol.fUSERIDLE_MODIFIER_KEYS_UP )