1
$\begingroup$

First of all, I'm not too familiar with python.

What I'd like to happen, is that for the selected object/objects, it should get their animations and set their use_fake_user = True (due to bone retargeting, but every save they are gone, having to reimport the animations).

So far, all I've got is:

# Selected objects in viewport into array objects
selName = []
    for i in bpy.context.selected_objects:
        selName.append(i.name)

Due to animations and materials having different names, calling them through the object names won't fly (tried bpy.data.actions).

How do I solve this issue? Or is there a more effective way?

Edit: It seems there's no real "connection" between animation data and objects. So it's either manual or all of them. I'd wager something along the lines of:

from itertools import chain

for i in chain(bpy.data.actions):
    i.use_fake_user = true
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.