Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Time laps UI
- from pymel.core import *
- import shutil as s
- import os
- def startTimeLaps(*args):
- filePath = (os.path.expanduser("~/Documents/maya/timeLapsTracker.txt"))
- startFile = open(filePath, "w")
- print "Time Laps Started"
- def endTimeLaps(*args):
- filePath = (os.path.expanduser("~/Documents/maya/timeLapsTracker.txt"))
- startFile = open(filePath, "w")
- os.remove(filePath)#delete file
- print "Time Laps Stopped"
- def portConnect(*args):
- connectionPort = "localhost:6000"
- print "connecting to", connectionPort
- outsideWorld = commandPort(n= connectionPort, stp = "python")
- x = commandPort(connectionPort, q=1)# test Connections
- if x:
- print "Connected Sucsessfully"
- window = window(t="Time Laps", w = 40)
- layout = frameLayout(l = "Time Laps")
- tlConnect = button(l = "Connect", p = layout)
- layout2 = rowColumnLayout( numberOfRows= 2)
- startTLbtn = button(l = "Start", p = layout2)
- stopTLbtn = button(l = "Stop", p = layout2)
- startTLbtn.setCommand(startTimeLaps)
- stopTLbtn.setCommand(endTimeLaps)
- tlConnect.setCommand(portConnect)
- showWindow( window )
Advertisement
Add Comment
Please, Sign In to add comment