Skip to content

Instantly share code, notes, and snippets.

@teionn
Last active June 5, 2018 04:46
Show Gist options
  • Save teionn/b171da1d0c45ac2fbea0b115715ca83d to your computer and use it in GitHub Desktop.
Save teionn/b171da1d0c45ac2fbea0b115715ca83d to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
#コーディング: utf-8
#------------------------------------------------------------------------------
import maya.cmds as cmds
#------------------------------------------------------------------------------
def testJob():
print cmds.listRelatives(cmds.ls(sl=True),shapes=True)
def main():
_title="testScriptJobWindow"
if cmds.window(_title,ex=True):cmds.deleteUI(_title)
_window=cmds.window(_title)
#スクリプトジョブの設定 windowにparentする
cmds.scriptJob(event=["SelectionChanged","testJob()"], parent=_window)
cmds.showWindow(_window)
#main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment