maya

How to use an external interpreter for Maya?

∥☆過路亽.° 提交于 2020-01-06 07:26:28
问题 Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import maya.standalone ImportError: No module named maya.standalone This is my condition: Python version provided by Maya Environment variable PYTHONPATH set to sitepackages folder and MAYA_LOCATION to Maya root folder site-packages address appended to sys.path dll files are here in this address %:\Program Files\Autodesk\Maya2014\Python\DLLs I set the environment to address above and still got the same error Why should

Material and Texture Change Python Script

心不动则不痛 提交于 2020-01-06 06:40:07
问题 I am trying to make a script centered around changing the material via a drop-down menu and the texture via a slider. I am having some difficulty applying to a model. How can I change my script to fit this requirement? import maya.cmds as mc if mc.window("ram", exists =True): mc.deleteUI(ram) ram = mc.window("Material and Texture",t = "Material and Texture v0.9", w=300, h=300) mc.columnLayout(adj = True) imagePath = mc.internalVar(upd = True)+"icons/scriptlogo.jpg" mc.image(w=300,h=200,image

Keeping object selected in the Outliner after deselecting it in 3D View

谁都会走 提交于 2020-01-06 03:49:05
问题 I've created my own Graph Editor and Outliner, my problem is that I want to be able to keep the previously selected object selected in my Outliner so that it continues to display on the Graph Editor, but I'm also still able to select the attributes of that object and have the Graph Editor update. The effect I'm trying to get is what you get from the Auto Load Selected Objects feature in Autodesk Maya's Graph Editor. I've tried a few things with the selectionConnections , but I haven't quite

PyQt configuration and installation error

旧街凉风 提交于 2020-01-05 04:42:45
问题 I'm trying to install PyQt for Maya on my Macbook pro. I've succesfully installed Qt and Sip and I'm failing to install PyQt. The versions I'm using are OSX 10.6.8, Qt 4.7.1 - modified Autodesk Qt, Sip 4.13.2, PyQt 4.9.1 When configuring pyqt it succeeds but when building it fails. I think it might have something to do with the directory /Users/warnold being used in the configuration. It's listed four times but the directory doesn't exist and I don't know where it came from. Qt is installed

How could i convert a maya file into a json file and use it with three.js

喜欢而已 提交于 2020-01-04 08:17:29
问题 I want to use some maya files in my three.js project,but it seems like only the json files can be used in three.js So how can i convert those files? thank you! 回答1: Please have a look at the three.js Maya exporter. The scripts should be in your three.js folder/ utils / exporters / maya 来源: https://stackoverflow.com/questions/14919219/how-could-i-convert-a-maya-file-into-a-json-file-and-use-it-with-three-js

Python - Change the textField after browsing - MAYA

ぃ、小莉子 提交于 2020-01-03 05:47:35
问题 I've got the most annoying problem with my GUI Exporter in Maya. I've made the textField etc. work, but I can't change the value of the textField after it's created, which is what I need to do. What I want to do for example is, let's say the filepath is none from the beginning. The textField has now printed out: "None" in it, but after you press browse and select a directory, I want it to change None to the directory path etc. That's the only problem I currently have and the error code

Python in Maya - Query checkbox value

被刻印的时光 ゝ 提交于 2020-01-03 04:37:27
问题 Im super new to python and i have this little spare time project going on. And i cant find a solution to the following problem: I set up a GUI like this: flWin = mc.window(title="Foot Locker", wh=(210,85)) mc.columnLayout() mc.text(label='Frame Range') rangeField = mc.intFieldGrp(numberOfFields=2,value1=0, value2=0) mc.rowColumnLayout(numberOfRows=2) translateBox = mc.checkBox(label='Translation',value=True) mc.button(label="Bake it!", w=60, command="Bake()") rotateBox = mc.checkBox(label=

Maya Python Create and Use Zipped Package?

≡放荡痞女 提交于 2020-01-03 04:19:04
问题 Can anyone describe exactly how someone can create and execute a python zip package in Maya? A lot of tutorials and questions regarding this jump into the middle and assume certain knowledge. I need a simple example as a starting point. Folder/ scriptA.py scriptB.py scriptC.py ScriptA: Import ScriptB Import ScriptC Create zip of Folder In Maya Code to run Folder as if not zipped ScriptA.foo() In folder we have three scripts. ScriptA references the other two. I zip the folder with a program

Batch-constraining objects (feathers to a wing)

青春壹個敷衍的年華 提交于 2020-01-03 03:14:09
问题 really not long ago I had my first dumb question answered here so... there I am again, with a hopefully less dumb and more interesting headscratcher. Keep in my mind I am still making my baby steps in scripting ! There it is : I need to rig a feathered wing, and I already have all the feathers in place. I thought of mimicking another rig I animated recently that had the feathers point-constrained to the arm and forearm, and orient-constrained to three other controllers on the arm : each and

python execute list and list of functions [duplicate]

安稳与你 提交于 2020-01-02 23:36:39
问题 This question already has answers here : How to iterate through two lists in parallel? (5 answers) Closed 4 years ago . I'm utilizing Python 2.7 with Autodesk Maya. Here's an example of my issue: import maya.cmds as m def a(passedString): print('this'+passedString) def b(passedString): print('that'+passedString) def c(passedString): print('notThis'+passedString) def d(passedString): print('ofCourse'+passedString) string1 = [a(),b(),c(),d()] string2 = [poly1,poly2,poly3,poly4] for each in