本文整理汇总了Python中maya.standalone.uninitialize函数的典型用法代码示例。如果您正苦于以下问题:Python uninitialize函数的具体用法?Python uninitialize怎么用?Python uninitialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uninitialize函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: exit_maya
def exit_maya():
import sys
# If we are in standalone we need to make a new file and uninitialize then the virtual machines crash
# if we do not use os._exit to properly exit Maya in CIRCLECI.
# https://groups.google.com/forum/#!topic/python_inside_maya/chpuSyLbryI
try:
import maya.standalone as ms
sys.stdout.write('Anvil is exiting Standalone Maya.')
mc.file(new=True, force=True)
sys.stdout.write('.')
sys.stdout.flush()
from pymel import versions
if not str(versions.current()).startswith('2016'):
ms.uninitialize()
sys.stdout.write('.')
sys.stdout.flush()
except:
pass
finally:
sys.stdout.write('Success...exiting.\n')
sys.stdout.flush()
import os
if os.getenv('CIRCLECI'):
os._exit(0)
示例2: main
def main():
flg = setup_log("logging.DEBUG")
search_dir = '//awexpress.westphal.drexel.edu/digm_anfx/SPRJ_cgbirds'
flg.debug("Initializing Maya")
# Starts interpreter
mcs.initialize(name='python')
flg.info("Maya Initialized")
output_file_name = gen_file_name()
test_file(output_file_name, search_dir)
files = get_ma_files(os.path.normpath(search_dir))
results = []
flg.info("Getting List of Unwanted Nodes")
bad_types = bad_types_list()
flg.info("Searching Files")
i = 0
j = 1
chunked = split_chunks(files, 250)
for c in chunked:
flg.debug("Searching Chunk {} out of {}".format(j, len(chunked)))
for f in c:
print("{} out of {} files".format(i, len(files)))
results.append(search_file(f, bad_types))
i += 1
flg.debug("Compiling results for chunk {}".format(j))
comp_res = compile_results(results,
'\r',
'*' * 150,
"Chunk {} out of {}".format(j, len(chunked)),
'*' * 150,
'\r'
)
array_to_file(comp_res, output_file_name)
j += 1
mcs.uninitialize()
flg.info("Maya uninitialized")
示例3: tearDownClass
def tearDownClass(cls):
standalone.uninitialize()
示例4: tearDownModule
def tearDownModule():
standalone.uninitialize()