I am working in a company where a dedicated 3D team uses Blender to create assets and backgrounds. For internal reasons, we are currently stuck with using Blender 2.93 in our pipeline, and we are planning to upgrade only when the next LTS release (Blender 3.3) comes out.
Meanwhile, there are some PCs on the floor that have different versions of Blender installed, from 2.83 to 3.1. So I would like to have a python code which would run every time we open a project file, check if the Blender version currently running is 2.93.x, and if not, it should either give an error and exit the file, or popup box that the user would have to acknowledge by clicking on some button (something similar to the Save / Don't Save dialog box we get while quitting an unsaved file)
What I have in mind :
Another required feature is to have the ability to block the saving of the current file, maybe with some error or warning popup. This is just because we are making a Asset Library using the new Asset Browser feature in Blender 3.1. As mentioned above, we cannot use the updated version directly in the project, but it will be used only for preview purposes. I do not want anyone to mistakenly open the Asset Library file in Blender 2.93, and save it over the 3.1 file, as it causes some compatibility issues. So combining two codes, one to check blender version, and other to block the saving option, will be a good safe guard for our purpose.
Thanks in advance!
Operator.report() method
But I couldn't get it to work for my purpose. Also, the Error message using this method can be easily missed or ignored. I need something that would have to be consciously acknowledged, if possible. $\endgroup$