Created
April 10, 2023 20:29
-
-
Save bohdon/17ef462e654c5ab63217b18661dec103 to your computer and use it in GitHub Desktop.
Imports quill animation into maya directly from the Quill.json.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import json | |
def import_anim(path: str): | |
with open(path) as fp: | |
data = json.load(fp) | |
all_layers = get_layers(data) | |
for layer in all_layers: | |
anim = | |
return all_layers | |
def get_layers(data: dict): | |
layers = {} | |
seq = data.get("Sequence", {}) | |
root_layer = seq.get("RootLayer") | |
layers = get_child_layers(root_layer) | |
return layers | |
def get_child_layers(layer: dict): | |
result = [] | |
children = layer.get("Implementation", {}).get("Children", []) | |
for child in children: | |
result.append(child) | |
sub_children = get_child_layers(child) | |
if sub_children: | |
result.extend(sub_children) | |
return result | |
def get_transform_anim(layer: dict): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment