Py5Shape.get_name()

Get the name assigned to a Py5Shape object.

Examples

example picture for get_name()
1
2
3
4
5
6
7
8
9
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 Java method: PShape.getName

Syntax

get_name() -> str

Updated on September 11, 2021 16:51:34pm UTC