Giter Club home page Giter Club logo

Comments (8)

bjorn avatar bjorn commented on May 7, 2024

Right, it should probably only ask when you have unsaved modifications in Tiled.

from tiled.

encukou avatar encukou commented on May 7, 2024

Many editors (Kate, Gimp, Inkscape) have a reload/revert action that re-reads the file from disk, which may be better than either spamming a yes/no dialog or reloading quietly. F5 is a common shortcut for this.
Kate has an indicator showing that the file was changed/deleted on disk.

Unfortunately, in most editors a reload destroys undo history. Being able to undo the reload would be awesome; “Execute Command” could then easily be used for custom automapping-like scripts.

from tiled.

Storyyeller avatar Storyyeller commented on May 7, 2024

I have a custom python script that I use for automapping, and it is annoying having to manually close and reopen the file each time. This would definitely be helpful.

from tiled.

 avatar commented on May 7, 2024

I'd like to add a +1 to this as I've recently started using a custom command and need to reload the map to avoid issues. My game requires unique IDs per object to properly track state. Rather than making the IDs by hand, I mostly just randomly generate them from GUIDs in a separate app that can be run as an external command (so a simple F5 generates all the IDs I need and ensure's they are all unique). However if the map doesn't reload in the editor, saving again will remove the IDs again. This causes a workflow issue when level editing.

A potentially separate answer to what's proposed here is a slightly less ambitious fix which is to add functionality to the command system such that the command executed can return an exit code that indicates if the file needs to be reloaded. This would benefit scripts or programs that modify the files without having to do any major work to the infrastructure of Tiled. Another option would be to just add a checkbox to the commands panel to always reload after executing a command.

from tiled.

alaa-eddine avatar alaa-eddine commented on May 7, 2024

any news about this ?
I use external tool to add some custom game properties to the map and need that Tiled remain up to date with modifications from external tool.

from tiled.

Layoric avatar Layoric commented on May 7, 2024

Any idea on complexity of this feature @bjorn ? Would give it a crack myself but not great with C++ and having a quick look, seems it would be tricky keeping undo in sync.

Happy to throw a bit at bounty source to start things off if you think it's feasible to do / worth doing. Maybe worth working out how much it would cost to add so at least there is a target if others also want this feature?

from tiled.

MichaelAquilina avatar MichaelAquilina commented on May 7, 2024

I think the best way to deal with external changes that have been detected is similiar to how Qt Creator detects when you have changed your source code from an external editor (or git for example) - show a popup to the user asking if he would like to update to what is currently in the file. Does anyone else agree?

from tiled.

bjorn avatar bjorn commented on May 7, 2024

Reload and file-watching are finally there! Please give it some good testing.

from tiled.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.