Re: [Maya-Python] What is the best way to gather a list of values from ui and use it?

2017-03-15 Thread Justin Israel
On Thu, Mar 16, 2017 at 1:57 PM yann19 wrote: Suppose if the push buttons are 'Cube' and 'Duplicate', and I checked scale_x withthe min value being 1.0 while max value is 2.0, how should I write in `create_node()`? Should I store such variables as a dictionary or some sort

Re: [Maya-Python] Help setEdgeSmoothings() crisis

2017-03-15 Thread Justin Israel
On Thu, Mar 16, 2017 at 2:05 PM justin hidair wrote: > > import maya.OpenMaya as om > > msh=om.MSelectionList() > om.MGlobal.getActiveSelectionList(msh) > > mshdp=om.MDagPath() > msh.getDagPath(0,mshdp) > > meshfn=om.MFnMesh(mshdp) > > edgelist=om.MIntArray() > for i in

Re: [Maya-Python] Re: Command flag in symbolButton keeps erroring for me

2017-03-15 Thread Michael Boon
Lambdas are particularly confusing, too. Your original attempt command=lambda *x: self.add_btn_callback("item_list") doesn't actually call the function add_btn_callback, even though it looks like it does. It creates a new function that will call add_btn_callback later. I prefer partial instead,

[Maya-Python] Help setEdgeSmoothings() crisis

2017-03-15 Thread justin hidair
import maya.OpenMaya as om msh=om.MSelectionList() om.MGlobal.getActiveSelectionList(msh) mshdp=om.MDagPath() msh.getDagPath(0,mshdp) meshfn=om.MFnMesh(mshdp) edgelist=om.MIntArray() for i in xrange(meshfn.numEdges()): edgelist.append(i) smooths=om.MIntArray(edgelist.length(),1)

[Maya-Python] What is the best way to gather a list of values from ui and use it?

2017-03-15 Thread yann19
I got a couple of QPushButton(s) in which their text are changeable as user clicks on it. And also, a couple of QLineEdits that specify the minimum and maximum values for scaling. So when user clicks on the 'Create' button, it will takes in these texts as part of the information, and creates

[Maya-Python] Re: playblast resolution?

2017-03-15 Thread Michael Boon
Apparently 1920x1088 is considered full HD by a lot of software. Google shows several forum posts about it in various A/V forums. Also, apparently a lot of software ignores the 1088 and reports it as 1080, just to make it more confusing for the likes of us! On Thursday, 16 March 2017 09:16:58

[Maya-Python] Create item on mesh via mouse cursor position

2017-03-15 Thread likage
I am trying to do something as follows: - Within the viewport - Mouse cursor hover onto a pPlane for example (at any position) - Prior to the mouse cursor/ position, as user clicks on their mouse, it will create a locator right at the mouse cursor position that user has specified

[Maya-Python] playblast resolution?

2017-03-15 Thread Russel Rehmund
I've come across some strange behavior when playblasting motion jpeg .mov's from maya, namely that when I specify HD resolution, and then inspect it with ffprobe, ffprobe indicates that it's actually not HD but 1920 x 1088, with a display aspect ratio of 30:17what gives? Anyone come across

Re: [Maya-Python] closestPointOnPoly

2017-03-15 Thread David Moulder
Hi Paul, My apologies, you're right, I should have formed a better question with a simple example file but I suppose the heat of production is getting to me, thankfully Ian's answer was the perfect timely alternative. Thanks Ian! Today I can't replicate the issue, I was hoping to reply with a

Re: [Maya-Python] closestPointOnPoly

2017-03-15 Thread Paul Molodowitch
Hi David - a few tips when seeking help on this list: - Whenever possible, provide all the code necessary to set up the scene to test - Provide all the pertinent code to replicate the problem - This will generally mean extracting and simplifying your code. Do so. Doing this will mean more work

Re: [Maya-Python] closestPointOnPoly

2017-03-15 Thread David Moulder
Thanks for pointing this out Andres, It's not obvious from the gist but this uses PyMel. It's wrapping of the API lets you use strings for the space param. I believe its using a pymel enum under the hood before constructing the MSpace object. Cheers On Wed, Mar 15, 2017 at 4:16 AM, Andres