Thumbnail Saving - Daz Studio 4.21.1.103+

rbtwhizrbtwhiz Posts: 2,250
edited October 2023 in Daz Studio Discussion

A preference has been added that controls which thumbnail images to generate, and which extension to use, when saving DUF assets. The preference can be found on the Content page of the Preferences dialog, displayed when the Edit > Preferences... (F2) action is clicked.

The preference is handled in a tidy/orderly way when using one of the "- strict mode" options. This is due to the fact that not doing so can yield unexpected/confusing results. If both types of thumbnail images exist, the discrete extension (*.duf.png) will be the one displayed in asset views. The preference controls which type of thumbnail to save (and consequently, which type to clean up in "strict mode"), not which type of thumbnail to display. The type of thumbnail to display still functions the same way it has since it was first implemented - the inclusive extension (i.e., *.png) is a fallback when a discrete extension (e.g., *.duf.png, *.dsa.png, *.dse.png, *.obj.png, *.fbx.png, etc) file does not exist.

Saving Thumbnail images

  1. If the preference is set to the "Always save/replace thumbnail images" option
    1. If the preference is set to the "Use discrete thumbnail extension (*.duf.png)" option
      • An existing *.duf.png is renamed to *.duf.png.bak
      1. If rendering a new *.duf.png is successful
        • An existing *.duf.png.bak is deleted
      2. If rendering a new *.duf.png fails
        • An existing *.duf.png.bak is renamed to *.duf.png (i.e., restored)
    2. If the preference is set to the "Use discrete thumbnail extension (*.duf.png) - strict mode" option
      • An existing *.duf.png is renamed to *.duf.png.bak
      1. If rendering a new *.duf.png is successful
        • An existing *.duf.png.bak is deleted
        1. If all open/import-able files with the same basename in the same folder have corresponding *.ext.png files
          • An existing *.png is deleted
      2. If rendering a new *.duf.png fails
        • An existing *.duf.png.bak is renamed to *.duf.png (i.e., restored)
    3. If the preference is set to the "Use inclusive thumbnail extension (*.png) - strict mode" option
      • An existing *.png is renamed to *.png.bak
      1. If rendering a new *.png is successful
        • An existing *.png.bak is deleted
        • An existing *.duf.png is deleted
      2. If rendering a new *.png fails
        • An existing *.png.bak is renamed to *.png (i.e., restored)
  2. If the preference is set to the "Do not replace thumbnail images" option
    1. If the preference is set to the "Use discrete thumbnail extension (*.duf.png)" option
      1. If a *.duf.png AND a *.png do not exist
        • A new *.duf.png is rendered
      2. If a *.duf.png does not exist, but a *.png does exist
        • The existing *.png is copied to a 91x91 *.duf.png
      3. If a *.duf.png does exist
        • No rendering, renaming, deleting or restoring of any kind is performed
    2. If the preference is set to the "Use discrete thumbnail extension (*.duf.png) - strict mode" option
      1. If a *.duf.png AND a *.png do not exist
        • A new *.duf.png is rendered
      2. If a *.duf.png does not exist, but a *.png does exist
        1. If all open/import-able files with the same basename in the same folder have corresponding *.ext.png files
          • The existing *.png is renamed to *.duf.png
        2. If any open/import-able file with the same basename in the same folder does not have a corresponding *.ext.png file
          • The existing *.png is copied to a 91x91 *.duf.png
      3. If a *.duf.png does exist
        • No rendering, renaming, deleting or restoring of any kind is performed
    3. If the preference is set to the "Use inclusive thumbnail extension (*.png) - strict mode" option
      1. If a *.png AND a *.duf.png do not exist
        • A new *.png is rendered
      2. If a *.png does not exist, but a *.duf.png does exist
        • The existing *.duf.png is renamed to *.png
      3. If a *.png does exist
        • No rendering, renaming, deleting or restoring of any kind is performed
  3. If the preference is set to the "Do not save thumbnail images" option
    • No rendering, renaming, deleting or restoring of any kind is performed

Saving Tip images

  • NOTE: If a tip image is being rendered, the thumbnail image (respecting the outline above) is produced by saving a scaled copy of the tip image instead of wasting time/resources rendering twice
  1. If the preference is set to the "Always save/replace tip images" option
    • An existing *.tip.png is renamed to *.tip.png.bak
    1. If rendering a new *.tip.png is successful
      • An existing *.tip.png.bak is deleted
    2. If rendering a new *.tip.png fails
      • An existing *.tip.png.bak is renamed to *.tip.png (i.e., restored)
  2. If the preference is set to the "Do not replace tip images" option
    1. If a *.tip.png does not exist
      • A new *.tip.png is rendered
    2. If a *.tip.png does exist
      • No rendering, renaming, deleting or restoring of any kind is performed
  3. If the preference is set to the "Do not save tip images" option
    • No rendering, renaming, deleting or restoring of any kind is performed
Post edited by rbtwhiz on
This discussion has been closed.