Py5Shape.get_name()#

Get the name assigned to a Py5Shape object.

Examples#

example picture for get_name()
1def setup():
2    us_map = py5.load_shape("us_map.svg")
3    for child in us_map.get_children():
4        py5.println(child.get_name())
5
6    py5.background(192)
7    py5.scale(0.1)
8    py5.translate(25, 225)
9    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

Syntax#

get_name() -> str

Updated on November 12, 2021 11:30:58am UTC