File-in DAT and accessing tags in extension init()

win 10, b2021.12380 (4.1 KB)

Issue 1

  • If you open the file (check the textport) you can see that the extension is initialized twice.
  • If you externally edit the py file, it will also init twice

Issue 2

  • close the toe file
  • enable line 25 in the py file #print(parent().tags)
  • open the toe file and check textport

On the first init, all prints before accessing the parent().tags get lost. In this case its missing the “INIT EXT START” print. On any subsequent initialization, this is not an issue

Issue 3
if you ctrl+e the /project1/test DAT touch opens a tmp copy of the FileInDAT content. But it should open the file referenced in the file parameter instead

Hey @Achim

Thanks for the report.

I was able to reproduce and logged an issue for a developer to look into it.


For issue #3, the File In DAT currently opens a temp file instead of the actual file because the default behaviour is not to load edits, and File In DATs are not actually editable. You’ll see in the RMB menu that it shows View contents rather than Edit Contents. If you want the file to sync with whatever is on disc, I’d use the Text DAT with the File Sync option instead. I do understand this is probably not intuitive though.