bgdev.utils.name

Utility methods that parses names.

created

27/02/2017

author

Benoit GIELLY <benoit.gielly@gmail.com>

find_conflicts(query=False)[source]

Create two selection sets to store name conflicts.

Parameters

query (bool) – Only query the nodes without creating sets.

Returns

Two separate lists for conflicting transforms and shapes.

Return type

tuple

generate_unique_name(name)[source]

Generate a unique name based on the given one.

remove_end_digits(node, rename=True)[source]

Remove digits at the end of a name.

Parameters
  • node (str) – Name of the node to “cleanup”

  • rename (bool) – If True, rename the node, else just return the cleaned up name

Returns

Name of the node stripped ouf ot end digits.

Return type

str

remove_end_digits_callback()[source]

Call back remove_end_digits().

rename_deformers(node=None)[source]

Rename all the deformers in the history of the given node.

The name string will be build according to the deformerType and the node name

Parameters

node (str) – The node you want to rename deformers attached to it

Example

>>> node = "L_arm_geo"
>>> deformerType = "skinCluster"
>>> name = L_arm_geo_skinCluster"
rename_deformers_callback()[source]

Call back rename_deformers().