Py5Shape.get_name()#

Get the name assigned to a Py5Shape object.

Examples#

example picture for get_name()

def setup():
    us_map = py5.load_shape("us_map.svg")
    for child in us_map.get_children():
        py5.println(child.get_name())

    py5.background(192)
    py5.scale(0.1)
    py5.translate(25, 225)
    py5.shape(us_map, 0, 0)

Description#

Get the name assigned to a Py5Shape object. Will return None if the object has no name.

Underlying Processing method: PShape.getName

Signatures#

get_name() -> str

Updated on March 06, 2023 02:49:26am UTC