Topic: Blender exporter and python

Hello !
I've made a small script that simplify the spritesheets animation process however i'm unable to set
the animation list in the exporter tab, i've tried for a while but didn't succeed. That would save me alot of time,
Any tips ?

Thanks !

Re: Blender exporter and python

can you explain more ? when you say exporter tab what do you mean ?

Re: Blender exporter and python

Hem yeah "exporter tab", that was quite dumb.. i meant this window :
PunBB bbcode test
I want to set up animations with a python script instead of entering them manually

Re: Blender exporter and python

Normally you can access like that :

sce = bpy.context.scene
mar_anim_list = sce.mar_anim_list

num_anims = len(mar_anim_list)

for i in range(num_anims):
    start = mar_anim_list[i].my_item.start
    end = mar_anim_list[i].my_item.end
    loops = mar_anim_list[i].my_item.loops

and to add a new animation :

mar_anim_list.add()
mar_anim_list[-1].name = "Anim%d" % (len(mar_anim_list) - 1)
mar_anim_list[-1].my_item.start = start
mar_anim_list[-1].my_item.end = end
...

Re: Blender exporter and python

Perfect ! Thanks so much wink