Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Maya Python cmds.polyToCurve missing documentation??

Maya Python cmds.polyToCurve missing documentation??

such8
Contributor Contributor
3,959 Views
6 Replies
Message 1 of 7

Maya Python cmds.polyToCurve missing documentation??

such8
Contributor
Contributor

Hi

I cannot find the documentation for the cmds.polyToCurve python command. This is an existing command, as you can see on the screenshot it is correctly highlighted, and the code does run. 

 

But when I search for it in the documentation, there are no results.

https://help.autodesk.com/view/MAYAUL/2019/ENU/?guid=__CommandsPython_index_html

Why is this? Where is the documentation for this command?

0 Likes
Accepted solutions (1)
3,960 Views
6 Replies
Replies (6)
Message 2 of 7

kevin.picott
Alumni
Alumni

Thanks for the sharp eyes, it looks like this command didn't get documentation written for it. I'll file an internal request to get that added. In the meantime the documentation for the polyProjectCurve command can give you a good idea of what's available, and of course "cmds.help( 'polyProjectCurve' )" will give you the expected syntax as usual.



Kevin "Father of the DG" Picott

Senior Principal Engineer
Message 3 of 7

such8
Contributor
Contributor

Thank you for getting back to me. I was relying so heavily on the documentation, cmds.help completely slipped my mind. Now I at least know which flags to use. Thanks.

 

My original issue however still remains. This is what I am trying to achieve:

I have a selection of edges:

polytocurve2.PNG

And I want to convert it to a curve. When I do it with UI commands this is what happens:

polytocurve3.PNGpolytocurve.PNG

I would like to do achieve this with python commands.

 

But when I do this:

polytocurve6.PNG

I get the following error:

polytocurve4.PNG

Which tells me that I can't use the command for multiple edges? But clearly it works with the UI commands.

 

I tried to get around this by calling polyToCurve() for each selected edge separately, but that doesn't give me a smooth curve, just straight curve segments, as expected:

polytocurve7.PNG

 

Do you know how I might be able call polyToCurve for multiple edges at once?

0 Likes
Message 4 of 7

kevin.picott
Alumni
Alumni
Accepted solution

That's a two-fer - a completely different problem, hidden by the missing documentation. For some reason (the question which I'm appending to the documentation request) when you pass objects to the command it only accepts a single edge but when it uses the selection list it can accommodate an arbitrary number of edges.

The solution for you is to just call "cmds.polyToCurve()" without passing in the selection list.



Kevin "Father of the DG" Picott

Senior Principal Engineer
Message 5 of 7

such8
Contributor
Contributor

Thank you! You really helped me out.

0 Likes
Message 6 of 7

Fuchs_Leyenda
Participant
Participant

2023, almost 2024, still no documentation for this.

Message 7 of 7

absoluteKelvin
Collaborator
Collaborator

2025 and still no documentation

https://www.artstation.com/kelvintam
0 Likes