trigger.library.naming

Functions

convert_to_ranged_format(ids[, prefix])

Convert the given vertex ids to ranged format.

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, short, no_dashes])

Create an uuid1 to prevent clashing issues.

increment(file_path[, force_version])

Increments the version number of the given file by one

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])

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, suffix])

Searches the scene for match and returns a unique name for given name

unique_scene()

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