Skip to content

Instantly share code, notes, and snippets.

@CGLion
Last active October 4, 2020 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CGLion/ae83bef30e44ad175551f29943fdcd10 to your computer and use it in GitHub Desktop.
Save CGLion/ae83bef30e44ad175551f29943fdcd10 to your computer and use it in GitHub Desktop.
Python for Blender - Prefix all selected objects name with their Blender data type like renaming “SomeModel” to “MESH_SomeModel” or for example
import bpy
objects = bpy.context.selected_objects
for i, o in enumerate(objects):
o.name = "{}_{}".format(o.type, o.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment