pymel

How to use python (maya) multithreading

梦想的初衷 提交于 2019-12-01 01:05:49
I've been looking at examples from other people but I can't seem to get it to work properly. It'll either use a single core, or basically freeze up maya if given too much to process, but I never seem to get more than one core working at once. So for example, this is kind of what I'd like it to do, on a very basic level. Mainly just let each loop run simultaneously on a different processor with the different values (in this case, the two values would use two processors) mylist = [50, 100, 23] newvalue = [50,51] for j in range(0, len(newvalue)): exists = False for i in range(0, len(mylist)):

Maya Python: cmds.button( ) with UI passing variables and calling a function?

我怕爱的太早我们不能终老 提交于 2019-11-30 02:32:23
First of all, this seems to be a great place to learn more about programming. I've written a maya python script, where both functions work, I'm having trouble getting the UI button to call the superExtrude() function, though. The first function does the geometric mesh manipulations and the second one should produce the UI for the user inputs: import maya.cmds as cmds def superExtrude(extrScale, extrDist): """Loops through a list of selected meshes and extrudes all of the mesh faces to produce a polygon frame, based on existing mesh tesselations""" myObjectLt = cmds.ls(selection=True) for i in

Convert pyQt UI to python

混江龙づ霸主 提交于 2019-11-27 10:57:08
Is there a way to convert a ui formed with qtDesigner to a python version to use without having an extra file? I'm using Maya for this UI, and converting this UI file to a readable python version to implement would be really great! You can use pyuic4 command on shell: pyuic4 input.ui -o output.py If you are using windows, the PyQt4 folder is not in the path by default, you have to go to it before trying to run it: c:\Python27\Lib\site-packages\PyQt4\something> pyuic4.exe full/path/to/input.ui -o full/path/to/output.py or call it using its full path full/path/to/my/files> c:\Python27\Lib\site

use external python script to open maya and run another script inside maya

拜拜、爱过 提交于 2019-11-27 02:57:22
问题 Is it possible to call a script from the command prompt in windows (or bash in linux) to open Maya and then subsequently run a custom script (possibly changing each time its run) inside Maya? I am searching for something a bit more elegant than changing the userSetup file and then running Maya. The goal here is to be able to open a .mb file, run a script to position the scene inside, setup a generic set of lights and then render the scene to a specific place and file type. I want to be able