disable fastnormalize for light: was increasing dirt from arealights, lighting with acute angle

Radiant:

binds...
	* QE tool: alt + m1 drag in primitives mode:
		click face = clicked faces shear
	* m3 in texbro: select texture w/o applying to selection
	* `: XYFocusOnSelected
	* ctrl + shift + e: Select Connected Entities
misc...
	* search in shortcuts list
	* edit shortcuts on m1 dbl click
	* edit shortcuts fix: could highlight a few rows for editing
	* texbro: toggle off hideUnused on loading a tag
	* fix of: undo something, select tex in texbro, no redo available
	* epsilon in resize brush selector to prevent perpendicular faces pickup
	* clone group entity primitives to separate entity on cloneSelectedMakeUnique
	* Focus on Selected option in Entity List (focus cam and center xy)
	* entity inspector: connected entities walker (select target / targeting / both)(focus)
This commit is contained in:
Garux
2017-08-02 09:21:32 +03:00
parent 461d008daa
commit dfce2da577
20 changed files with 424 additions and 44 deletions

View File

@@ -463,6 +463,13 @@ void Select_SetShader( const char* shader ){
Scene_BrushSetShader_Component_Selected( GlobalSceneGraph(), shader );
}
void Select_SetShader_Undo( const char* shader ){
if ( GlobalSelectionSystem().countSelectedComponents() != 0 || GlobalSelectionSystem().countSelected() != 0 ) {
UndoableCommand undo( "textureNameSetSelected" );
Select_SetShader( shader );
}
}
void Select_SetTexdef( const TextureProjection& projection ){
if ( GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ) {
Scene_BrushSetTexdef_Selected( GlobalSceneGraph(), projection );
@@ -1390,3 +1397,79 @@ void DoScaleDlg(){
gtk_widget_show( GTK_WIDGET( g_scale_dialog.window ) );
}
class EntityGetSelectedPropertyValuesWalker_nonEmpty : public scene::Graph::Walker
{
PropertyValues& m_propertyvalues;
const char *m_prop;
const NodeSmartReference worldspawn;
public:
EntityGetSelectedPropertyValuesWalker_nonEmpty( const char *prop, PropertyValues& propertyvalues )
: m_propertyvalues( propertyvalues ), m_prop( prop ), worldspawn( Map_FindOrInsertWorldspawn( g_map ) ){
}
bool pre( const scene::Path& path, scene::Instance& instance ) const {
Entity* entity = Node_getEntity( path.top() );
if ( entity != 0 ){
if( path.top().get() != worldspawn ){
Selectable* selectable = Instance_getSelectable( instance );
if ( ( selectable != 0 && selectable->isSelected() ) || instance.childSelected() ) {
const char* keyvalue = entity->getKeyValue( m_prop );
if ( !string_empty( keyvalue ) && !propertyvalues_contain( m_propertyvalues, keyvalue ) ) {
m_propertyvalues.push_back( keyvalue );
}
}
}
return false;
}
return true;
}
};
void Scene_EntityGetPropertyValues_nonEmpty( scene::Graph& graph, const char *prop, PropertyValues& propertyvalues ){
graph.traverse( EntityGetSelectedPropertyValuesWalker_nonEmpty( prop, propertyvalues ) );
}
#include "preferences.h"
void Select_ConnectedEntities( bool targeting, bool targets, bool focus ){
PropertyValues target_propertyvalues;
PropertyValues targetname_propertyvalues;
const char *target_prop = "target";
const char *targetname_prop;
if ( g_pGameDescription->mGameType == "doom3" ) {
targetname_prop = "name";
}
else{
targetname_prop = "targetname";
}
if( targeting ){
Scene_EntityGetPropertyValues_nonEmpty( GlobalSceneGraph(), targetname_prop, targetname_propertyvalues );
}
if( targets ){
Scene_EntityGetPropertyValues_nonEmpty( GlobalSceneGraph(), target_prop, target_propertyvalues );
}
if( target_propertyvalues.empty() && targetname_propertyvalues.empty() ){
globalErrorStream() << "SelectConnectedEntities: nothing found\n";
return;
}
if( !targeting || !targets ){
GlobalSelectionSystem().setSelectedAll( false );
}
if ( targeting && !targetname_propertyvalues.empty() ) {
Scene_EntitySelectByPropertyValues( GlobalSceneGraph(), target_prop, targetname_propertyvalues );
}
if ( targets && !target_propertyvalues.empty() ) {
Scene_EntitySelectByPropertyValues( GlobalSceneGraph(), targetname_prop, target_propertyvalues );
}
if( focus ){
FocusAllViews();
}
}
void SelectConnectedEntities(){
Select_ConnectedEntities( true, true, false );
}