Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.0.0dev7 changes to Master #201

Open
wants to merge 863 commits into
base: master
Choose a base branch
from
Open

Release v2.0.0dev7 changes to Master #201

wants to merge 863 commits into from

Conversation

neomonkeus
Copy link
Member

Move accumulated changes to master.

hexabits added 30 commits April 28, 2016 15:15
Clarified names, added comments.  Added default values for NifData init
to simplify construction.  Call setBinary explicitly for clarity.
Regarding `array->arr2().isEmpty()` this was removed because nifxml
should error instead if trying to set an `<add>` to binary if it is
multidimensional.
Didn't update for new XML names.  Fixed conditions on fo4_env.  Previous
commit also broke shader loading because apparently it uses
NifModel::getItem to resolve block values.
If the `tx->reload() = true; emit sigRefresh();` branch was triggered
the data stored for the texture would not be updated.  Depending on how
fast the file watcher emits the signal the texture may or may not
refresh because the results of QFile::exists() would vary.

Also prevented this code from running more than once for the same
texture which it was doing.
Considering all spells as "Processing" has unwanted side effects for a
few spells such as Transform > Apply.  The GLView relies on these
signals for recompiling the meshes when changed.  Since a spell only
returns a single index it cannot be handled after the spell is cast.
Sometimes NifModel::linksChanged can be emitted dozens or hundreds of
times right after the other.  This caused GLView to attempt an update
for each call.  This timer limits the recompile to once every 16ms at
most, which is just under the frametime at 60FPS.  However if there are
100 calls each 10ms apart the timer will only timeout and call
modelLinked() once,  16ms after the 100th call.
When the XML is parsed, flags are now set on the data that NifModel can
check against.  This makes parsing of files both faster and clearer.
Certain string checks and hash contains checks are avoided entirely for
many more rows.  The early reject for evalCondition is now much faster.
NifModel::insertType is now much cleaner.

Also, removed unused flags/methods from NifValue.
Single rows that toggle their visibility based on the value of a
previous row were not hiding/unhiding correctly.  The previous code was
only tailored to updating ARG-passed arrays correctly.
Qt stopped requiring ICU libs and so the build scripts no longer need to
place them in the build dir.
Replacing QRegExp has proven stable and the old implementation hidden
from release can be removed completely.
On larger NIFs the previous way was terribly inefficient and could
actually increase the time to open the file.
Depending on how NifSkope was opened, the static method QDir::current()
could actually return the wrong directory.  In the case of double
clicking a file when NifSkope is the default application, QDir reported
the file directory, not the NifSkope one.   This actually broke several
features, such as shaders.
textureCubeLod was breaking AMD rendering.  Increased to #version 130 in
order to use textureLod.
AMD drivers did not like this particular way of avoiding if/else.  It
seems to just disable cubemapping.
Laptops with Intel graphics would error during compilation of this
shader because the fragment referenced the varying but the vert shader
did not write to it.
Intel actually gave compilation errors over the missing HalfVector
whereas Nvidia/AMD just don't care.  I'm not even sure the Oblivion
shaders actually do anything currently, but this at least gets rid of
the compilation error for Intel.
Added more shortcuts for block manip, removed the F1-F4 keys because F2
is default for editing the current selection and some people like to use
this.
Some spells were no longer working correctly, particularly those which
use set<> on a row which has dependent condition rows.  The NifModel
set<> methods now invalidate any dependent conditions after setting
their value.   This did not cause any load speed regressions.
Store which rows are links and which rows have links somewhere under
them on the parent item.  This accelerates link updating by going
through far fewer rows.
To input values above INT_MAX you had to input them as a signed integer,
i.e. the corresponding negative values.  Obviously this was not ideal.

You can now only input unsigned integers into uint boxes.

Also, input of integers in base 16 (hex) is now allowed, including
pasting, but the string must start with `0x`.
Transform > Copy in the context menus only allows for copying of the
local transform of the block.  However the world transform is sometimes
useful for copying, like the world transform of bones in a skeleton NIF.
This is particularly necessary when creating Art Object NIFs which
attach to bones.

