5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Maya-PythonAdvent Calendar 2016

Day 9

Mayaからクリップボードを取得設定

Posted at

Maya上からクリップボードの取得設定を簡単に行う方法です。
PySide 依存ですが、Windows、OSX ともに使用できるはず・・・

#作業環境#

  • Windows10 Pro
  • Maya2016, 2017

#コード#

maya2016.py
from PySide import QtGui
cb = QtGui.QClipboard()

# 取得
data = cb.text()

# 設定
cb.setText(u'ふがふが')
maya2017.py
from PySide2 import QtGui
cb = QtGui.QClipboard()

# 取得
data = cb.text()

# 設定
cb.setText(u'ふがふが')
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?