Skip to content

Reference

mayapythonprojecttemplate package.

create_locator(name='')

Create a locator with the given name.

Parameters:

Name Type Description Default
name str

The name to give the locator.

''

Returns:

Name Type Description
str str

The name of the locator that was created.

Source code in src/mayapythonprojecttemplate/example.py
 6
 7
 8
 9
10
11
12
13
14
15
def create_locator(name: str = "") -> str:
    """Create a locator with the given name.

    Args:
        name (str): The name to give the locator.

    Returns:
        str: The name of the locator that was created.
    """
    return cmds.spaceLocator(name=name)[0]