* new filter: Point Entities (nongroup entities besides misc_models and lights)
This commit is contained in:
parent
1c93ac30cf
commit
cc1f7ecd76
|
|
@ -40,14 +40,15 @@ enum
|
||||||
EXCLUDE_MODELS = 0x00000800,
|
EXCLUDE_MODELS = 0x00000800,
|
||||||
EXCLUDE_AREAPORTALS = 0x00001000,
|
EXCLUDE_AREAPORTALS = 0x00001000,
|
||||||
EXCLUDE_TRIGGERS = 0x00002000,
|
EXCLUDE_TRIGGERS = 0x00002000,
|
||||||
EXCLUDE_CLUSTERPORTALS = 0x00004000,
|
EXCLUDE_CLUSTERPORTALS = 0x00004000,
|
||||||
EXCLUDE_TERRAIN = 0x00008000,
|
EXCLUDE_TERRAIN = 0x00008000,
|
||||||
EXCLUDE_LIGHTGRID = 0x00010000,
|
EXCLUDE_LIGHTGRID = 0x00010000,
|
||||||
EXCLUDE_STRUCTURAL = 0x00020000,
|
EXCLUDE_STRUCTURAL = 0x00020000,
|
||||||
EXCLUDE_BOTCLIP = 0x00040000,
|
EXCLUDE_BOTCLIP = 0x00040000,
|
||||||
EXCLUDE_VISPORTALS = 0x00080000,
|
EXCLUDE_VISPORTALS = 0x00080000,
|
||||||
EXCLUDE_DECALS = 0x00100000,
|
EXCLUDE_DECALS = 0x00100000,
|
||||||
EXCLUDE_FUNC_GROUPS = 0x00200000,
|
EXCLUDE_FUNC_GROUPS = 0x00200000,
|
||||||
|
EXCLUDE_POINT_ENT = 0x00400000,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Filter
|
class Filter
|
||||||
|
|
|
||||||
|
|
@ -396,6 +396,18 @@ bool filter( const Entity& entity ) const {
|
||||||
|
|
||||||
filter_entity_world g_filter_entity_world;
|
filter_entity_world g_filter_entity_world;
|
||||||
|
|
||||||
|
class filter_entity_point : public EntityFilter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bool filter( const Entity& entity ) const {
|
||||||
|
return !entity.isContainer()
|
||||||
|
&& !entity.getEntityClass().miscmodel_is
|
||||||
|
&& !string_equal_prefix( entity.getEntityClass().name(), "light" );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
filter_entity_point g_filter_entity_point;
|
||||||
|
|
||||||
#include "qerplugin.h"
|
#include "qerplugin.h"
|
||||||
|
|
||||||
void Entity_InitFilters(){
|
void Entity_InitFilters(){
|
||||||
|
|
@ -406,6 +418,7 @@ void Entity_InitFilters(){
|
||||||
add_entity_filter( g_filter_entity_not_func_detail, EXCLUDE_STRUCTURAL );
|
add_entity_filter( g_filter_entity_not_func_detail, EXCLUDE_STRUCTURAL );
|
||||||
}
|
}
|
||||||
add_entity_filter( g_filter_entity_world, EXCLUDE_ENT, true );
|
add_entity_filter( g_filter_entity_world, EXCLUDE_ENT, true );
|
||||||
|
add_entity_filter( g_filter_entity_point, EXCLUDE_POINT_ENT );
|
||||||
add_entity_filter( g_filter_entity_trigger, EXCLUDE_TRIGGERS );
|
add_entity_filter( g_filter_entity_trigger, EXCLUDE_TRIGGERS );
|
||||||
add_entity_filter( g_filter_entity_misc_model, EXCLUDE_MODELS );
|
add_entity_filter( g_filter_entity_misc_model, EXCLUDE_MODELS );
|
||||||
add_entity_filter( g_filter_entity_doom3model, EXCLUDE_MODELS );
|
add_entity_filter( g_filter_entity_doom3model, EXCLUDE_MODELS );
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,7 @@ GtkToolbar* create_filter_toolbar(){
|
||||||
//toolbar_append_toggle_button( toolbar, "Paths (ALT + 8)", "texture_lock.png", "FilterPaths" );
|
//toolbar_append_toggle_button( toolbar, "Paths (ALT + 8)", "texture_lock.png", "FilterPaths" );
|
||||||
toolbar_append_space( toolbar );
|
toolbar_append_space( toolbar );
|
||||||
toolbar_append_toggle_button( toolbar, "Entities (ALT + 2)", "f-entities.png", "FilterEntities" );
|
toolbar_append_toggle_button( toolbar, "Entities (ALT + 2)", "f-entities.png", "FilterEntities" );
|
||||||
|
toolbar_append_toggle_button( toolbar, "Point Entities", "status_entiy.png", "FilterPointEntities" );
|
||||||
toolbar_append_toggle_button( toolbar, "Lights (ALT + 0)", "f-lights.png", "FilterLights" );
|
toolbar_append_toggle_button( toolbar, "Lights (ALT + 0)", "f-lights.png", "FilterLights" );
|
||||||
toolbar_append_toggle_button( toolbar, "Models (SHIFT + M)", "f-models.png", "FilterModels" );
|
toolbar_append_toggle_button( toolbar, "Models (SHIFT + M)", "f-models.png", "FilterModels" );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -206,6 +206,7 @@ void Filters_constructMenu( GtkMenu* menu_in_menu ){
|
||||||
create_check_menu_item_with_mnemonic( menu_in_menu, "Decals", "FilterDecals" );
|
create_check_menu_item_with_mnemonic( menu_in_menu, "Decals", "FilterDecals" );
|
||||||
}
|
}
|
||||||
create_check_menu_item_with_mnemonic( menu_in_menu, "FuncGroups", "FilterFuncGroups" );
|
create_check_menu_item_with_mnemonic( menu_in_menu, "FuncGroups", "FilterFuncGroups" );
|
||||||
|
create_check_menu_item_with_mnemonic( menu_in_menu, "Point Entities", "FilterPointEntities" );
|
||||||
// filter manipulation
|
// filter manipulation
|
||||||
menu_separator( menu_in_menu );
|
menu_separator( menu_in_menu );
|
||||||
create_menu_item_with_mnemonic( menu_in_menu, "Invert filters", "InvertFilters" );
|
create_menu_item_with_mnemonic( menu_in_menu, "Invert filters", "InvertFilters" );
|
||||||
|
|
@ -254,6 +255,7 @@ void ConstructFilters(){
|
||||||
add_filter_command( EXCLUDE_DECALS, "FilterDecals", Accelerator( 'D', GDK_SHIFT_MASK ) );
|
add_filter_command( EXCLUDE_DECALS, "FilterDecals", Accelerator( 'D', GDK_SHIFT_MASK ) );
|
||||||
}
|
}
|
||||||
add_filter_command( EXCLUDE_FUNC_GROUPS, "FilterFuncGroups", accelerator_null() );
|
add_filter_command( EXCLUDE_FUNC_GROUPS, "FilterFuncGroups", accelerator_null() );
|
||||||
|
add_filter_command( EXCLUDE_POINT_ENT, "FilterPointEntities", accelerator_null() );
|
||||||
|
|
||||||
PerformFiltering();
|
PerformFiltering();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user