trigger.library.naming ====================== .. py:module:: trigger.library.naming Functions --------- .. autoapisummary:: trigger.library.naming.convert_to_ranged_format trigger.library.naming.get_all_versions trigger.library.naming.get_next_version trigger.library.naming.get_part_name trigger.library.naming.get_previous_version trigger.library.naming.get_uuid trigger.library.naming.increment trigger.library.naming.is_latest_version trigger.library.naming.parse trigger.library.naming.rename_skinclusters trigger.library.naming.resolve_file_path trigger.library.naming.resolve_version trigger.library.naming.unique_name trigger.library.naming.unique_scene Module Contents --------------- .. py:function:: 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]'] .. py:function:: get_all_versions(file_path) Checks the disk and returns all existing versions of a file in a list .. py:function:: get_next_version(file_path) Gets the next EXISTING version of the file .. py:function:: get_part_name(node_dag_path) Gets a nice shorter name from the tagged mesh names .. py:function:: get_previous_version(file_path) Gets the previous EXISTING version of the file .. py:function:: 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 .. py:function:: 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 .. py:function:: is_latest_version(file_path) Check if the file is the latest version. .. py:function:: parse(labels, prefix='', suffix='', side='') Parse object name with given parameters .. py:function:: rename_skinclusters() Rename all skinClusters to match to the geometry names. .. py:function:: resolve_file_path(file_path, new_version, force=True) builds the file name with the given new version .. py:function:: resolve_version(file_path) Resolves the version of the given file .. py:function:: 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 .. py:function:: unique_scene() Make sure that everything is named uniquely. Returns list of renamed nodes and list of new names