As part of a plugin i’ve been working on that does a bunch of stuff for specific types of armatures, i use a single class to store a lot of information. You select an armature and then it gathers info from it for use in a bunch of operations, and it works perfectly fine on its own, everything works as intended. Except i’ve encountered a problem that causes the whole plugin to break, and that’s as soon as you reload the blend file with an armature selected in the plugin.
For reference, this is how it should look like
However, this is how it looks like when a blend file is loaded with an armature still selected by the time you saved it
This is caused by the class that’s used to store all that information no longer existing, meaning it doesn’t have any info to display many things and that messes everything up. Of course, if i select an armature in that messed state it fixes itself, but my question is, how can i retain a class so this doesn’t happen when loading a blend file? Or if that’s not possible, how can i check if said class exists as soon as i load a blend file? So it’s able to remake it
Oh, just because, here’s what happens if i try to do any function in that disfunctional state
Thanks in advance!