Code Monkey home page Code Monkey logo

nifly's People

Contributors

caliente8 avatar daz001 avatar guekka avatar mrtroble avatar ousnius avatar sts1skj avatar tcoppex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nifly's Issues

Copy particleNorms before resizing?

This is more a question than an definite bug report or PR.

In OptimizeFor, shouldn't the normals, if they exist, be copied to the particleNorms before particleNorms is resized? Or is the intention that if the number of normals and vertices differ then all of the particleNorms are populated with <1, 0, 0>?

You can see what I mean on this branch, renngar@db550f2.

My expectation was that if there were more vertices than normals, the particleNorms would be extended using <1, 0, 0> and if there were fewer vertices, then normals would be copied to particleNorms, which would be truncated to match the length of vertices. I don't know if my assumption is correct or not, so I thought I would ask.

static library size is too big.

Hello!
When I'm building nifly DLL as a static library, it's size is 18 mb(in Release mode). Is this normal or am I doing something wrong?
I previously used cmake-gui to build the .sln project. This is my first time building dependencies on other libraries so I'd appreciate help with this.

request for reuse

Hey, I have made a fork of this for use as a git submodule in a separate repository that adds C# adaptation via SWIG. I want to use that SWIG repository to output a Nuget package in support of a planned Synthesis patcher that updates NIF files. I'd like to include a DLL built from my fork, and credit you, in my Nuget package. Is this OK? Thanks for the library.

NifFile::SetVertsForShape resets shape's flags under certain conditions

NifFile::SetVertsForShape calls BSTriShape::Create if shape is a BSTriShape and the size of verts does not match the old number of vertices. And the first thing BSTriShape::Create does is flags = 14; So in my case it resulted in the flags switching to 14 seemingly out of nowhere when I added a vertex here, deleted a vertex there in already existing files/shapes.

FO76 - NifFile::GetTextureSlot returning empty strings

Hello!

I know Fallout 76 isn't fully supported as of now, but I did some testing with a modified version of PyNifly and found most models, skeletons, and etc seem to load perfectly. The only issue I've come across so far is that texture are not populated correctly it seems. I'd be willing to toss a PR your way if you could give me some pointers on where to get started. ๐Ÿ˜„

Issue handling trailing empty segments

Hey, I have a small thing to report:

For FO4, if you define a set of, say, 7 segments and assign all the tris to the 4th (so 5-7 are empty) then nifly will assign all those tris to the last segment, not the 4th.

Arguably, this is a case where if you do stupid things, stupid things happen. I found it because all the body parts in FO4 use the same segmentation scheme: 7 segments representing nothing, head, right arm, torso, left arm, right leg, left leg, in that order. So I just defined all the segments and assigned faces as needed. Some of the armors only needed a torso segment, leaving segments 5-7 empty. Took me quite a while to figure out what was going on.

I dug into the nifly code and the issue is below, in geometry.cpp, SetSegmentation(). The original code is commented out below. It was searching for the last filled part, but the trailing empty segments were confusing it. Capturing lastFilledPart during the first loop fixed the problem. (I can submit this as a pull req if you'd prefer, but I wasn't sure you'd even consider it a real bug.)

size_t lastFilledPart = 0;
for (int i = 0; i < static_cast<int>(triInds.size()); ++i)
while (triParts[triInds[i]] >= j) {
lastFilledPart = j;
partTriInds[j++] = i;
};

//for (size_t i = 0; i < partTriInds.size(); i++)
// if (partTriInds[i] > 0)
// lastFilledPart = i;

Minor inconsistency of parameters in "Get/Set...ForShape" methods of NifFile class

Almost all "Get/Set...ForShape" methods of NifFile class identify the shape by its pointer:

const std::vector<Vector3>* GetVertsForShape(NiShape* shape);
const std::vector<Vector3>* GetNormalsForShape(NiShape* shape);
and so on

But a couple of "Colors" methods go with the name of the shape instead:

const std::vector<Color4>* GetColorsForShape(const std::string& shapeName);
void SetColorsForShape(const std::string& shapeName, const std::vector<Color4>& colors);

And this is a bit confusing. I would suggest adding NiShape* shape overloads of these two for consistency and predictability.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.