ScriptSpot

Forum topic · General Scripting

Grabing the name of a selected object

By JokerMartini · 2010-09-29

Description

How do you grab the name of an object in a selection.

ex. I have a selection of 10 spheres. (sphere01, sphere02, sphere03.....)

It doesn't matter which object I grab the name from, it just has to be in the current selection.

I ultimately want to rename the current object with its base text remaining so its new name would be "sphere02-collection"

Thanks
JokerMartini

Comments (1)

for o in selection do o.name

Graph · 2010-09-29

for o in selection do o.name += "-collection"

?