Q3map2:
* -backsplash (float)scale (float)distance: scale area lights backsplash fraction + set distance globally (distance < -900 to omit distance setting); def = 1 23; real area lights have no backsplash (scale = 0) q3map_backsplash shader keyword overrides this setting Radiant: binds... * alt + m1 click/drag in component modes: select objects misc... * fix: selected entity and brush numbers display in 'Find brush' dialog * prefer to display texture width and height in status bar over name (PANGO_ELLIPSIZE_START) * allow search shortcut (ctr+f in win) in entity inspector -> entity class list * fix: don't save empty group entities (but worldspawn)
This commit is contained in:
@@ -2099,7 +2099,7 @@ void SelectBrush( int entitynum, int brushnum ){
|
||||
}
|
||||
|
||||
|
||||
class BrushFindIndexWalker : public scene::Graph::Walker
|
||||
class BrushFindIndexWalker : public scene::Traversable::Walker
|
||||
{
|
||||
mutable const scene::Node* m_node;
|
||||
std::size_t& m_count;
|
||||
@@ -2107,9 +2107,9 @@ public:
|
||||
BrushFindIndexWalker( const scene::Node& node, std::size_t& count )
|
||||
: m_node( &node ), m_count( count ){
|
||||
}
|
||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||
if ( Node_isPrimitive( path.top() ) ) {
|
||||
if ( m_node == path.top().get_pointer() ) {
|
||||
bool pre( scene::Node& node ) const {
|
||||
if ( Node_isPrimitive( node ) ) {
|
||||
if ( m_node == &node ) {
|
||||
m_node = 0;
|
||||
}
|
||||
if ( m_node ) {
|
||||
@@ -2120,7 +2120,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||
}
|
||||
};
|
||||
|
||||
class EntityFindIndexWalker : public scene::Graph::Walker
|
||||
class EntityFindIndexWalker : public scene::Traversable::Walker
|
||||
{
|
||||
mutable const scene::Node* m_node;
|
||||
std::size_t& m_count;
|
||||
@@ -2128,9 +2128,9 @@ public:
|
||||
EntityFindIndexWalker( const scene::Node& node, std::size_t& count )
|
||||
: m_node( &node ), m_count( count ){
|
||||
}
|
||||
bool pre( const scene::Path& path, scene::Instance& instance ) const {
|
||||
if ( Node_isEntity( path.top() ) ) {
|
||||
if ( m_node == path.top().get_pointer() ) {
|
||||
bool pre( scene::Node& node ) const {
|
||||
if ( Node_isEntity( node ) ) {
|
||||
if ( m_node == &node ) {
|
||||
m_node = 0;
|
||||
}
|
||||
if ( m_node ) {
|
||||
@@ -2147,8 +2147,24 @@ static void GetSelectionIndex( int *ent, int *brush ){
|
||||
if ( GlobalSelectionSystem().countSelected() != 0 ) {
|
||||
const scene::Path& path = GlobalSelectionSystem().ultimateSelected().path();
|
||||
|
||||
GlobalSceneGraph().traverse( BrushFindIndexWalker( path.top(), count_brush ) );
|
||||
GlobalSceneGraph().traverse( EntityFindIndexWalker( path.parent(), count_entity ) );
|
||||
{
|
||||
scene::Traversable* traversable = Node_getTraversable( path.parent() );
|
||||
if ( traversable != 0 && path.size() == 3 ) {
|
||||
traversable->traverse( BrushFindIndexWalker( path.top(), count_brush ) );
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
scene::Traversable* traversable = Node_getTraversable( GlobalSceneGraph().root() );
|
||||
if ( traversable != 0 ) {
|
||||
if( path.size() == 3 ){
|
||||
traversable->traverse( EntityFindIndexWalker( path.parent(), count_entity ) );
|
||||
}
|
||||
else if ( path.size() == 2 ){
|
||||
traversable->traverse( EntityFindIndexWalker( path.top(), count_entity ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*brush = int(count_brush);
|
||||
*ent = int(count_entity);
|
||||
|
||||
Reference in New Issue
Block a user