def __init__(self):
self.export_all = False
self.collection = True
+ self.looping_threshold = 0.001
def export_to_file(self, context, out_fn):
if self.export_all:
if self.collection:
from .datafile import Statement
with open(os.path.join(path, base+".mdc"), "w") as out_file:
- for r in resources.values():
+ for n in sorted(resources.keys()):
+ r = resources[n]
st = Statement("animation", r.name)
st.sub = r.statements
st.write_to_file(out_file)
def export_animation(self, context, action):
from .animation import create_animation_from_action
- anim = create_animation_from_action(context, action)
+ anim = create_animation_from_action(context, action, looping_threshold=self.looping_threshold)
from .datafile import Resource, Statement
resource = Resource(action.name+".anim")
resource.statements.append(st)
+ resource.statements.append(Statement("looping", anim.looping))
+
return resource