日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

maya python脚本转成不可编辑的_python文件、maya脚本编辑器和maya ui之间的文本编码(python 2.7、maya 2015、windows 7)...

發布時間:2024/3/26 python 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 maya python脚本转成不可编辑的_python文件、maya脚本编辑器和maya ui之间的文本编码(python 2.7、maya 2015、windows 7)... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

據我所知,土生土長的瑪雅人使用

Code Page 1252 Windows Latin 1 (ANSI)

如前所述的字符集(至少在Windows上…)

here

,而且在一些拉面之后,這些*看起來都像廣告上說的那樣工作。

我很想看到一個解釋如何改變它和訪問op所尋找的東西的答案,但是作為一個真正想要更多特殊字符的人的替代方案,我建議您學習pyside/qt來構建您的ui。

告誡

在制作“簡單的東西”時,需要更多的樣板和設置

一些mayaControl沒有直接的qt實現(

gradientControlNoAttr

是一個新的發現,并且是一個很好的例子)

示例是在假定用戶已安裝并使用

Qt.py

讓我們直接進入:

import maya.cmds as cmds

import maya.OpenMayaUI as omui

from Qt import QtCore, QtGui

from Qt.QtWidgets import *

from shiboken import wrapInstance

def maya_main_window():

main_window_ptr = omui.MQtUtil.mainWindow()

return wrapInstance(long(main_window_ptr), QWidget)

class TestUi(QDialog):

def __init__(self, parent=maya_main_window()):

super(TestUi, self).__init__(parent)

self.setAttribute(QtCore.Qt.WA_DeleteOnClose)

def create(self):

self.setWindowTitle("TestUi : Unicode")

self.setWindowFlags(QtCore.Qt.Tool)

self.create_controls()

self.create_layout()

self.create_connections()

def create_controls(self):

"""

Create the widgets for the dialog.

"""

# using "Python source code" unicode values

# ie: https://www.fileformat.info/info/unicode/char/2191/index.htm

self.up_button = QPushButton(u'\u2191')

self.down_button = QPushButton(u'\u2193')

self.left_button = QPushButton(u'\u2190')

self.right_button = QPushButton(u'\u2192')

def create_layout(self):

"""

Create the layouts & add widgets

"""

main_layout = QVBoxLayout()

main_layout.setContentsMargins(6, 6, 6, 6)

main_layout.addWidget(self.up_button)

main_layout.addWidget(self.down_button)

main_layout.addWidget(self.left_button)

main_layout.addWidget(self.right_button)

main_layout.addStretch()

self.setLayout(main_layout)

def create_connections(self):

"""

Create the signal/slot connections

"""

self.up_button.clicked.connect(self.on_button_pressed)

self.down_button.clicked.connect(self.on_button_pressed)

self.left_button.clicked.connect(self.on_button_pressed)

self.right_button.clicked.connect(self.on_button_pressed)

def on_button_pressed(self):

print "Button Pressed"

def LaunchUI():

if __name__ == "__main__":

# Development workaround for PySide winEvent error (Maya 2014)

# Make sure the UI is deleted before recreating

try:

test_ui.deleteLater()

test_ui.close()

except:

pass

# Create minimal UI object

test_ui = TestUi()

# Delete the UI if errors occur to avoid causing winEvent

# and event errors (in Maya 2014)

try:

test_ui.create()

test_ui.show()

except:

test_ui.deleteLater()

traceback.print_exc()

LaunchUI()

有很多東西要打開,但卻沒有得到巨大的回報,但相關的信息卻生活在“創建控制”之下。

總結

以上是生活随笔為你收集整理的maya python脚本转成不可编辑的_python文件、maya脚本编辑器和maya ui之间的文本编码(python 2.7、maya 2015、windows 7)...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。