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

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4921
    abedd
    Participant

      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

      #23222
      Bassam Kurdali
      Participant

        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

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The topic ‘Hi Bassam, What if I had, say 300 object duplicates, and I wanted to apply a certain function to them all, but they are…’ is closed to new replies.