[Maya-Python] Re: Evenly spaced ellipse(s) when scaling

2022-10-11 Thread johancc
Looks like I needed to add the iterator instead of multiplying, noob mistake. *width = 7height = 3for i in range(4):my_circle = cmds.circle() cmds.scale(width+i,height+i,my_circle, xy=1)* Cheers A terça-feira, 11 de outubro de 2022 à(s) 19:31:54 UTC+1, johancc escreveu

[Maya-Python] Evenly spaced ellipse(s) when scaling

2022-10-11 Thread johancc
Hey all. So I need to keep the same space when duplicating and scaling a nurbs circle(turned into ellipse). The curves on the right of the image are the target(tweaked manually). On the left I just duplicated and scaled uniformly. I wonder what is the math to keep them with even width and heigh

Re: [Maya-Python] Distribute spheres on ellipse pattern with python

2022-10-10 Thread johancc
Hey Justin. That's awesome! Thanks a lot for looking into it. The only issue I have is that it doesn't evenly distribute the spheres along the ellipse, maybe that's not easy to accomplish? But this helps me a lot anyways. :) [image: ellipse.jpg] A segunda-feira, 10 de outubro de 2022 à(s) 08:38

[Maya-Python] Duplicate spheres in half circle

2022-10-07 Thread johancc
Hey, trying to create a radial pattern with a sphere in Python, but somehow I am missing the last sphere. [image: sphere.png] As you can see by the image and code below, I am trying to distribute 7 spheres in 180 degrees. If I set it to 360 degrees works fine as it already has the last point,

[Maya-Python] Re: How to mFnMesh.setFaceColors in python?

2022-09-07 Thread johancc
0]', 'pCube4.map[41]']} """ selList2 = om2.MGlobal.getActiveSelectionList() dagPath = selList2.getDagPath(0) selMesh = om2.MFnMesh(dagPath) vertList = list(set(selMesh.getVertices()[1])) lenVertList = len(vertList) for shell

[Maya-Python] How to mFnMesh.setFaceColors in python?

2022-09-07 Thread johancc
Hey all. I have the code below(part of it) to set different vertex colors per uv island, but I was told that setting vertex colors with cmds is quite *slow*, and *mFnMesh.setFaceColors *would be faster. With my current code how can I apply the vertex colors to the selection of faces using the ne

Re: [Maya-Python] Pyside2/Qt : Image as button with hover state

2022-06-24 Thread johancc
ton) window_wid.setLayout(vlayout_wid) window_wid.show() A sábado, 25 de junho de 2022 à(s) 05:50:59 UTC+1, johancc escreveu: > Hi, thanks for the reply. Honestly I didn't want to have another image on > the hover effect, I just wanted to darken it or light it somehow with code. > Jus

Re: [Maya-Python] Pyside2/Qt : Image as button with hover state

2022-06-24 Thread johancc
ore.Qt.PointingHandCursor)) my_button.setMaximumSize(200,100) vlayout_wid.addWidget(my_button) window_wid.setLayout(vlayout_wid) window_wid.show() A sábado, 25 de junho de 2022 à(s) 05:42:03 UTC+1, justin...@gmail.com escreveu: > On Sat, Jun 25, 2022 at 4:12 PM johancc wrote: > >> Q: How to add

[Maya-Python] Pyside2/Qt : Image as button with hover state

2022-06-24 Thread johancc
Q: How to add the hover state to this button I have (as an image)? I need it to have the "hand icon" when hovering and also some sort of overlay like a darkening/lighting effect. Is it possible with my current code? I am using pyside/qt inside a DCC application, in this case Autodesk Maya 2022.