maya 2017 CreatePolygonType() How to build text

715 views
Skip to first unread message

jettam

unread,
Sep 26, 2017, 2:55:30 PM9/26/17
to Python Programming for Autodesk Maya
I am using maya 2017 and I want to create text, with python.

I have not been able to find any documentation on this.

 I have found this command. mc.CreatePolygonType() but beyond that I have no idea how to set the text. Anyone know ?

Justin Israel

unread,
Sep 26, 2017, 3:12:18 PM9/26/17
to python_in...@googlegroups.com
Here is a good trick for learning how to use the commands API. In your script editor, under History, enable the echoing of commands. Now perform the UI action of creating some text. You will see Maya tell you the MEL commands it is executing. So you will end up seeing something like this:

textCurves -ch 0 -f "Times New Roman|wt:50|sz:28" -t "Maya";

That means you can lookup the textCurves command in Python:
 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/764727e7-403f-4ca0-8f06-b05aa2d1ba30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jettam

unread,
Sep 26, 2017, 3:33:27 PM9/26/17
to Python Programming for Autodesk Maya
In maya 2017 the way to build text seems new to me. The menu operation is Create/Type. This will pop up a text creation GUI. And reams and reams of echoed commands are returned, and the only thing I was able get from all this was the command CreatePolygonType().

Thanks for the link to that document. Hopefully I will be able to derive something from this.





On Tuesday, September 26, 2017 at 12:12:18 PM UTC-7, Justin Israel wrote:
On Wed, Sep 27, 2017 at 7:55 AM jettam <justin...@gmail.com> wrote:
I am using maya 2017 and I want to create text, with python.

I have not been able to find any documentation on this.

 I have found this command. mc.CreatePolygonType() but beyond that I have no idea how to set the text. Anyone know ?

Here is a good trick for learning how to use the commands API. In your script editor, under History, enable the echoing of commands. Now perform the UI action of creating some text. You will see Maya tell you the MEL commands it is executing. So you will end up seeing something like this:

textCurves -ch 0 -f "Times New Roman|wt:50|sz:28" -t "Maya";

That means you can lookup the textCurves command in Python:
 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages