How to include a .py text file with a character for linking/appending?

Hi all!

Most any .blend file that I use that has an armature in it also has a python file that adds additional functionality. The python script adds stuff like rig layers/collections, and other controls into the transforms panel.

When I link/append from that file into a new file, I always have to link/append that python text file too. I’ve noticed when linking/appending the BF Snow character, the text file automatically is included. No need to select the text file for the link/append. I haven’t tested it, but I’m pretty sure rigify characters probably are linked/appended with the python scripts included too. So how is that done?

What do I have to do to make sure when a collection is appended/linked that the python text file will be included?

I spent 1/2 hour today looking thru the Snow character file without figuring it out. Can someone point me in the right direction to do this?

Thanks for you time,
Randy

One thing that I’ve seen in some rigify based rigs, is a custom property that is added to the Armature whch references the .py file. That makes a clear link between the two, and brings the .py file in along with the armature.

You can create a custom property of type Data-Block, and ID Type: Text. That will allow you to select the .py text file for the property value.

In the Text menu for the script, be sure to also select the Register option.

You can add the custom property to the Armature Object (The orange square tab), or the Armature data tab (green skeleton tab). I don’t think it makes a difference. Either way it makes the association between the script file and the armature.

1 Like

Thanks, that’s what I was looking for!

I now kinda understand how the association thing works, thanks for that!

Randy

1 Like