View Issue Details

IDProjectCategoryView StatusLast Update
0005175DarkRadiantSaving and loadingpublic08.11.2020 18:34
Reportergreebo Assigned Togreebo  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.7.0 
Target Version2.8.0Fixed in Version2.8.0 
Summary0005175: Add Portable Map Format storing map and additional data in one single file
DescriptionSaving data in such a format isn't meant to be used by game engines or the likes, it's merely an interchange format which offers an alternative way of storing the map data. For compatibility reasons and since we're starting from scratch, an XML-based format is suited best.

Considerations:
- A single file is easier to pass around, the .darkradiant file is often forgotten or even getting out of sync.
- When exporting and importing data to/from the clipboard, it's possible to use the portable format to enable storage of grouping and layering information alongside the map geometry (see 0005090).
- XML is extensible and can be extended without having to change existing parsers when storing new data into it
- XML can be loaded and processed by the vast majority of systems
- To possible address 0005089, prefabs could be stored in the portable format to allow for grouping information to be preserved without having to ship .darkradiant auxiliary files.
TagsNo tags attached.

Relationships

related to 0005089 closedgreebo Preserve grouping information in prefabs 
related to 0005090 closedgreebo Preserve grouping information when copy-pasting between multiple open instances of DR 
related to 0005225 acknowledged Preserve layers when importing a map 

Activities

greebo

greebo

11.03.2020 15:08

administrator   ~0012255

Implemented as of 8ba24231
Dragofer

Dragofer

24.04.2020 11:13

developer   ~0012378

Last edited: 24.04.2020 11:17

I just exported a map in the new .mapx format, but when I try:
A) File -> Import map
or
B) File -> Open map
the new .mapx doesn't get shown. I have to set "Files of type:" from "Map (*.map)" to "All Files (*.*)" in order to be presented with the new .mapx file. Maybe extend the default to show .map and .mapx?
Dragofer

Dragofer

24.04.2020 11:16

developer   ~0012379

Last edited: 24.04.2020 11:20

Also, it doesn't look like layers information is properly transmitted in case A:

A) File -> Import map
Only the Default layer exists and everything is assigned to it.

B) File -> Open map
Working as intended: custom layers get created and assignments are correct.
greebo

greebo

24.04.2020 14:12

administrator   ~0012385

Yes, Import is not the same as Open. When importing maps or prefabs DR is not trying to preserve layer information, only grouping info. Same holds for importing prefabs.

I'll definitely check out the extensions not being shown in the Open dialogs, it makes sense for them to show up there.
greebo

greebo

24.04.2020 14:38

administrator   ~0012386

The mapx extension is showing up in the selection dialog now
Dragofer

Dragofer

24.04.2020 22:05

developer   ~0012394

Last edited: 24.04.2020 22:06

Maybe it's because of the name - something made me think if a map file is "portable" because it carries its layers and groupings with it, then "importing" it would preserve that information.

Having a way to transfer objects between maps while maintaining layer assignments would actually be quite useful - I often split up my WIPs into smaller .maps for faster load times, and since I sometimes have objects assigned to multiple layers it's sometimes not easy to merge the .maps together layer-by-layer. It's only a minor thing though, compared to preserving grouping information.
greebo

greebo

25.04.2020 04:17

administrator   ~0012397

I guess it's possible to add the option of keeping the Layer info when doing an import of another map or prefab. The code so far never even tried, it always settled for discarding the layer info.

Such an algorithm could match the layers only by their name of course, so if you happen to import a map that only incidentally has layers with a matching name, it could mess up your target map. But feel free to open another request for this, analogous to the "preserve grouping info" issue.

Related Changesets

DarkRadiant: master fd31ca40

16.04.2020 04:00

greebo


Details Diff
Related to 0005175, remove the unused MapEvent listeners from the layer classes. Since all layers are stored in the map root node now, the layer information is automatically discarded along with the host node. Affected Issues
0005175
mod - radiant/layers/LayerManager.cpp Diff File
mod - radiant/layers/LayerManager.h Diff File
mod - radiant/layers/LayerModule.cpp Diff File

DarkRadiant: master 77c146f5

24.04.2020 14:19

greebo


Details Diff
0005175: Portable mapx file extension should be listed in the Map Open file chooser dialogs. Affected Issues
0005175
mod - radiant/map/MapFileManager.cpp Diff File

DarkRadiant: master ced0c501

24.04.2020 14:37

greebo


Details Diff
0005175: FileChooser pre-selects the correct file filter based on a non-empty existing filename Affected Issues
0005175
mod - libs/wxutil/FileChooser.cpp Diff File
mod - libs/wxutil/FileChooser.h Diff File

Issue History

Date Modified Username Field Change
11.03.2020 15:07 greebo New Issue
11.03.2020 15:07 greebo Assigned To => greebo
11.03.2020 15:07 greebo Status new => assigned
11.03.2020 15:08 greebo Status assigned => resolved
11.03.2020 15:08 greebo Resolution open => fixed
11.03.2020 15:08 greebo Fixed in Version => 2.8.0
11.03.2020 15:08 greebo Note Added: 0012255
11.03.2020 15:08 greebo Relationship added related to 0005089
11.03.2020 15:08 greebo Relationship added related to 0005090
19.04.2020 16:26 greebo Changeset attached => DarkRadiant master fd31ca40
24.04.2020 11:13 Dragofer Note Added: 0012378
24.04.2020 11:16 Dragofer Note Added: 0012379
24.04.2020 11:16 Dragofer Assigned To greebo =>
24.04.2020 11:16 Dragofer Status resolved => feedback
24.04.2020 11:16 Dragofer Resolution fixed => reopened
24.04.2020 11:17 Dragofer Note Edited: 0012378
24.04.2020 11:20 Dragofer Note Edited: 0012379
24.04.2020 14:12 greebo Note Added: 0012385
24.04.2020 14:12 greebo Status feedback => new
24.04.2020 14:38 greebo Changeset attached => DarkRadiant master 77c146f5
24.04.2020 14:38 greebo Changeset attached => DarkRadiant master ced0c501
24.04.2020 14:38 greebo Note Added: 0012386
24.04.2020 14:38 greebo Assigned To => greebo
24.04.2020 14:38 greebo Status new => feedback
24.04.2020 22:05 Dragofer Note Added: 0012394
24.04.2020 22:06 Dragofer Note Edited: 0012394
25.04.2020 04:17 greebo Note Added: 0012397
25.04.2020 09:35 Dragofer Relationship added related to 0005225
25.04.2020 14:43 Dragofer Status feedback => resolved
25.04.2020 14:43 Dragofer Resolution reopened => fixed
08.11.2020 18:34 greebo Status resolved => closed