Code Monkey home page Code Monkey logo

Comments (2)

hexabits avatar hexabits commented on September 2, 2024

I'm a bit confused. What is the purpose of manually updating the header data? As far as I know the header data should never be touched directly.

If you're adding more blocks via "num blocks" it defaults to the 0th block type for the block type index. So if 0 = NiNode it creates N many NiNodes in the index, where N = Old # blocks - New # blocks. At the same time, it is not meant to handle the insertion of these blocks into the actual model data because the 0th block type (e.g. NiNode) defaults to having 0 block size and it doesn't carry out any of the function of Block > Insert > NiNode.

So I believe as far as the NIF data is concerned, it's correct that the header gets updated to reflect what is in the list/tree models upon saving. If it didn't refresh the header to match you could corrupt the entire NIF by messing with the header data.

In fact, I'm not sure if poking directly through the header is a good idea for end users. Maybe there should be some level of abstraction, a separate model / widget / etc. that lets you deal with the header data in a more user-friendly format. For one, making the string modal window (i.e. clicking 'TXT') more accessible, like its own draggable widget, and for the rest of the relevant header data, a widget like the Inspect widget. I'll create a ticket for that idea.

from nifskope.

hexabits avatar hexabits commented on September 2, 2024

Yeah I am closing this. The num blocks and block types and RTTI strings must come from what is present in the Block List. You can't do it the other way around. Incrementing Num Blocks is nothing like incrementing Num Children on an NiNode. If you need to add a block, you add a child to whichever node it belongs to, or if it's a property/extradata you add it to those arrays instead. Then you use the new Add Ref button on None refs to fill out the block.

from nifskope.

Related Issues (20)

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.