Antidamage

Not sure if this is even a thing that can be done in the plugin, but when I re-import a lot of spine JSON files I have to sit there clicking "Yes to all" twice for each texture file that's overwritten. It can take hours. It doesn't remember the choice from the previous file. And it's not per JSON file, it's per texture. This is infuriating.

Is there any way to just get rid of the dialogue completely, or at least make it remember the first selection if it was "Yes to all"? Could it be a setting in the UFactory?
Antidamage
  • Сообщения: 27

badlogic

I have tried to figure that out myself for some time... Sadly, I can't find any documentation on this. The imports are reported one file at a time through the Reimport() method on the atlas asset factory.

spine-runtimes/SpineAtlasImportFactory.cpp at 3.8

That eventually calls AssetToolsModule.ImportAssets():

spine-runtimes/SpineAtlasImportFactory.cpp at 3.8

Which seems to trigger the dialog, over which we have no control. There's also no overload of ImportAssets that would allow us to say something like "remember my choice".

I'm afraid I have no good answer for this.
Аватара пользователя
badlogic

Mario
  • Сообщения: 2108

Antidamage

I've found a marginal fix that's probably good enough: when reimporting don't delete your atlas or data files, but DO delete all of the old textures it imported. That's what triggers the replacement dialogue. If you get rid of them first then you won't get any warnings importing the rest of it. Then only re-import the JSON file and it'll re-fetch everything it needs.

The other benefit to this is you won't need to restore the hard references to your spine assets in your actors, they'll stay as they were.

I'll add a button to the utility script I've been setting up to delete all of the images associated with the selected atlas, should make it a bit easier to find them if you're only reimporting selectively.
Antidamage
  • Сообщения: 27

badlogic

Oh, that's actually a good idea. I'm a bit hesitant adding "delete this file" functionality to spine-ue4. To many ways things can go wrong. And we'd rather not destroy user data.
Аватара пользователя
badlogic

Mario
  • Сообщения: 2108


Вернуться в Runtimes