8 Commits
Author SHA1 Message Date
m000z0rz a3ca8cfbda [OoT/MM] Support ZAPD bone enums for skeleton import (#396)
* Ignore IntelliJ editor data

* [OoT] Add skeleton import test scripts

In preparation for fixing skeleton imports from the MM decomp, make a
script for testing skeleton imports.

Running `python3 scripts/make_all_skeletons.py <decomp path> <output
folder>` will attempt to import all skeletons from every file in the
decomp that appears to contain a skeleton, and report on how many
files raised exceptions during the import. The generated .blend files
are stored in the output folder. Including a third argument of ` will
attempt to import all animations for files that contain a single
skeleton as well.

Running this on the mm decomp at commit
803ff1fb1593cdc0c62d14882973af04dc0f988e (from 2024-07-13) results in
only 3/174 (1.7%) of files with skeletons importing them without exceptions.

* [OoT] Strip comments in limb list

The MM decomp specifies `EnumName` values for limbs in the asset XML,
which generates an enum naming bone indicies. These enum values are
also generated in comments in the limb list:

  void* gDekuButlerSkelLimbs[] = {
    &gDekuButlerRootLimb, /* DEKU_BUTLER_LIMB_ROOT */

Fast64's current limb list parsing does not expect comments here,
which causes the limb list parse to fail.

Add a function to strip comments of this style, and strip them before
parsing limb list entires.

* [OoT] Identify and parse enums when importing skeletnos

The MM decomp defines EnumNames for limbs in asset XML, which causes
ZAPD to generate limb definitions that use these enum values for the
next child and next sibling (with an offset of 1).

  StandardLimb gDekuButlerRootLimb = {
    { 0, 2775, 0 }, DEKU_BUTLER_LIMB_PELVIS - 1, LIMB_DONE,

ootGetLimb currently only supports int values, hex values, or
LIMB_DONE here.

In preparation for supporting limb enum values of this form, add the
object's header file to skeletonData and parse all enums found during
skeleton import. The next patch in this series will use the parsed
enums to handle limb definitions of this form.

* [OoT] Support limb enums for limb nextChild / nextSibling

Use the parsed enums to support next child and next sibling
definitions of the form `<limb enum value> - 1`.

With this change and the others from this patch series,
`make_all_skeletons.py` goes from just 3/174 (1.1%) of MM decomp files
with successful skeleton imports to 169/174 (97.1%).
2024-08-02 17:27:15 +02:00
Sauraen a801054660 Applied black 2023-02-13 15:56:21 -08:00
Sauraen 3a327cfe1c Added warning and error if CI formats not compatible, moved setting format from DPSetTextureLUT for each texture to part of othermode 2022-11-26 18:45:49 -08:00
thecozies e71e4d5e57 V5 initial impl 2022-06-30 18:41:43 -05:00
Dragorn421 853da9d784 Introduce Black (#80)
* Add Black configuration

* Add Formatting section to the README

* Add `.venv` to gitignore
2022-03-20 08:57:21 -05:00
thecozies 34e46ece26 Custom geo commands and object instancing in SM64 Object exporting (#16)
* Added instancing and geo command objects to sm64 exporting

* Removed trailing whitespace from recently changed files

* remove orphaned meshes and curves specifically

* 2.8 compatibility and removed trailing whitespace

* Shorten STS Scrolling text to fit in row better

* Removed useless TODO

* removed iter_from_active in favor of yield_children

* simplify drawLayers set creation in revert

* removed useless copying

* utility function cleanup

* utilize shared matrix from lambda

* improved formatting in utility.py

* use ValueError check for casting drawLayer to int

* rename common mtx to transform_mtx_blender_to_n64

* simplify rotate_quat_blender_to_n64

* made rotate_bounds math make sense

* simplified translate_blender_to_n64
2021-09-04 09:07:30 -05:00
kurethedead db78e8351a Fixed anim list index importing. Added function map to auto convert geolayout node function addresses to decomp names. Added LowPolySkinnedMario. 2019-12-03 22:04:02 -08:00
kurethedead 41538347bd Initial Commit 2019-11-18 17:40:14 -08:00