The world transform is inaccessible via Spells, so I added a button to
Inspect.
If certain values in subsegments were edited incorrectly it could cause
crashing when the values cause the Triangle lookup to go out of bounds.
Array child items naturally cannot have any conditions.  I set them as
"conditionless" upon creation but forgot to set them to true by default.
This assures new rows when lengthening arrays will show up.
There are potential issues with crashing on some systems and may
exacerbate the inordinately long delay sometimes occurring when double
clicking NIFs for the first time in a while.
Simply double clicking and clicking out of a float edit could truncate
several decimal places worth of precision, and also effectively limits
any edits to floats to half precision.
- String copy/paste for 20.1.0.1+ (switch to string indices)
- Usage/Access are retained for NiDataStream with copy/paste
- Relaxed the linking restrictions when a link points to the root node.  This allows NiCollisionObject branches to be pasted onto other NIFs more easily for example.
- Pasting a branch is 20-30x faster, more so for extremely deep branches.  Speed increase came solely from pausing model updates during insertNiBlock.
Changed nearly all of setupProgram for the shaders.  Store the uniform locations, use enums and maps instead of strings to refer to the uniforms.  This helps with speed, legibility, and autocompletion.

Removed all the `ob_` shaders for the time being as there is a shader complexity issue (more shaders == worse).  Will reinstate fo3 and ob shading over time and with far fewer shaders.
Split the enum bitflag options after a user-defined number of options.  Currently WIP.  The combo box's line edit disables the newlines when the editor is created and reverts back to single line while the row stays the same height.

Also show "undefined" when a bool value is 2, which is the undefined value for NiBool.
For the various additions made in dev7, sometimes undo/redo does not work well with the other undoable things if an Update Array command does not get sent to the array first.  Such as lengthening an array, updating it, and then pasting another array onto it.
Use the actual buddy() method for QAbstractItemModel
In addition to "Skin Transform" support transforms named "Transform".
Cut down NifItem memory usage slightly.  Speed up a couple heavily used operations slightly.
There are some old DDS files that I have been informed of that are not actually the correct size for their format.  Intel plugin resaves them at the size that NifSkope calculates it should be.  The old DDS loader loaded them fine however.
Fix issue caused by refactor in 31fc1b2 where you could not turn shaders back on after turning them off.
Didn't crash if your registry already had the value set.
Since pre-alpha seems to scare people, change the window title text.

Added GLI to the license section.  Moved the qhull copying text to the window, removed the file copying.

Added Discord links.
NifMopp was recompiled with hk660 and also fixed to actually work for subshapes.

Only copy it now when x86.   Re-enabled copying of XML and QSS.   Commented out the TRANSLATIONS as they are so outdated.
POSITION_BP semantic was being ignored for the check that the mesh had vertices.  This was causing skinned meshes using POSITION_BP to no longer render.
Second pass shapes would become wire if an object was selected due to a missing gl call.
The OBJ I have available still seem to import fine, but I do not have access to the ones that supposedly don't.
Toggling silhouette needs the shaders to be updated.
Re-enable multi-layer parallax for Skyrim.  Was inadvertently disabled by having sk_default return true for Shader Type 11.

Tentatively fixed a longstanding issue with certain GPUs and env mapping.

Part of the fix entails always having a default cubemap loaded, so added a debug cubemap texture to shaders/.
Affected games like Civ IV which use only NiSkinData weights, as I had the ternary operator backwards from the intent.
Continuation of df48fc7

Do not return false for any missing textures, instead always assure binding and proper defaults.

Created option to show error color for missing diffuse.  This does not apply to BSESP as diffuse is not necessary for those.

Correctly blacken BSTriShape mesh with mismatched vertex attributes and shader flags for vertex colors.

Correctly show vertex colors for FO4 BSLSP if they exist in the vertex data.  The vertex color flags are optional since they do not exist in the BGSM.
Adding new textures to texture slots was not taking effect with BSTriShape based NIFs.
Or from writing incomplete file (if new).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants