I am trying to create a simple script in python that will allow me to select objects from my scene. What I did, is created a scene, and added 3 objects, a cube, a sphere and a cylinder, and they are named; Cube, Sphere and a Cylinder , respectively. I am trying to create a python script in which I want to select these objects within a time delay. So for example I want to select the Cylinder, then 1 second later I want to select the Cube and then 1 second after that I want to select the Sphere. At the end of my script all 3 objects should be selected. In my script they are all getting selected but they all get selected instantaneously at the end of the program. I used the time module for python to create the time delay of 1 second after I select one object, but it doesn't seem like the time delay does anything, because all 3 objects gets selected simultaneously. Here is my python script and blender project.
Firstly, I create an empty list, which i then fill up with the name of all the objects in my scene, in my case its only 3 objects. I then loop through those objects from my list / scene and select them 1 by 1 with a 1 second delay in between. However when the script ends all the objects are selected instantly. And yes, I did unselect everything before running the script.
Does anyone know how I can fix or re write my code, so when I run the script, it will select an object then wait for 1 second and select the other object and then wait 1 more second after that and select the last object.
Of course, I only used only 3 objects in my scene for simplicity reasons, but this script should of course work for any scene and any number of objects.