paya.lib.suffixes#

isTypeSuffix(string)#

Checks if ‘string’ looks like a type suffix, i.e. it’s a group of uppercase letters starting with a non-number, or is a value inside paya.lib.suffixes.suffixes.

Parameters

string – The string to inspect

Returns

True if ‘string’ looks like a type suffix, otherwise False.

Return type

bool

getFromName(name)#

Extracts a type suffix from a node name.

Parameters

name (str) – the name to inspect

Returns

The extracted suffix, if any.

Return type

str, None

load()#

Loads suffixes from suffixes.json.

dump()#

Dumps suffixes into suffixes.json.

learnFromHelp(htmlpath)#

Populates the suffixes dict from a dumped Maya help file.

To use this:

  • Navigate to the Maya ‘nodes index’ page

  • Turn on ‘tags’

  • Dump the main frame source code into an html file

  • Pass the file path to this method

To make changes permanent, call dump() afterwards.

Parameters

htmlpath (str) – the path to the saved html file

learnFromScene()#

Learns suffixes from node names in the current scene. To make changes permanent, call dump() afterwards.