#include "renderstate.h"
#include "feedback.h"
#include "referencecache.h"
-
+#include "texwindow.h"
struct layout_globals_t
QE_InitVFS();
GlobalFileSystem().refresh();
g_vfsInitialized = true;
+ // also refresh texture browser
+ TextureBrowser_RefreshShaders();
}
void VFS_Restart(){
VFS_Shutdown();
Map_StartPosition();
g_currentMap = &g_map;
+
+ // restart VFS to apply new pak filtering based on mapname
+ // needed for daemon DPK VFS
+ VFS_Restart();
}
class Excluder
Map_UpdateTitle( g_map );
g_map.m_resource->attach( g_map );
+ // refresh VFS to apply new pak filtering based on mapname
+ // needed for daemon DPK VFS
+ VFS_Refresh();
}
void Map_Rename( const char* filename ){
FocusViews( g_vector3_identity, 0 );
g_currentMap = &g_map;
+
+ // restart VFS to apply new pak filtering based on mapname
+ // needed for daemon DPK VFS
+ VFS_Restart();
}
extern void ConstructRegionBrushes( scene::Node * brushes[6], const Vector3 ®ion_mins, const Vector3 ®ion_maxs );
*/
bool Map_SaveFile( const char* filename ){
ScopeDisableScreenUpdates disableScreenUpdates( "Processing...", "Saving Map" );
- return MapResource_saveFile( MapFormat_forFile( filename ), GlobalSceneGraph().root(), Map_Traverse, filename );
+ bool success = MapResource_saveFile( MapFormat_forFile( filename ), GlobalSceneGraph().root(), Map_Traverse, filename );
+ if ( success ) {
+ // refresh VFS to apply new pak filtering based on mapname
+ // needed for daemon DPK VFS
+ VFS_Refresh();
+ }
+ return success;
}
//
BuildStoreAvailableTags( g_TextureBrowser.m_available_store, g_TextureBrowser.m_assigned_store, g_TextureBrowser.m_all_tags, &g_TextureBrowser );
}
-void RefreshShaders(){
+void TextureBrowser_RefreshShaders(){
ScopeDisableScreenUpdates disableScreenUpdates( "Processing...", "Loading Shaders" );
- VFS_Refresh();
GlobalShaderSystem().refresh();
UpdateAllWindows();
GtkTreeSelection* selection = gtk_tree_view_get_selection((GtkTreeView*)GlobalTextureBrowser().m_treeViewTree);
GlobalCommands_insert( "DeleteTag", FreeCaller<TextureBrowser_deleteTag>() );
GlobalCommands_insert( "CopyTag", FreeCaller<TextureBrowser_copyTag>() );
GlobalCommands_insert( "PasteTag", FreeCaller<TextureBrowser_pasteTag>() );
- GlobalCommands_insert( "RefreshShaders", FreeCaller<RefreshShaders>() );
+ GlobalCommands_insert( "RefreshShaders", FreeCaller<VFS_Refresh>() );
GlobalToggles_insert( "ShowInUse", FreeCaller<TextureBrowser_ToggleHideUnused>(), ToggleItem::AddCallbackCaller( g_TextureBrowser.m_hideunused_item ), Accelerator( 'U' ) );
GlobalCommands_insert( "ShowAllTextures", FreeCaller<TextureBrowser_showAll>(), Accelerator( 'A', (GdkModifierType)GDK_CONTROL_MASK ) );
GlobalCommands_insert( "ToggleTextures", FreeCaller<TextureBrowser_toggleShow>(), Accelerator( 'T' ) );
void TextureBrowser_addActiveShadersChangedCallback( const SignalHandler& handler );
void TextureBrowser_addShadersRealiseCallback( const SignalHandler& handler );
+void TextureBrowser_RefreshShaders();
+
#endif