TrenchBroom
TrenchBroom copied to clipboard
Previewing external .map files in editor
Ericw's qbsp has supported using external .map files via a "misc_external_map" entity for a while now. I'm not sure if this possible (but I think one of you said it was a while back), but it would be really great if when using this entity, we could actually see the contents of the external .map in the currently open map, like if it was a model (so also be able to rotate it).
This would serve as a kind of basic instanced object system, and would alow to place and rotate instanced props much more naturally.
Please!
Yes, please!
So basically asking for map browser window like Entity Browser window? I am all for it - this way I can build modular pieces and keep them in the individual .map files, then work on actual master level picking modules from the preview windows.
No, I'm not asking for a new browser window, just the functionality to see external maps in the viewers rather than just a point entity.
I would absolutely adore this feature.
It sounds like this would fit nicely into TB as fgd files already provide a way to present bsp files in the map. Just needs some convention on where in the filesystem to load the compiled version dynamically from based on what the entity refers to, and then as a further development adding this prefab directory content to the entity browser so you can just drag in properly configured _external_map's into the map. Perhaps right-click on such an ent provides a way to open a TB session for the corresponding .map.
For reference, adding a misc_external_map
description in FGD with the following:
model({
"path": {{ _external_map }},
"scale": {{ _external_map_scale }}
})
And setting _external_map
on the entity to foo.bsp
correctly renders the external asset. This will not compile as qbsp needs that string to be set to foo.map
, but that's a smaller issue. Something more relevant is that there doesn't seem to be any way of connecting _external_map_angle(s)
to angle(s)
such that it dictates the rendered orientation, and interacts with the rotate operation.
See linked PR for a starting point.