Lagaffe
Resource contributor
- Messages
- 963
- Country

Hello,
Last June, I migrated one of my projects from Blender 2.83 to Blender 3.6.18.
After a few failed attempts, I decided to delete my 34 materials and then recreate them one by one in the new file. The manipulation was a bit long but in two hours I could dispose of my new operational file.
Currently, I am on another project but it includes 6 Canso PBY aircraft, so 6 Blender files with almost 100 materials in each file.
I thought of doing the manipulation on one of the files then saving it then deleting all the materials from the 5 other files with a Python script and then importing the new materials into each remaining blender file.
Saying that, I just thought of another method that would be much more interesting and could troubleshoot other developers.
The idea would be to open an old Blender file in a recent version of Blender with a recent plugin and then by Python script to validate the "Migrate Material Data" button automatically for each hardware found in the Blender file.
The script written by SAL1800 to suppress any material can be a staring point:
Studing the contents of msfs_material_panel.py included in the last MSFS Export plugin (v1.3.3) , I have found that it is the procedure "msfs.migrate_material_data()" which is associated with the button "Migrate Material Data" via the interface.
Mixing the two scripts should produce the aim attented but how to do this ?
Does anyone have an idea?
Last June, I migrated one of my projects from Blender 2.83 to Blender 3.6.18.
After a few failed attempts, I decided to delete my 34 materials and then recreate them one by one in the new file. The manipulation was a bit long but in two hours I could dispose of my new operational file.
Currently, I am on another project but it includes 6 Canso PBY aircraft, so 6 Blender files with almost 100 materials in each file.
I thought of doing the manipulation on one of the files then saving it then deleting all the materials from the 5 other files with a Python script and then importing the new materials into each remaining blender file.
Saying that, I just thought of another method that would be much more interesting and could troubleshoot other developers.
The idea would be to open an old Blender file in a recent version of Blender with a recent plugin and then by Python script to validate the "Migrate Material Data" button automatically for each hardware found in the Blender file.
The script written by SAL1800 to suppress any material can be a staring point:
# Removal of all materials
import bpy
#Management of the list of primitives
primitives_types = {"MESH", "CURVE", "SURFACE", "META", "FONT"}
for obj in bpy.data.objects:
if obj.type in primitives_types:
obj.data.materials.clear()
Studing the contents of msfs_material_panel.py included in the last MSFS Export plugin (v1.3.3) , I have found that it is the procedure "msfs.migrate_material_data()" which is associated with the button "Migrate Material Data" via the interface.
Mixing the two scripts should produce the aim attented but how to do this ?
Does anyone have an idea?
Last edited:
