[PYTHON] Love was born with Maya Type tools

What is this?

Refer to here

Love was born in Python 2 http://qiita.com/NPoi/items/3cf386fa92d909913e31

I tried it with Maya's Type tool

The character was born

Type tool born in Maya 2016 Ext 2 スクリーンショット 2016-05-31 8.19.24.png

When you click スクリーンショット 2016-05-31 8.20.46.png

The character was born

If it doesn't work

If it doesn't work, check if the plugin is loaded.

import pymel.core as pm

pm.pluginInfo('Type',q=True,loaded=True)

Love was born

Select the type1 node,

スクリーンショット 2016-05-31 8.28.26.png

Switch to Japanese font.

スクリーンショット 2016-05-31 8.30.18.png

So, if you do the following

import pymel.core as pm

pm.selected()[0].textInput.set( "%02X" % (ord(u'Raw') & ord(u'death')) )
スクリーンショット 2016-05-31 8.49.00.png

Love was born

Summary

To enter characters from Python into the Type node, use the "textInput" attribute. But you can't just pass the string as it is, you need to replace it like the sample above.

reference

Omoto:

Love was born http://qiita.com/dongri/items/041ff3e7dde6c99beeb0

Create polygon text (Maya online documentation) http://help.autodesk.com/cloudhelp/2016/JPN/Maya/files/GUID-5715F385-F27A-49E0-A624-CB376B669EDC.htm

Recommended Posts

Love was born with Maya Type tools
Love was born in Python 2
Love was born in Python 3