本文整理汇总了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)
开发者ID:bugrevelio,项目名称:Anvil,代码行数:27,代码来源:dependencies.py
示例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")
开发者ID:theacb,项目名称:pesticide,代码行数:50,代码来源:pesticide.py
示例3: tearDownClass
def tearDownClass(cls):
standalone.uninitialize()
开发者ID:MWDD,项目名称:USD,代码行数:2,代码来源:testUsdImportColorSets.py
示例4: tearDownModule
def tearDownModule():
standalone.uninitialize()
开发者ID:danbradham,项目名称:shadeset,代码行数:2,代码来源:test_shadeset.py
注:本文中的maya.standalone.uninitialize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论