Created
June 26, 2018 12:14
-
-
Save hexagit/4bb062daf0abae0ef9ace1af424d1dbe to your computer and use it in GitHub Desktop.
Mayaで現在のカメラに表示されているメッシュを選択する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#=========================================== | |
# 現在のカメラに表示されているオブジェクトを選択する | |
#=========================================== | |
import maya.OpenMaya as om_1 | |
import maya.OpenMayaUI as omUI_1 | |
# 現在選択されているビューの取得 | |
currentView = omUI_1.M3dView.active3dView() | |
# 選択ビューからのモデルの取得 | |
om_1.MGlobal.selectFromScreen( 0, 0, currentView.portWidth(), currentView.portHeight(), om_1.MGlobal.kReplaceList) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment