def execute(my):
# get the search key from the delivered package
search_key = my.get_package_value("search_key")
# get the sobject from the server
sobject = my.server.get_by_search_key(search_key)
if not sobject:
raise Exception("SObject with search key [%s] does not exist" % \
search_key)
# code and verify in maya that the node is in session
code = sobject.get('code')
if not cmds.ls(code):
raise Exception("Cannot checkin: [%s] does not exist" % code)
my.set_output_value('sobject', sobject)
评论列表
文章目录