i'm working on a "python script" in "MAYA", when i use "pm.fileDialog2" and when i click the exit button, the loop script is still running, i want when i open the file and click the close button "for loop" stops. Thank you for the help
this is the pyside and pymel script in "MAYA"
#file: run_script
_runScript(scripts=['file_a.py', 'file_b.py'])
def _runScript(scripts=[]):
if len(scripts):
for script in scripts:
exec(open(script).read(), globals())
#file: file_a
open_file = pm.fileDialog2(cap='Open File',ff='Maya Files (*.ma *.mb)', dir='C:/', ds=1, fm=4 )
if open_file:
print('Open File')
else:
print('Not Open')
#file: file_b
print('this is file_b')