Expose BLI_string_flip_side_name as bpy.utils.flip_name

Expose a new function in `bpy.utils.flip_name(name, strip_number=False)
that allows flipping bone names, eg "Bone.L" -> "Bone.R".

Useful for add-ons to avoid re-implementing Blender's name flipping.

Ref D12322
This commit is contained in:
Demeter Dzadik
2021-11-10 01:14:56 +11:00
committed by Campbell Barton
parent accdd4c1bc
commit c092cc35b3
2 changed files with 60 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ not associated with blenders internal data.
__all__ = (
"blend_paths",
"escape_identifier",
"flip_name",
"unescape_identifier",
"keyconfig_init",
"keyconfig_set",
@@ -61,6 +62,7 @@ from _bpy import (
_utils_units as units,
blend_paths,
escape_identifier,
flip_name,
unescape_identifier,
register_class,
resource_path,