Uploaded image for project: 'Qt 3D Studio'
  1. Qt 3D Studio
  2. QT3DS-2657

Importing .materialdef files crashes

    XMLWordPrintable

Details

    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0348803 Miikka Heikkinen
            e0348803 Miikka Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes