}
bool pre( const scene::Path& path, scene::Instance& instance ) const {
- Selectable* selectable = Instance_getSelectable( instance );
+ if( path.top().get().visible() ){
+ Selectable* selectable = Instance_getSelectable( instance );
- // ignore worldspawn
- Entity* entity = Node_getEntity( path.top() );
- if ( entity ) {
- if ( string_equal( entity->getKeyValue( "classname" ), "worldspawn" ) ) {
- return true;
+ // ignore worldspawn
+ Entity* entity = Node_getEntity( path.top() );
+ if ( entity ) {
+ if ( string_equal( entity->getKeyValue( "classname" ), "worldspawn" ) ) {
+ return true;
+ }
}
- }
- if ( ( path.size() > 1 ) &&
- ( !path.top().get().isRoot() ) &&
- ( selectable != 0 )
- ) {
- for ( Unsigned i = 0; i < m_count; ++i )
- {
- if ( policy.Evaluate( m_aabbs[i], instance ) ) {
- selectable->setSelected( true );
+ if ( ( path.size() > 1 ) &&
+ ( !path.top().get().isRoot() ) &&
+ ( selectable != 0 ) &&
+ ( !node_is_group( path.top() ) )
+ ) {
+ for ( Unsigned i = 0; i < m_count; ++i )
+ {
+ if ( policy.Evaluate( m_aabbs[i], instance ) ) {
+ selectable->setSelected( true );
+ }
}
}
}
+ else{
+ return false;
+ }
return true;
}
: m_mode( mode ), m_selectable( 0 ){
}
bool pre( const scene::Path& path, scene::Instance& instance ) const {
+ if( !path.top().get().visible() ){
+ m_selectable = 0;
+ return false;
+ }
Selectable* selectable = Instance_getSelectable( instance );
if ( selectable ) {
switch ( m_mode )
: m_propertyvalues( propertyvalues ), m_prop( prop ){
}
bool pre( const scene::Path& path, scene::Instance& instance ) const {
+ if( !path.top().get().visible() ){
+ return false;
+ }
Entity* entity = Node_getEntity( path.top() );
if ( entity != 0
&& propertyvalues_contain( m_propertyvalues, entity->getKeyValue( m_prop ) ) ) {
SceneChangeNotify();
}
-void Select_FitTextureW( float horizontal, float vertical ){
- if ( GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ) {
- Scene_BrushFitTexture_SelectedW( GlobalSceneGraph(), horizontal, vertical );
- }
- Scene_BrushFitTexture_Component_SelectedW( GlobalSceneGraph(), horizontal, vertical );
-
- SceneChangeNotify();
-}
-
-void Select_FitTextureH( float horizontal, float vertical ){
- if ( GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ) {
- Scene_BrushFitTexture_SelectedH( GlobalSceneGraph(), horizontal, vertical );
- }
- Scene_BrushFitTexture_Component_SelectedH( GlobalSceneGraph(), horizontal, vertical );
-
- SceneChangeNotify();
-}
-
inline void hide_node( scene::Node& node, bool hide ){
hide
? node.enable( scene::Node::eHidden )