mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
* texBro.context menu: Select Textured Objects, Select Textured Surfaces
This commit is contained in:
@@ -184,6 +184,8 @@ Q3map2:
|
||||
* handle patch lodbounds in -shift and -scale
|
||||
* refactor to work without -maxshaderinfo limit, improve shader search performance
|
||||
* fix and simplify FloodAreas
|
||||
* support distinct lighting from different sky shaders in one map (by Tom Arrow)
|
||||
* -onesky: fallback to old behavior: any sky emits total of all suns/skylights in the map
|
||||
|
||||
|
||||
|
||||
@@ -377,6 +379,7 @@ menus...
|
||||
* shift + q: move-to LayersMenu
|
||||
* context menu for toolbar buttons configuration
|
||||
* Copy All in console context menu
|
||||
* texBro.context menu: Select Textured Objects, Select Textured Surfaces
|
||||
|
||||
misc...
|
||||
* removed note to save before going to preferences, project settings
|
||||
@@ -1148,8 +1151,6 @@ misc...
|
||||
* render camera crosshair sharply independently of viewport size, with shadow
|
||||
* support mixture of monitored and unmonitored build commands (do unmonitored run after 1st such command)
|
||||
* do Run Engine After Compile also after unmonitored builds
|
||||
* support distinct lighting from different sky shaders in one map (by Tom Arrow)
|
||||
* -onesky: fallback to old behavior: any sky emits total of all suns/skylights in the map
|
||||
* adjust icons in light GUI themes for better visibility
|
||||
|
||||
|
||||
|
||||
+15
-12
@@ -823,6 +823,11 @@ void Scene_EntityGetPropertyValues( scene::Graph& graph, const char *prop, Prope
|
||||
graph.traverse( EntityGetSelectedPropertyValuesWalker( prop, propertyvalues ) );
|
||||
}
|
||||
|
||||
void Scene_BrushPatchSelectByShader( const char *shader ){
|
||||
Scene_BrushSelectByShader( GlobalSceneGraph(), shader );
|
||||
Scene_PatchSelectByShader( GlobalSceneGraph(), shader );
|
||||
}
|
||||
|
||||
void Select_AllOfType(){
|
||||
if ( GlobalSelectionSystem().Mode() == SelectionSystem::eComponent ) {
|
||||
if ( GlobalSelectionSystem().ComponentMode() == SelectionSystem::eFace ) {
|
||||
@@ -830,20 +835,15 @@ void Select_AllOfType(){
|
||||
Scene_BrushSelectByShader_Component( GlobalSceneGraph(), TextureBrowser_GetSelectedShader() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else{
|
||||
PropertyValues propertyvalues;
|
||||
const char *prop = "classname";
|
||||
Scene_EntityGetPropertyValues( GlobalSceneGraph(), prop, propertyvalues );
|
||||
GlobalSelectionSystem().setSelectedAll( false );
|
||||
if ( !propertyvalues.empty() ) {
|
||||
if ( !propertyvalues.empty() )
|
||||
Scene_EntitySelectByPropertyValues( GlobalSceneGraph(), prop, propertyvalues );
|
||||
}
|
||||
else
|
||||
{
|
||||
Scene_BrushSelectByShader( GlobalSceneGraph(), TextureBrowser_GetSelectedShader() );
|
||||
Scene_PatchSelectByShader( GlobalSceneGraph(), TextureBrowser_GetSelectedShader() );
|
||||
}
|
||||
Scene_BrushPatchSelectByShader( TextureBrowser_GetSelectedShader() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -886,9 +886,12 @@ void Select_EntitiesByKeyValue( const char* key, const char* value ){
|
||||
}
|
||||
}
|
||||
|
||||
void Select_FacesAndPatchesByShader(){
|
||||
Scene_BrushFacesSelectByShader( GlobalSceneGraph(), TextureBrowser_GetSelectedShader() );
|
||||
Scene_PatchSelectByShader( GlobalSceneGraph(), TextureBrowser_GetSelectedShader() );
|
||||
void Select_FacesAndPatchesByShader( const char *shader ){
|
||||
Scene_BrushFacesSelectByShader( GlobalSceneGraph(), shader );
|
||||
Scene_PatchSelectByShader( GlobalSceneGraph(), shader );
|
||||
}
|
||||
void Select_FacesAndPatchesByShader_(){
|
||||
Select_FacesAndPatchesByShader( TextureBrowser_GetSelectedShader() );
|
||||
}
|
||||
|
||||
void Select_Inside(){
|
||||
@@ -1851,7 +1854,7 @@ void Select_registerCommands(){
|
||||
GlobalCommands_insert( "RotateSelectionClockwise", makeCallbackF( Selection_RotateClockwise ) );
|
||||
GlobalCommands_insert( "RotateSelectionAnticlockwise", makeCallbackF( Selection_RotateAnticlockwise ) );
|
||||
|
||||
GlobalCommands_insert( "SelectTextured", makeCallbackF( Select_FacesAndPatchesByShader ), QKeySequence( "Ctrl+Shift+A" ) );
|
||||
GlobalCommands_insert( "SelectTextured", makeCallbackF( Select_FacesAndPatchesByShader_ ), QKeySequence( "Ctrl+Shift+A" ) );
|
||||
|
||||
GlobalCommands_insert( "Undo", makeCallbackF( Undo ), QKeySequence( "Ctrl+Z" ) );
|
||||
GlobalCommands_insert( "Redo", makeCallbackF( Redo ), QKeySequence( "Ctrl+Shift+Z" ) );
|
||||
|
||||
@@ -28,6 +28,9 @@ void Select_GetBounds( Vector3& mins, Vector3& maxs );
|
||||
void Select_Delete();
|
||||
void deleteSelection();
|
||||
|
||||
void Scene_BrushPatchSelectByShader( const char *shader );
|
||||
void Select_FacesAndPatchesByShader( const char *shader );
|
||||
|
||||
void Select_EntitiesByKeyValue( const char* key, const char* value );
|
||||
|
||||
void Select_ConnectedEntities( bool targeting, bool targets, bool focus );
|
||||
|
||||
@@ -1608,6 +1608,15 @@ void TextureBrowser_ContextMenu( TextureBrowser& texBro, qreal deviceScale ){
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction( "Select Textured Objects", [&](){
|
||||
Scene_BrushPatchSelectByShader( shader->getName() );
|
||||
} );
|
||||
menu->addAction( "Select Textured Surfaces", [&](){
|
||||
Select_FacesAndPatchesByShader( shader->getName() );
|
||||
} );
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
auto *subMenu = menu->addMenu( "-> Recent" );
|
||||
for( const auto& folder : texBro.m_recent_folders ){
|
||||
subMenu->addAction( folder.c_str(), [&texBro, folder = folder.c_str()](){
|
||||
|
||||
Reference in New Issue
Block a user