Send Decoded DUF Files to the Text Editor

Issue #2188 resolved
Midnight Arrow created an issue

I personally find it rather annoying that decoding a DSF/DUF file will automatically save it to the folder where the original file is.

  • There’s no indication what happened, making it look like the operation failed.
  • The file gets a *.txt appended to it, so it can’t even be substituted for the original file without browsing to the folder and doing manual tweaks.
  • It shouldn’t be adding files to a third-party asset folder.
  • Bringing it back into Blender’s text editor is a roundabout process which involves copying and pasting URLs.

I think the output should be piped directly to Blender’s text editor. It’s instantly available for the user to inspect, and it can easily be saved to a location of their choosing. Also, the operator should definitely have a self.report() call to indicate to the user that it succeeded. I thought it was broken at first.

Comments (6)

  1. Thomas Larsson repo owner

    The decode tool is mainly intended for my own debugging. Since I don’t use Blenders built-in editor but do all editing in Textpad, sending the result to the Blender editor makes no sense to me. The tool does write info in the terminal window, which I watch all the time while debugging.

    Decode D:\home\myblends\characters\briah\briah.dbz
    D:\home\myblends\characters\briah\briah.dbz.txt written
    

    But I had never heard of self.report(). Maybe it can be used elsewhere.

  2. Midnight Arrow reporter

    This is an importer, so I think it makes sense to import the DSON file into Blender, then use Blender to save it somewhere else. But if that’s your workflow, then so be it.

    Can you at least add an optional toggle in the file select menu for this behavior?

    But I had never heard of self.report(). Maybe it can be used elsewhere.

    self.report() is what makes the little text pop up on the bottom status bar when something goes wrong.

    It can definitely be used to replace that popup that says “This scene has been updated to use the latest render properties.” every time you load a scene. Typically you would have a brief string like “Render properties updated (See console for details)”.

  3. Thomas Larsson repo owner

    Implemented in last commit. A text block is created with the decoded file, but it doesn’t replace the content of the text editor. You must select the text block yourself.

    The plugin now reports when an operator has finished.

  4. Midnight Arrow reporter

    The tooltip is very vague, so I’d recommend elaborating on what it does when it is and isn’t toggled, but other than that I can confirm it works, thanks.

    This issue can be closed when appropriate.

  5. Log in to comment