trigger.library.naming
Functions
|
Convert the given vertex ids to ranged format. |
|
Checks the disk and returns all existing versions of a file in a list |
|
Gets the next EXISTING version of the file |
|
Gets a nice shorter name from the tagged mesh names |
|
Gets the previous EXISTING version of the file |
|
Create an uuid1 to prevent clashing issues. |
|
Increments the version number of the given file by one |
|
Check if the file is the latest version. |
|
Parse object name with given parameters |
Rename all skinClusters to match to the geometry names. |
|
|
builds the file name with the given new version |
|
Resolves the version of the given file |
|
Searches the scene for match and returns a unique name for given name |
Make sure that everything is named uniquely. |
Module Contents
- convert_to_ranged_format(ids, prefix='vtx')
Convert the given vertex ids to ranged format.
- Examples:
[1, 2, 3, 4, 5, 6, 7, 8, 9] -> [‘vtx[1:9]’] [1, 2, 3, 4, 5, 6, 7, 8, 9, 11] -> [‘vtx[1:9]’, ‘vtx[11]’]
- get_all_versions(file_path)
Checks the disk and returns all existing versions of a file in a list
- get_next_version(file_path)
Gets the next EXISTING version of the file
- get_part_name(node_dag_path)
Gets a nice shorter name from the tagged mesh names
- get_previous_version(file_path)
Gets the previous EXISTING version of the file
- get_uuid(prefix='uuid', short=True, no_dashes=True)
Create an uuid1 to prevent clashing issues.
- Args:
prefix: adds this to the start. Useful for making it compatible as node names. short: uses the first part of uuid until the first dash no_dashes: if True, the dashes in uuid will be removed
Returns: (string) uuid
- increment(file_path, force_version=True)
Increments the version number of the given file by one Checks the directory and makes a cross-check The returned file path is the next file version which does not exist yet
- is_latest_version(file_path)
Check if the file is the latest version.
- parse(labels, prefix='', suffix='', side='')
Parse object name with given parameters
- rename_skinclusters()
Rename all skinClusters to match to the geometry names.
- resolve_file_path(file_path, new_version, force=True)
builds the file name with the given new version
- resolve_version(file_path)
Resolves the version of the given file
- unique_name(name, return_counter=False, suffix=None)
Searches the scene for match and returns a unique name for given name Args:
name: (String) Name to query return_counter: (Bool) If true, returns the next available number instead of the object name suffix: (String) If defined and if name ends with this suffix, the increment numbers will be put before the.
Returns: (String) uniquename
- unique_scene()
Make sure that everything is named uniquely. Returns list of renamed nodes and list of new names