简体   繁体   English

如何使用python在Maya中创建列表

[英]How to create list in Maya using python

Expected Output 预期产量 在此处输入图片说明

I want to create a UI in Maya 2014 which contains Layers and Camera given in the image .I don't know what widget to use for this.I tried to create and my code is given below. 我想在Maya 2014中创建一个UI,其中包含图像中给出的Layers和Camera。我不知道该使用哪个小部件。我尝试创建,下面给出了我的代码。

import maya.cmds as cmds

window = cmds.window( title="Render", iconName='BTD',widthHeight=
(400,300),titleBar=True,minimizeButton=True,maximizeButton=True )

inner_child5 = cmds.rowColumnLayout(numberOfColumns=1,rowSpacing = 
(1,5),columnOffset =(1,'left',10))

RL = cmds.text("Render Layers",width=200, 
height=50,font="boldLabelFont",align='left')

inner_child_5 = cmds.rowColumnLayout(numberOfColumns=2,columnOffset =
(1,'left',10),rowOffset = (1,"bottom",30))

Layers = cmds.text("Layers",width=100, 
height=10,font="boldLabelFont",align='left')

camera = cmds.text("Camera",width=200, 
height=10,font="boldLabelFont",align='left')

cmds.showWindow( window )

Please tell me how to get that output and what widget to use ? 请告诉我如何获取该输出以及要使用什么小部件?

Note: 注意:

I want to know that how to create the red lined part given in the image 我想知道如何创建图像中给定的红线部分

You might want a textScrollList widget ! 您可能需要一个textScrollList小部件! (Using two of them side by side). (并排使用其中两个)。

I can share with you the maya ui cheat sheet from Matt Murrey : 我可以与您分享Matt Murrey的maya ui备忘单:

https://drive.google.com/file/d/0B2TQxp8BzPdLSW5zaWwxZkUta3M/view?usp=drivesdk https://drive.google.com/file/d/0B2TQxp8BzPdLSW5zaWwxZkUta3M/view?usp=drivesdk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM