Comments (8)
Right, it should probably only ask when you have unsaved modifications in Tiled.
from tiled.
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.
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.
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.
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.
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.
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.
Reload and file-watching are finally there! Please give it some good testing.
from tiled.
Related Issues (20)
- Idea: To export Objects Only JSON file HOT 2
- Add a Selected Tile Preview to "Shape Fill Tool", just like the "Stamp Brush" has HOT 6
- tmxrasterizer's --hide-layer doesn't work with group layers HOT 1
- Scripting: Access Terrain Properties
- Issues compiling in Windows (newbie) HOT 3
- Automapping stops working when a project's rules.txt is modified during runtime. HOT 3
- "Blob Tileset" points to a broken link HOT 2
- Add map.fileName in tiled.registerMapFormat -> write HOT 2
- Unable to open a tmx file with a space in the filename using AppImage with the shell HOT 2
- Error with `libtiled` in Java 21: `java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException` HOT 1
- Any AI generated plugin? HOT 1
- Tile Animation Editor may not show additional tiles if source image resized
- World Map chunks getting loaded twice. HOT 4
- Scripting: Signal for brush changing
- Layer Blend Mode Property HOT 2
- Switch keyboard shortcuts for "Save As" and "Save All" HOT 3
- Custom Type Search/Filter HOT 2
- Patterned document background option
- AppStream metadata screenshots are missing a caption
- tileset not displaying HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiled.