Page MenuHome

Blenloader API: lib linking and animdata read/write
AbandonedPublic

Authored by Jacques Lucke (JacquesLucke) on Apr 3 2020, 2:40 PM.

Details

Reviewers
None
Summary

In this patch I continued to experiment with the blenloader api.
Also see D7061 and D7062.

This patch adds a few more direct linking utilities as well as a method for getting the new address of an id data block.
To test the API, I move writing and reading of AnimData to blenkernel. This includes nla strips, fcurves and id properties.

I can split this up into separate patches for API and usage of the API eventually. But for now it is easier to have both in the same patch.

The naming conventions are not worked out everywhere yet. Feedback on naming conventions is welcome.

Diff Detail

Repository
rB Blender
Branch
arc-blenloader-api-lib-linking (branched from master)
Build Status
Buildable 7433
Build 7433: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) edited the summary of this revision. (Show Details)
Jacques Lucke (JacquesLucke) retitled this revision from Blenloader API: lib linking and animdata read/write [WIP] to Blenloader API: lib linking and animdata read/write.

Can we please have design tasks about these changes before getting patches? thanks.

Yeah, right. Thing is, I need to work on this, before I'm capable to make an actual design proposal.. I just shouldn't add you as a reviewer, just as a subscriber maybe.

Is this patch ready for review?
It lacks reviewers assigned. If you still plan to work on it please use "Plan Changes" feature.

All in all from personal feeling of the change I think this is a right direction to move to.

In general seems fine, although we could either split out the reading/writing into own files (_io.c suffix for example). Or, use doxy sections for io code.

Jacques Lucke (JacquesLucke) planned changes to this revision.EditedApr 15 2020, 12:33 PM

I plan to do some final experiments next cleanup day, and prepare a separate task for this project afterwards.

I'm fine with splitting reading/writing into _io.c files. However, we probably don't want this everywhere. E.g. for nodes and modifiers it might be good to keep things in a single file.

In general seems fine, although we could either split out the reading/writing into own files (_io.c suffix for example). Or, use doxy sections for io code.

The way I see it working is that these go along with standard init_data, copy_data, free_data methods in IDTypeInfo. Animation data is not an ID type, but data structures like this can follow the same naming and organization. Doxy sections for that is fine with me.

anim_sys.c is too big and should be split up, but it's e.g. the evaluation code that should move out I think. I'd rather not have _io.c files.

source/blender/blenkernel/BKE_nla.h
148–150

Similar comment for all files, I think these belong in the Data Management section along with add/copy/free, not at the end.