Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
Qt 3D Studio 2.2 BETA1
-
None
-
4d0b587d99f1755023b4f66071b09138b65a1d17
Description
Make a custom material in one project from e.g. asphalt.material and then create a new project and import the asphalt.materialdef from the previous project -> crash because asphalt.material shader file is missing. If the asphalt.material file is imported first, then importing asphalt.materialdef doesn't crash, but if the material had replaced some of the default textures with custom ones, the custom ones are not imported.
When parsing .materialdef with ParseSourcePathsOutOfEffectFile, paths in texture properties and the shader sourcepath need to be also added to the import map. This may required additional attribute for texture properties to identify them as texture properties, as we can't just try to import every property value from .materialdef file.
Also note that texture paths are typically in format "./../maps/foobar.png", making them relative to .materialdef file, but shader sourcepath seems to be relative to project root. So the paths may need to be cleaned up a bit before adding them to outPathMap.
Attachments
For Gerrit Dashboard: QT3DS-2657 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
245689,6 | Fix importing .materialdef files | master | qt3dstudio/qt3dstudio | Status: MERGED | +2 | 0 |