Skip to content

Commit

Permalink
Implemented the Startup Direction render setting
Browse files Browse the repository at this point in the history
  • Loading branch information
fo76utils committed Aug 20, 2024
1 parent 8066cf2 commit 80b3a02
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
== CHANGELOG ==

* New render setting for the mouse wheel zoom speed in the main window and UV editor.
* Implemented the 'Startup Direction' render setting that was previously disabled.
* Skyrim and Fallout 4 shader property data is no longer moved to a sub-structure of BSLightingShaderProperty or BSEffectShaderProperty.
* Fixed the geometry of docked widgets not being restored.

Expand Down
8 changes: 6 additions & 2 deletions src/glview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,12 @@ void GLView::updateSettings()
cfg.moveSpd = settings.value( "General/Camera/Movement Speed" ).toFloat();
cfg.rotSpd = settings.value( "General/Camera/Rotation Speed" ).toFloat();
cfg.upAxis = UpAxis(settings.value( "General/Up Axis", ZAxis ).toInt());
cfg.startupDirection = settings.value( "General/Camera/Startup Direction", 1 ).toInt();
int z = settings.value( "General/Camera/Mwheel Zoom Speed", 8 ).toInt();
int z = settings.value( "General/Camera/Startup Direction", 1 ).toInt();
static const ViewState startupDirections[6] = {
ViewLeft, ViewFront, ViewTop, ViewRight, ViewBack, ViewBottom
};
cfg.startupDirection = startupDirections[std::min< int >( std::max< int >( z, 0 ), 5 )];
z = settings.value( "General/Camera/Mwheel Zoom Speed", 8 ).toInt();
z = std::min< int >( std::max< int >( z, 0 ), 16 );

settings.endGroup();
Expand Down
2 changes: 1 addition & 1 deletion src/glview.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ protected slots:
float rotSpd = 45;

UpAxis upAxis = ZAxis;
int startupDirection = 1; // +Y
ViewState startupDirection = ViewFront;

static float vertexPointSize;
static float tbnPointSize;
Expand Down
2 changes: 1 addition & 1 deletion src/nifskope_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ void NifSkope::onLoadComplete( bool success, QString & fname )
// Refresh the header rows
header->updateConditions( QModelIndex_child( nif->getHeaderIndex() ), QModelIndex_child( nif->getHeaderIndex(), 20 ) );

ogl->setOrientation( GLView::ViewFront );
ogl->setOrientation( ogl->cfg.startupDirection );

enableUi();

Expand Down
12 changes: 6 additions & 6 deletions src/ui/settingsrender.ui
Original file line number Diff line number Diff line change
Expand Up @@ -549,32 +549,32 @@
</property>
<item>
<property name="text">
<string>+X</string>
<string>Left</string>
</property>
</item>
<item>
<property name="text">
<string>+Y</string>
<string>Front</string>
</property>
</item>
<item>
<property name="text">
<string>+Z</string>
<string>Top</string>
</property>
</item>
<item>
<property name="text">
<string>-X</string>
<string>Right</string>
</property>
</item>
<item>
<property name="text">
<string>-Y</string>
<string>Back</string>
</property>
</item>
<item>
<property name="text">
<string>-Z</string>
<string>Bottom</string>
</property>
</item>
</widget>
Expand Down

0 comments on commit 80b3a02

Please sign in to comment.