use Instance_isSelected() function
This commit is contained in:
parent
1acf0bb221
commit
66e6781c9b
|
|
@ -379,7 +379,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
Brush* brush = Node_getBrush( path.top() );
|
Brush* brush = Node_getBrush( path.top() );
|
||||||
if ( brush != 0
|
if ( brush != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected() ) {
|
&& Instance_isSelected( instance ) ) {
|
||||||
m_brushlist.push_back( brush );
|
m_brushlist.push_back( brush );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -397,7 +397,7 @@ void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
Brush* brush = Node_getBrush( path.top() );
|
Brush* brush = Node_getBrush( path.top() );
|
||||||
if ( brush != 0
|
if ( brush != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected()
|
&& Instance_isSelected( instance )
|
||||||
&& path.size() > 1 ) {
|
&& path.size() > 1 ) {
|
||||||
Path_deleteTop( path );
|
Path_deleteTop( path );
|
||||||
}
|
}
|
||||||
|
|
@ -424,7 +424,7 @@ void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
Brush* brush = Node_getBrush( path.top() );
|
Brush* brush = Node_getBrush( path.top() );
|
||||||
if ( brush != 0
|
if ( brush != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected()
|
&& Instance_isSelected( instance )
|
||||||
&& path.size() > 1
|
&& path.size() > 1
|
||||||
&& path.top().get_pointer() != m_keepNode ) {
|
&& path.top().get_pointer() != m_keepNode ) {
|
||||||
scene::Node& parent = path.parent();
|
scene::Node& parent = path.parent();
|
||||||
|
|
@ -622,7 +622,7 @@ void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
Brush* brush = Node_getBrush( path.top() );
|
Brush* brush = Node_getBrush( path.top() );
|
||||||
if ( brush != 0
|
if ( brush != 0
|
||||||
&& !Instance_getSelectable( instance )->isSelected() ) {
|
&& !Instance_isSelected( instance ) ) {
|
||||||
brush_vector_t buffer[2];
|
brush_vector_t buffer[2];
|
||||||
bool swap = false;
|
bool swap = false;
|
||||||
Brush* original = new Brush( *brush );
|
Brush* original = new Brush( *brush );
|
||||||
|
|
@ -734,7 +734,7 @@ void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
Brush* brush = Node_getBrush( path.top() );
|
Brush* brush = Node_getBrush( path.top() );
|
||||||
if ( brush != 0
|
if ( brush != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected() ) {
|
&& Instance_isSelected( instance ) ) {
|
||||||
const brushsplit_t split = Brush_classifyPlane( *brush, m_plane );
|
const brushsplit_t split = Brush_classifyPlane( *brush, m_plane );
|
||||||
if ( split.counts[ePlaneBack] && split.counts[ePlaneFront] ) {
|
if ( split.counts[ePlaneBack] && split.counts[ePlaneFront] ) {
|
||||||
// the plane intersects this brush
|
// the plane intersects this brush
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
void post( const scene::Path& path, scene::Instance& instance ) const {
|
void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Entity* entity = Node_getEntity( path.top() );
|
Entity* entity = Node_getEntity( path.top() );
|
||||||
if ( entity != 0
|
if ( entity != 0
|
||||||
&& ( instance.childSelected() || Instance_getSelectable( instance )->isSelected() ) ) {
|
&& ( instance.childSelected() || Instance_isSelected( instance ) ) ) {
|
||||||
entity->setKeyValue( m_key, m_value );
|
entity->setKeyValue( m_key, m_value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -95,7 +95,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
}
|
}
|
||||||
void post( const scene::Path& path, scene::Instance& instance ) const {
|
void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Entity* entity = Node_getEntity( path.top() );
|
Entity* entity = Node_getEntity( path.top() );
|
||||||
if ( entity != 0 && ( instance.childSelected() || Instance_getSelectable( instance )->isSelected() ) ) {
|
if ( entity != 0 && ( instance.childSelected() || Instance_isSelected( instance ) ) ) {
|
||||||
if( path.top().get_pointer() == m_world ){ /* do not want to convert whole worldspawn entity */
|
if( path.top().get_pointer() == m_world ){ /* do not want to convert whole worldspawn entity */
|
||||||
if( instance.childSelected() && !m_2world ){ /* create an entity from world brushes instead */
|
if( instance.childSelected() && !m_2world ){ /* create an entity from world brushes instead */
|
||||||
EntityClass* entityClass = GlobalEntityClassManager().findOrInsert( m_classname, true );
|
EntityClass* entityClass = GlobalEntityClassManager().findOrInsert( m_classname, true );
|
||||||
|
|
@ -230,7 +230,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
void post( const scene::Path& path, scene::Instance& instance ) const {
|
void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Entity* entity = Node_getEntity( path.top() );
|
Entity* entity = Node_getEntity( path.top() );
|
||||||
if ( entity != 0
|
if ( entity != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected()
|
&& Instance_isSelected( instance )
|
||||||
&& node_is_group( path.top() )
|
&& node_is_group( path.top() )
|
||||||
&& !groupPath ) {
|
&& !groupPath ) {
|
||||||
groupPath = &path;
|
groupPath = &path;
|
||||||
|
|
@ -251,8 +251,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
void post( const scene::Path& path, scene::Instance& instance ) const {
|
void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Selectable *selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable && selectable->isSelected() ) {
|
|
||||||
Entity* entity = Node_getEntity( path.top() );
|
Entity* entity = Node_getEntity( path.top() );
|
||||||
if ( entity == 0 && Node_isPrimitive( path.top() ) ) {
|
if ( entity == 0 && Node_isPrimitive( path.top() ) ) {
|
||||||
NodeSmartReference child( path.top().get() );
|
NodeSmartReference child( path.top().get() );
|
||||||
|
|
|
||||||
|
|
@ -340,22 +340,19 @@ gboolean searchEntryScroll( GtkWidget* widget, GdkEventScroll* event, gpointer u
|
||||||
if( node ){
|
if( node ){
|
||||||
scene::Instance* instance;
|
scene::Instance* instance;
|
||||||
gtk_tree_model_get_pointer( model, &iter, 1, &instance );
|
gtk_tree_model_get_pointer( model, &iter, 1, &instance );
|
||||||
Selectable* selectable = Instance_getSelectable( *instance );
|
if( Instance_isSelected( *instance ) || instance->childSelected() ){
|
||||||
if( selectable ){
|
if( iter_first.stamp == 0 ){
|
||||||
if( selectable->isSelected() || instance->childSelected() ){
|
iter_first = iter;
|
||||||
if( iter_first.stamp == 0 ){
|
}
|
||||||
iter_first = iter;
|
if( iter_found.stamp != 0 ){
|
||||||
}
|
iter_next = iter;
|
||||||
if( iter_found.stamp != 0 ){
|
break;
|
||||||
iter_next = iter;
|
}
|
||||||
break;
|
if( node == getEntityList().m_search_focus_node ){
|
||||||
}
|
iter_found = iter;
|
||||||
if( node == getEntityList().m_search_focus_node ){
|
}
|
||||||
iter_found = iter;
|
else{
|
||||||
}
|
iter_prev = iter;
|
||||||
else{
|
|
||||||
iter_prev = iter;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1246,9 +1246,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !path.top().get().isRoot() ) {
|
if ( !path.top().get().isRoot() ) {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected() ) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( m_makeUnique && instance.childSelected() ){ /* clone group entity primitives to new group entity */
|
if( m_makeUnique && instance.childSelected() ){ /* clone group entity primitives to new group entity */
|
||||||
|
|
@ -1271,9 +1269,7 @@ void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !path.top().get().isRoot() ) {
|
if ( !path.top().get().isRoot() ) {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected() ) {
|
|
||||||
NodeSmartReference clone( Node_Clone( path.top() ) );
|
NodeSmartReference clone( Node_Clone( path.top() ) );
|
||||||
Map_gatherNamespaced( clone );
|
Map_gatherNamespaced( clone );
|
||||||
Node_getTraversable( path.parent().get() )->insert( clone );
|
Node_getTraversable( path.parent().get() )->insert( clone );
|
||||||
|
|
@ -1748,7 +1744,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
Snappable* snappable = Node_getSnappable( path.top() );
|
Snappable* snappable = Node_getSnappable( path.top() );
|
||||||
if ( snappable != 0
|
if ( snappable != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected() ) {
|
&& Instance_isSelected( instance ) ) {
|
||||||
snappable->snapto( m_snap );
|
snappable->snapto( m_snap );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1771,7 +1767,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
ComponentSnappable* componentSnappable = Instance_getComponentSnappable( instance );
|
ComponentSnappable* componentSnappable = Instance_getComponentSnappable( instance );
|
||||||
if ( componentSnappable != 0
|
if ( componentSnappable != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected() ) {
|
&& Instance_isSelected( instance ) ) {
|
||||||
componentSnappable->snapComponents( m_snap );
|
componentSnappable->snapComponents( m_snap );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1219,9 +1219,7 @@ AnyInstanceSelected( bool& selected ) : m_selected( selected ){
|
||||||
m_selected = false;
|
m_selected = false;
|
||||||
}
|
}
|
||||||
void visit( scene::Instance& instance ) const {
|
void visit( scene::Instance& instance ) const {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected() ) {
|
|
||||||
m_selected = true;
|
m_selected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1819,8 +1817,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
}
|
}
|
||||||
void post( const scene::Path& path, scene::Instance& instance ) const {
|
void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( Node_isPrimitive( path.top() ) ){
|
if ( Node_isPrimitive( path.top() ) ){
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ){
|
||||||
if ( selectable && selectable->isSelected() ){
|
|
||||||
NodeSmartReference node( path.top().get() );
|
NodeSmartReference node( path.top().get() );
|
||||||
scene::Traversable* parent_traversable = Node_getTraversable( path.parent() );
|
scene::Traversable* parent_traversable = Node_getTraversable( path.parent() );
|
||||||
parent_traversable->erase( node );
|
parent_traversable->erase( node );
|
||||||
|
|
@ -1856,9 +1853,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( ++m_depth != 1 && path.top().get().isRoot() ) {
|
if ( ++m_depth != 1 && path.top().get().isRoot() ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance )
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected()
|
|
||||||
&& Node_isPrimitive( path.top() ) ) {
|
&& Node_isPrimitive( path.top() ) ) {
|
||||||
++m_count;
|
++m_count;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1881,7 +1881,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() ) {
|
||||||
Patch* patch = Node_getPatch( path.top() );
|
Patch* patch = Node_getPatch( path.top() );
|
||||||
if ( patch != 0
|
if ( patch != 0
|
||||||
&& Instance_getSelectable( instance )->isSelected() ) {
|
&& Instance_isSelected( instance ) ) {
|
||||||
m_functor( *patch );
|
m_functor( *patch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,7 @@ bool pre( const scene::Path& path, scene::Instance& instance, VolumeIntersection
|
||||||
renderable->viewChanged();
|
renderable->viewChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0 && selectable->isSelected() ) {
|
|
||||||
if ( GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ) {
|
if ( GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ) {
|
||||||
m_renderer.Highlight( Renderer::eFace );
|
m_renderer.Highlight( Renderer::eFace );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,9 +80,7 @@ void visit( scene::Instance& instance ) const {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( ( selectable != 0 )
|
|
||||||
&& instance.isSelected() ) {
|
|
||||||
// brushes only
|
// brushes only
|
||||||
if ( Instance_getBrush( instance ) != 0 ) {
|
if ( Instance_getBrush( instance ) != 0 ) {
|
||||||
m_bounds[m_count] = instance.worldAABB();
|
m_bounds[m_count] = instance.worldAABB();
|
||||||
|
|
@ -226,9 +224,7 @@ DeleteSelected()
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
m_removedChild = false;
|
m_removedChild = false;
|
||||||
|
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance )
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected()
|
|
||||||
&& path.size() > 1
|
&& path.size() > 1
|
||||||
&& !path.top().get().isRoot() ) {
|
&& !path.top().get().isRoot() ) {
|
||||||
m_remove = true;
|
m_remove = true;
|
||||||
|
|
@ -782,8 +778,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Entity* entity = Node_getEntity( path.top() );
|
Entity* entity = Node_getEntity( path.top() );
|
||||||
if ( entity != 0 ){
|
if ( entity != 0 ){
|
||||||
if( path.top().get_pointer() != m_world ){
|
if( path.top().get_pointer() != m_world ){
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) || instance.childSelected() ) {
|
||||||
if ( ( selectable != 0 && selectable->isSelected() ) || instance.childSelected() ) {
|
|
||||||
if ( !propertyvalues_contain( m_propertyvalues, entity->getKeyValue( m_prop ) ) ) {
|
if ( !propertyvalues_contain( m_propertyvalues, entity->getKeyValue( m_prop ) ) ) {
|
||||||
m_propertyvalues.push_back( entity->getKeyValue( m_prop ) );
|
m_propertyvalues.push_back( entity->getKeyValue( m_prop ) );
|
||||||
}
|
}
|
||||||
|
|
@ -806,9 +801,7 @@ EntityGetSelectedPropertyValuesWalker( const char *prop, PropertyValues& propert
|
||||||
: m_propertyvalues( propertyvalues ), m_prop( prop ), m_selected_children( false ), m_world( Map_FindWorldspawn( g_map ) ){
|
: m_propertyvalues( propertyvalues ), m_prop( prop ), m_selected_children( false ), m_world( Map_FindWorldspawn( g_map ) ){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected() ) {
|
|
||||||
Entity* entity = Node_getEntity( path.top() );
|
Entity* entity = Node_getEntity( path.top() );
|
||||||
if ( entity != 0 ) {
|
if ( entity != 0 ) {
|
||||||
if ( !propertyvalues_contain( m_propertyvalues, entity->getKeyValue( m_prop ) ) ) {
|
if ( !propertyvalues_contain( m_propertyvalues, entity->getKeyValue( m_prop ) ) ) {
|
||||||
|
|
@ -931,9 +924,7 @@ HideSelectedWalker( bool hide )
|
||||||
: m_hide( hide ){
|
: m_hide( hide ){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected() ) {
|
|
||||||
g_nodes_be_hidden = m_hide;
|
g_nodes_be_hidden = m_hide;
|
||||||
hide_node( path.top(), m_hide );
|
hide_node( path.top(), m_hide );
|
||||||
}
|
}
|
||||||
|
|
@ -1491,8 +1482,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Entity* entity = Node_getEntity( path.top() );
|
Entity* entity = Node_getEntity( path.top() );
|
||||||
if ( entity != 0 ){
|
if ( entity != 0 ){
|
||||||
if( path.top().get_pointer() != m_world ){
|
if( path.top().get_pointer() != m_world ){
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) || instance.childSelected() ) {
|
||||||
if ( ( selectable != 0 && selectable->isSelected() ) || instance.childSelected() ) {
|
|
||||||
const char* keyvalue = entity->getKeyValue( m_prop );
|
const char* keyvalue = entity->getKeyValue( m_prop );
|
||||||
if ( !string_empty( keyvalue ) && !propertyvalues_contain( m_propertyvalues, keyvalue ) ) {
|
if ( !string_empty( keyvalue ) && !propertyvalues_contain( m_propertyvalues, keyvalue ) ) {
|
||||||
m_propertyvalues.push_back( keyvalue );
|
m_propertyvalues.push_back( keyvalue );
|
||||||
|
|
|
||||||
|
|
@ -2678,13 +2678,10 @@ PlaneSelectableSelectPlanes( Selector& selector, SelectionTest& test, const Plan
|
||||||
: m_selector( selector ), m_test( test ), m_selectedPlaneCallback( selectedPlaneCallback ){
|
: m_selector( selector ), m_test( test ), m_selectedPlaneCallback( selectedPlaneCallback ){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() && Instance_isSelected( instance ) ) {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
||||||
if ( selectable != 0 && selectable->isSelected() ) {
|
if ( planeSelectable != 0 ) {
|
||||||
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
planeSelectable->selectPlanes( m_selector, m_test, m_selectedPlaneCallback );
|
||||||
if ( planeSelectable != 0 ) {
|
|
||||||
planeSelectable->selectPlanes( m_selector, m_test, m_selectedPlaneCallback );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2700,13 +2697,10 @@ PlaneSelectableSelectReversedPlanes( Selector& selector, const SelectedPlanes& s
|
||||||
: m_selector( selector ), m_selectedPlanes( selectedPlanes ){
|
: m_selector( selector ), m_selectedPlanes( selectedPlanes ){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() && Instance_isSelected( instance ) ) {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
||||||
if ( selectable != 0 && selectable->isSelected() ) {
|
if ( planeSelectable != 0 ) {
|
||||||
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
planeSelectable->selectReversedPlanes( m_selector, m_selectedPlanes );
|
||||||
if ( planeSelectable != 0 ) {
|
|
||||||
planeSelectable->selectReversedPlanes( m_selector, m_selectedPlanes );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2809,13 +2803,10 @@ PlaneSelectable_bestPlaneDirect( SelectionTest& test, Plane3& plane )
|
||||||
: m_test( test ), m_plane( plane ), m_intersection(){
|
: m_test( test ), m_plane( plane ), m_intersection(){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() && Instance_isSelected( instance ) ) {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
||||||
if ( selectable != 0 && selectable->isSelected() ) {
|
if ( planeSelectable != 0 ) {
|
||||||
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
planeSelectable->bestPlaneDirect( m_test, m_plane, m_intersection );
|
||||||
if ( planeSelectable != 0 ) {
|
|
||||||
planeSelectable->bestPlaneDirect( m_test, m_plane, m_intersection );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2832,13 +2823,10 @@ PlaneSelectable_bestPlaneIndirect( SelectionTest& test, Plane3& plane, Vector3&
|
||||||
: m_test( test ), m_plane( plane ), m_intersection( intersection ), m_dist( FLT_MAX ){
|
: m_test( test ), m_plane( plane ), m_intersection( intersection ), m_dist( FLT_MAX ){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() && Instance_isSelected( instance ) ) {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
||||||
if ( selectable != 0 && selectable->isSelected() ) {
|
if ( planeSelectable != 0 ) {
|
||||||
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
planeSelectable->bestPlaneIndirect( m_test, m_plane, m_intersection, m_dist );
|
||||||
if ( planeSelectable != 0 ) {
|
|
||||||
planeSelectable->bestPlaneIndirect( m_test, m_plane, m_intersection, m_dist );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2853,13 +2841,10 @@ PlaneSelectable_selectByPlane( const Plane3& plane )
|
||||||
: m_plane( plane ){
|
: m_plane( plane ){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
if ( path.top().get().visible() ) {
|
if ( path.top().get().visible() && Instance_isSelected( instance ) ) {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
||||||
if ( selectable != 0 && selectable->isSelected() ) {
|
if ( planeSelectable != 0 ) {
|
||||||
PlaneSelectable* planeSelectable = Instance_getPlaneSelectable( instance );
|
planeSelectable->selectByPlane( m_plane );
|
||||||
if ( planeSelectable != 0 ) {
|
|
||||||
planeSelectable->selectByPlane( m_plane );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -7386,8 +7371,7 @@ testselect_component_visible_selected( Selector& selector, SelectionTest& test,
|
||||||
: m_selector( selector ), m_test( test ), m_mode( mode ){
|
: m_selector( selector ), m_test( test ), m_mode( mode ){
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0 && selectable->isSelected() ) {
|
|
||||||
ComponentSelectionTestable* componentSelectionTestable = Instance_getComponentSelectionTestable( instance );
|
ComponentSelectionTestable* componentSelectionTestable = Instance_getComponentSelectionTestable( instance );
|
||||||
if ( componentSelectionTestable ) {
|
if ( componentSelectionTestable ) {
|
||||||
componentSelectionTestable->testSelectComponents( m_selector, m_test, m_mode );
|
componentSelectionTestable->testSelectComponents( m_selector, m_test, m_mode );
|
||||||
|
|
@ -7551,9 +7535,7 @@ bounds_selected( AABB& bounds )
|
||||||
m_bounds = AABB();
|
m_bounds = AABB();
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected() ) {
|
|
||||||
aabb_extend_by_aabb_safe( m_bounds, Instance_getPivotBounds( instance ) );
|
aabb_extend_by_aabb_safe( m_bounds, Instance_getPivotBounds( instance ) );
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -7569,9 +7551,7 @@ bounds_selected_component( AABB& bounds )
|
||||||
m_bounds = AABB();
|
m_bounds = AABB();
|
||||||
}
|
}
|
||||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||||
Selectable* selectable = Instance_getSelectable( instance );
|
if ( Instance_isSelected( instance ) ) {
|
||||||
if ( selectable != 0
|
|
||||||
&& selectable->isSelected() ) {
|
|
||||||
ComponentEditable* componentEditable = Instance_getComponentEditable( instance );
|
ComponentEditable* componentEditable = Instance_getComponentEditable( instance );
|
||||||
if ( componentEditable ) {
|
if ( componentEditable ) {
|
||||||
aabb_extend_by_aabb_safe( m_bounds, aabb_for_oriented_aabb_safe( componentEditable->getSelectedComponentsBounds(), instance.localToWorld() ) );
|
aabb_extend_by_aabb_safe( m_bounds, aabb_for_oriented_aabb_safe( componentEditable->getSelectedComponentsBounds(), instance.localToWorld() ) );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user