abedd

1 answer · asked · Lesson: Intro to Dictionaries & Functions · Course: Introduction to Python Scripting

Hi Bassam, What if I had, say 300 object duplicates, and I wanted to apply a certain function to them all, but they are...

Hi Bassam, What if I had, say 300 object duplicates, and I wanted to apply a certain function to them all, but they are not selected ( it's hard to select them all as they are meshes converted from particles), let's assume the name of the object is apple and there are 299 duplicates of it, how do I go about listing them in python? Much appreciated
  • author
    if the name starts with apple you could use (for example): for ob in bpy.context.scene.objects if ob.name.startswith('apple'): ob.select = True or if apple is in the name but not the beginning: for ob in bpy.context.scene.objects if 'apple' in ob.name: ob.select = True