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

Added support for certain struct types #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

munkybutt
Copy link

Added functionality to parse some struct types for signatures.
It doesn't cover all the types, but provides data on a large number of the outstanding ones.
Currently formatted to return nested dictionaries with all the data like so:

"SkinUtils": {
    "ExtractSkinData": {
        "signature": "<void>ExtractSkinData <node>node",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "ExtractSkinData "
            },
            {
                "type": "node",
                "name": "node"
            }
        ]
    },
    "ImportSkinData": {
        "signature": "<void>ImportSkinData <node>targetNode <node>sourceNode",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "ImportSkinData "
            },
            {
                "type": "node",
                "name": "targetNode "
            },
            {
                "type": "node",
                "name": "sourceNode"
            }
        ]
    },
    "GetBoneBindTM": {
        "signature": "<matrix3>GetBoneBindTM <node>skinNode <node>boneNode",
        "return_type": "matrix3",
        "arguments": [
            {
                "type": "matrix3",
                "name": "GetBoneBindTM "
            },
            {
                "type": "node",
                "name": "skinNode "
            },
            {
                "type": "node",
                "name": "boneNode"
            }
        ]
    },
    "SetBoneBindTM": {
        "signature": "<void>SetBoneBindTM <node>skinNode <node>boneNode <matrix3>tm",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "SetBoneBindTM "
            },
            {
                "type": "node",
                "name": "skinNode "
            },
            {
                "type": "node",
                "name": "boneNode "
            },
            {
                "type": "matrix3",
                "name": "tm"
            }
        ]
    },
    "GetMeshBindTM": {
        "signature": "<matrix3>GetMeshBindTM <node>skinNode",
        "return_type": "matrix3",
        "arguments": [
            {
                "type": "matrix3",
                "name": "GetMeshBindTM "
            },
            {
                "type": "node",
                "name": "skinNode"
            }
        ]
    },
    "SetMeshBindTM": {
        "signature": "<void>SetMeshBindTM <node>skinNode <matrix3>tm",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "SetMeshBindTM "
            },
            {
                "type": "node",
                "name": "skinNode "
            },
            {
                "type": "matrix3",
                "name": "tm"
            }
        ]
    },
    "GetBoneStretchTM": {
        "signature": "<matrix3>GetBoneStretchTM <node>skinNode <node>boneNode",
        "return_type": "matrix3",
        "arguments": [
            {
                "type": "matrix3",
                "name": "GetBoneStretchTM "
            },
            {
                "type": "node",
                "name": "skinNode "
            },
            {
                "type": "node",
                "name": "boneNode"
            }
        ]
    },
    "SetBoneStretchTM": {
        "signature": "<void>SetBoneStretchTM <node>skinNode <node>boneNode <matrix3>tm",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "SetBoneStretchTM "
            },
            {
                "type": "node",
                "name": "skinNode "
            },
            {
                "type": "node",
                "name": "boneNode "
            },
            {
                "type": "matrix3",
                "name": "tm"
            }
        ]
    },
    "GrowSelection": {
        "signature": "<void>GrowSelection <node>skinNode",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "GrowSelection "
            },
            {
                "type": "node",
                "name": "skinNode"
            }
        ]
    },
    "ShrinkSelection": {
        "signature": "<void>ShrinkSelection <node>skinNode",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "ShrinkSelection "
            },
            {
                "type": "node",
                "name": "skinNode"
            }
        ]
    },
    "LoopSelection": {
        "signature": "<void>LoopSelection <node>skinNode",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "LoopSelection "
            },
            {
                "type": "node",
                "name": "skinNode"
            }
        ]
    },
    "RingSelection": {
        "signature": "<void>RingSelection <node>skinNode",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "RingSelection "
            },
            {
                "type": "node",
                "name": "skinNode"
            }
        ]
    },
    "ImportSkinDataNoDialog": {
        "signature": "<void>ImportSkinDataNoDialog <boolean>matchByName <boolean>removeTargetPrefix <boolean>removeTargetSuffix <boolean>removeSourcePrefix <boolean>removeSourceSuffix <float>threshold <integer>interpolationType",
        "return_type": "void",
        "arguments": [
            {
                "type": "void",
                "name": "ImportSkinDataNoDialog "
            },
            {
                "type": "boolean",
                "name": "matchByName "
            },
            {
                "type": "boolean",
                "name": "removeTargetPrefix "
            },
            {
                "type": "boolean",
                "name": "removeTargetSuffix "
            },
            {
                "type": "boolean",
                "name": "removeSourcePrefix "
            },
            {
                "type": "boolean",
                "name": "removeSourceSuffix "
            },
            {
                "type": "float",
                "name": "threshold "
            },
            {
                "type": "integer",
                "name": "interpolationType"
            }
        ]
    }
}

Added functionality to parse some struct types for signatures
@friedererdmann
Copy link
Owner

Hey @munkybutt - this is great! I attempted something similar in one of the branches, but didn't get around yet to make it functional. I like your approach here and will see that I can integrate it soon :) I'm a bit slow on integrations right now, but I appreciate the Pull Request and will definitely use this!

@munkybutt
Copy link
Author

I will make another pass to see if I can feed the data I am getting into the functions you already have.
This was me being a bit lazy tbh :/

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.

None yet

2 participants