Skip to content

Instantly share code, notes, and snippets.

@tm8r
Last active August 23, 2024 11:37
Show Gist options
  • Save tm8r/a0cbdfd8574c1584bae44b2b9b83832f to your computer and use it in GitHub Desktop.
Save tm8r/a0cbdfd8574c1584bae44b2b9b83832f to your computer and use it in GitHub Desktop.
Mayaでシーンファイルに情報を埋め込む
from maya import cmds
print(cmds.fileInfo("custom_note",q=True))
cmds.fileInfo("custom_note", "test")
print(cmds.fileInfo("custom_note",q=True))
# fileInfoだけ変更したのちにFile>SaveSceneを実行すると変更なしと判定されるので、差し支えなければcmds.fileで強制的に保存した方が良い
cmds.file(save=True)
# result:
# []
# [u'test']
# http://help.autodesk.com/cloudhelp/2018/JPN/Maya-Tech-Docs/CommandsPython/fileInfo.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment