Currently I have this script.(IMAGE) but also attached the blend file for better understanding
https://www.mediafire.com/file/fjg3ger7lbukmlk/Text_s.py/file
https://www.mediafire.com/file/lr8yc0cttw3nkgh/test.blend/file
So what My code basically is doing for a selected object is as follows:- finding if object has Mirror modifier or not. If exists, I delete the already existing [Mirror] Modifier and make a new modifier Mirror with but with some pre-defined changes of its options:- like in my code, changing UV offset X to 1.0 from 0.0
My code works fine If I select just a object and run the script, but as soon as I select two objects. It gets frozen and eventually crashes.
I know this code description is too complicated. Don't mind it. For now I basically want to develop a code as follows:
If I select two or more objects in scene and when I run the script. my modifier[eg mirror] moves to top of modifier stack for both the objects.