日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

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

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

據(jù)我所知,土生土長的瑪雅人使用

Code Page 1252 Windows Latin 1 (ANSI)

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

here

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

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

告誡

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

一些mayaControl沒有直接的qt實現(xiàn)(

gradientControlNoAttr

是一個新的發(fā)現(xiàn),并且是一個很好的例子)

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

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()

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

總結(jié)

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

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。